It's often useful to have static geometry in a scene directly as an Object
without creating an instance. Many features such as Z-sorting and culling
require a matrix to be available.
namespace Msp {
namespace GL {
+Matrix Object::identity_matrix;
+
Object::Object():
lods(1),
lod0_watched(false)
Geometry::BoundingSphere<float, 3> bounding_sphere;
bool lod0_watched;
+ static Matrix identity_matrix;
+
public:
Object();
Object(const Mesh *, const Technique *);
const Technique *get_technique(unsigned = 0) const;
unsigned get_n_lods() const { return lods.size(); }
+ virtual const Matrix *get_matrix() const { return &identity_matrix; }
virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return &bounding_sphere; }
virtual void render(Renderer &, const Tag & = Tag()) const;