Physics Simulation & Visualization Tool 0.1
A C++ physics simulation engine with real-time 3D visualization
Loading...
Searching...
No Matches
IDrawable.h
Go to the documentation of this file.
1
6#pragma once
9
33class IDrawable {
34public:
38 virtual ~IDrawable() = default;
39
51 virtual Shader* getShader() const = 0;
52
64 virtual Mesh* getMesh() const = 0;
65
79 virtual uint32_t getObjectID() const = 0;
80};
81
82
112public:
125 virtual glm::mat4 getModelMatrix() const = 0;
126
146 return {getModelMatrix(), getObjectID()};
147 }
148};
149
182public:
198 virtual void draw() const = 0;
199};
Interface for objects with specialized rendering requirements.
Definition IDrawable.h:181
virtual void draw() const =0
Performs custom rendering for this object.
Base interface for all renderable objects in the scene.
Definition IDrawable.h:33
virtual Shader * getShader() const =0
Gets the shader used to render this object.
virtual uint32_t getObjectID() const =0
Gets the unique identifier for this object.
virtual ~IDrawable()=default
Virtual destructor for proper cleanup of derived classes.
virtual Mesh * getMesh() const =0
Gets the mesh geometry for this object.
Interface for objects that support GPU instanced rendering.
Definition IDrawable.h:111
virtual glm::mat4 getModelMatrix() const =0
Gets the model transformation matrix for this instance.
virtual Rendering::InstanceData getInstanceData() const
Gets the complete per-instance data for GPU upload.
Definition IDrawable.h:145
GPU mesh representation with support for instanced rendering.
Definition Mesh.h:58
Definition Shader.h:6
Per-instance data for instanced rendering.