Virtual Testbed
Ship dynamics simulator for extreme conditions
ColoredObject.hh
1 #ifndef VTESTBED_GRAPHICS_COLOREDOBJECT_HH
2 #define VTESTBED_GRAPHICS_COLOREDOBJECT_HH
3 
4 #include <Magnum/GL/Mesh.h>
5 #include <Magnum/Resource.h>
6 #include <Magnum/Shaders/Phong.h>
7 
8 #include <vtestbed/graphics/types.hh>
9 
10 namespace vtb {
11 
12  namespace graphics {
13 
15  public Object3D,
16  public Drawable3D
17  {
18 
19  public:
20 
21  explicit
23  Magnum::ResourceKey meshId,
24  Magnum::ResourceKey materialId,
25  Object3D* parent,
26  DrawableGroup3D* group
27  );
28 
29  private:
30  void draw(
31  const Magnum::Matrix4& transformationMatrix,
32  Camera3D& camera
33  ) override;
34 
35  Magnum::Resource<Magnum::GL::Mesh> _mesh;
36  Magnum::Resource<Magnum::Shaders::Phong> _shader;
37  Vector3 _ambientColor;
38  Vector3 _diffuseColor;
39  Vector3 _specularColor;
40  Float _shininess;
41  };
42 
43  }
44 
45 }
46 
47 #endif // vim:filetype=cpp
Main namespace.
Definition: convert.hh:9