- /**
- Hook function, called from Object just before rendering the mesh.
- */
- virtual void setup_render() const { }
+ const Object &get_object() const { return object; }
+ virtual long get_instance_key() const { return reinterpret_cast<long>(&object); }
+
+ virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const { return object.get_bounding_sphere(); }
+
+ virtual void render(const Tag &tag = Tag()) const;
+ virtual void render(Renderer &, const Tag & = Tag()) const;
+
+ /** Hook function, called from Object just before rendering the mesh.
+ Renderer state will have been pushed before this is called. */
+ virtual void setup_render(Renderer &, const Tag &) const { }