Component responsible for storing and managing a mesh for an entity. Used by the rendering system to draw geometry.
More...
#include <MeshComponent.hpp>
|
| | MeshComponent ()=default |
| | Default constructor.
|
| std::shared_ptr< MeshAsset > | GetMesh () const |
| | Returns the mesh assigned to this component.
|
| void | SetMesh (std::shared_ptr< MeshAsset > mesh) |
| | Assigns a mesh to this component. Logs the operation for debugging purposes.
|
| void | Start () override |
| | Called when the component starts.
|
| void | Update (float dt) override |
| | Called every frame to update the component.
|
| void | OnDestroy () override |
| | Called when the component is destroyed. Releases the mesh reference.
|
| std::string | GetTypeName () const override |
| | Returns the type name of the component. Used for debugging, serialization, or editor systems.
|
| virtual | ~Component ()=default |
| | Virtual destructor to allow proper cleanup of derived components.
|
Component responsible for storing and managing a mesh for an entity. Used by the rendering system to draw geometry.
◆ MeshComponent()
| Engine::MeshComponent::MeshComponent |
( |
| ) |
|
|
default |
◆ GetMesh()
| std::shared_ptr< MeshAsset > Engine::MeshComponent::GetMesh |
( |
| ) |
const |
|
inline |
Returns the mesh assigned to this component.
- Returns
- Shared pointer to the MeshAsset
◆ GetTypeName()
| std::string Engine::MeshComponent::GetTypeName |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the type name of the component. Used for debugging, serialization, or editor systems.
- Returns
- Component type name
Implements Engine::Component.
◆ OnDestroy()
| void Engine::MeshComponent::OnDestroy |
( |
| ) |
|
|
inlineoverridevirtual |
Called when the component is destroyed. Releases the mesh reference.
Reimplemented from Engine::Component.
◆ SetMesh()
| void Engine::MeshComponent::SetMesh |
( |
std::shared_ptr< MeshAsset > | mesh | ) |
|
|
inline |
Assigns a mesh to this component. Logs the operation for debugging purposes.
- Parameters
-
◆ Start()
| void Engine::MeshComponent::Start |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Update()
| void Engine::MeshComponent::Update |
( |
float | dt | ) |
|
|
inlineoverridevirtual |
Called every frame to update the component.
- Parameters
-
| dt | Delta time between frames |
Reimplemented from Engine::Component.
The documentation for this class was generated from the following file: