![]() |
Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
|
Abstract base for all drawable (renderable) objects in the engine. More...
#include <drawable_component.hpp>
Inherited by rendering_engine::Drawable2D, and rendering_engine::Drawable3D.
Public Member Functions | |
| DrawableComponent (RenderResourceContext renderContext) | |
| Constructs the DrawableComponent with a resource context. | |
| virtual | ~DrawableComponent ()=default |
| Virtual destructor. | |
| virtual void | Initialize () |
| Initializes render resource pointers (material, mesh, etc.). Must be called after setting material and mesh names. | |
| virtual void | Update (float deltaTime)=0 |
| Updates logic (animation, movement, etc.) for this drawable. | |
| virtual void | Shutdown () |
| DrawableComponent (const DrawableComponent &)=delete | |
| DrawableComponent & | operator= (const DrawableComponent &)=delete |
Protected Member Functions | |
| void | SetMaterialName (const std::string &materialName) |
| Sets the material to use (by name). | |
| void | SetMeshName (const std::string &meshName) |
| Sets the mesh to use (by name). | |
Protected Attributes | |
| RenderResourceContext | mRenderContext |
| std::unique_ptr< IRenderResources > | mRenderResources |
| std::string | mMaterialName |
| std::string | mMeshName |
| Material * | mMaterial |
| PackedMaterialData | mMaterialParameters |
| MeshDataGpu * | mMeshData |
Abstract base for all drawable (renderable) objects in the engine.
Provides core functionality for accessing render resources (meshes, materials, textures) and defines the initialization, update, and draw lifecycle for renderable entities.
Derived classes (such as Drawable2D and Drawable3D) implement type-specific behavior for spatial transforms, camera use, and render submission.
Definition at line 38 of file drawable_component.hpp.
| rendering_engine::DrawableComponent::DrawableComponent | ( | RenderResourceContext | renderContext | ) |
Constructs the DrawableComponent with a resource context.
| renderContext | Rendering resource context (renderer, caches). |
Definition at line 13 of file drawable_component.cpp.
|
virtualdefault |
Virtual destructor.
|
delete |
|
virtual |
Initializes render resource pointers (material, mesh, etc.). Must be called after setting material and mesh names.
Reimplemented in rendering_engine::Drawable2D, rendering_engine::Drawable3D, rendering_engine::Quad2D, and rendering_engine::StaticMesh.
Definition at line 22 of file drawable_component.cpp.
|
delete |
|
protected |
Sets the material to use (by name).
| materialName | Name of the material. |
Definition at line 39 of file drawable_component.cpp.
|
protected |
Sets the mesh to use (by name).
| meshName | Name of the mesh. |
Definition at line 43 of file drawable_component.cpp.
|
virtual |
Definition at line 31 of file drawable_component.cpp.
|
pure virtual |
Updates logic (animation, movement, etc.) for this drawable.
| deltaTime | Time step (seconds). |
Implemented in rendering_engine::Drawable2D, rendering_engine::Drawable3D, rendering_engine::Quad2D, and rendering_engine::StaticMesh.
|
protected |
Definition at line 87 of file drawable_component.hpp.
|
protected |
Definition at line 84 of file drawable_component.hpp.
|
protected |
Definition at line 88 of file drawable_component.hpp.
|
protected |
Definition at line 89 of file drawable_component.hpp.
|
protected |
Definition at line 85 of file drawable_component.hpp.
|
protected |
Definition at line 81 of file drawable_component.hpp.
|
protected |
Definition at line 82 of file drawable_component.hpp.