|
Physics Simulation & Visualization Tool 0.1
A C++ physics simulation engine with real-time 3D visualization
|
Base interface for all renderable objects in the scene. More...
#include <IDrawable.h>
Public Member Functions | |
| virtual | ~IDrawable ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual Shader * | getShader () const =0 |
| Gets the shader used to render this object. | |
| virtual Mesh * | getMesh () const =0 |
| Gets the mesh geometry for this object. | |
| virtual uint32_t | getObjectID () const =0 |
| Gets the unique identifier for this object. | |
Base interface for all renderable objects in the scene.
IDrawable defines the minimal contract for objects that can be rendered. It provides access to the core rendering resources (shader, mesh, object ID) without specifying how rendering is performed.
Derived interfaces (IInstancedDrawable, ICustomDrawable) define specific rendering strategies:
This design allows Scene::draw() to efficiently batch compatible objects while supporting specialized rendering when needed.
Definition at line 33 of file IDrawable.h.
|
virtualdefault |
Virtual destructor for proper cleanup of derived classes.
|
pure virtual |
Gets the mesh geometry for this object.
The mesh is used as part of the batch key for instanced rendering, grouping objects that share the same shader and mesh.
Implemented in Gizmo, SceneObject, Colliders, Forces, and PathTraces.
|
pure virtual |
Gets the unique identifier for this object.
This ID is used for:
Implemented in Gizmo, SceneObject, Colliders, Forces, and PathTraces.
|
pure virtual |
Gets the shader used to render this object.
The shader is used as part of the batch key for instanced rendering, grouping objects that share the same shader and mesh.
Implemented in Gizmo, SceneObject, Colliders, Forces, and PathTraces.