1 #ifndef VTESTBED_GRAPHICS_SHIPCOMPARTMENTOBJECT_HH 2 #define VTESTBED_GRAPHICS_SHIPCOMPARTMENTOBJECT_HH 4 #include <Magnum/GL/Buffer.h> 5 #include <Magnum/GL/Mesh.h> 6 #include <Magnum/Shaders/Flat.h> 8 #include <vtestbed/core/compartment.hh> 9 #include <vtestbed/core/types.hh> 10 #include <vtestbed/graphics/IndexBuffer.hh> 11 #include <vtestbed/graphics/VertexBuffer.hh> 12 #include <vtestbed/graphics/types.hh> 25 Magnum::GL::Mesh _mesh{Magnum::GL::MeshPrimitive::Triangles};
26 Magnum::Shaders::Flat3D _shader;
29 Vector3 _color {T{0.f}, T{1.f}, T{0.f}};
34 bool _flooding =
false;
41 void draw(
const Matrix4& m, Camera3D& camera)
override;
43 inline void show(
bool b) { this->_show = b; }
44 inline const Vector3& color()
const {
return this->_color; }
45 inline void color(Vector3 v) { this->_color = v; }
46 inline void alpha(Float a) { this->_alpha = a; }
48 inline const std::string& name()
const {
return this->_name; }
49 inline bool fire()
const {
return this->_fire; }
50 inline void fire(
bool rhs) { this->_fire = rhs; update_color(); }
51 inline bool flooding()
const {
return this->_flooding; }
52 inline void flooding(
bool rhs) { this->_flooding = rhs; update_color(); }
63 #endif // vim:filetype=cpp