|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
#include <MeshComponent.hpp>
Public Member Functions | |
| MeshComponent (GameObject *, MeshData data) | |
| Uploads data's vertex/index arrays to new GPU buffers. | |
| MeshComponent (GameObject *object) | |
| void | AddConstantBuffer (RefPtr< RenderEngine::BufferBase > &buffer) |
| void | AddConstantBuffer (RenderEngine::TransformBuffer &bufferData) |
| Creates a new constant buffer from bufferData and appends it to the draw's buffer list. | |
| virtual bool | Initialize () override |
| Validates that vertex and index buffers were created successfully. | |
| void | SetCullBoundsLocal (const Math::AABB &bounds) |
| void | SetCullBoundsWorld (const Math::AABB &bounds) |
| void | SetIndexBuffer (RefPtr< RenderEngine::BufferBase > &buffer) |
| void | SetVertexBuffer (RefPtr< RenderEngine::BufferBase > &buffer) |
| virtual void | Update (float deltaTime) override |
| Culls against cull bounds if set, then submits an indexed draw call. | |
| Public Member Functions inherited from Sleak::Component | |
| Component (GameObject *object) | |
| virtual | ~Component ()=default |
| virtual void | FixedUpdate (float fixedDeltaTime) |
| GameObject * | GetOwner () |
| virtual void | LateUpdate (float deltaTime) |
| virtual void | OnDestroy () |
| Called when the component is detached or the owner is destroyed. | |
| virtual void | OnDisable () |
| virtual void | OnEnable () |
| Public Member Functions inherited from Sleak::Object | |
| Object (const std::string &name="Object") | |
| virtual | ~Object ()=default |
| const std::string & | GetName () const |
| uint64_t | GetUniqueID () const |
| void | SetName (const std::string &value) |
Additional Inherited Members | |
| Protected Attributes inherited from Sleak::Component | |
| bool | bIsInitialized |
| GameObject * | owner |
Holds the GPU vertex/index/constant buffers for a renderable mesh and submits a draw call each Update, subject to frustum culling.
Definition at line 26 of file MeshComponent.hpp.
|
inline |
Definition at line 28 of file MeshComponent.hpp.
| Sleak::MeshComponent::MeshComponent | ( | GameObject * | object, |
| MeshData | data ) |
Uploads data's vertex/index arrays to new GPU buffers.
Definition at line 27 of file MeshComponent.cpp.
| void Sleak::MeshComponent::AddConstantBuffer | ( | RefPtr< RenderEngine::BufferBase > & | buffer | ) |
Definition at line 97 of file MeshComponent.cpp.
| void Sleak::MeshComponent::AddConstantBuffer | ( | RenderEngine::TransformBuffer & | bufferData | ) |
Creates a new constant buffer from bufferData and appends it to the draw's buffer list.
Definition at line 89 of file MeshComponent.cpp.
|
overridevirtual |
Validates that vertex and index buffers were created successfully.
Implements Sleak::Component.
Definition at line 42 of file MeshComponent.cpp.
| void Sleak::MeshComponent::SetCullBoundsLocal | ( | const Math::AABB & | bounds | ) |
Definition at line 108 of file MeshComponent.cpp.
| void Sleak::MeshComponent::SetCullBoundsWorld | ( | const Math::AABB & | bounds | ) |
Definition at line 102 of file MeshComponent.cpp.
| void Sleak::MeshComponent::SetIndexBuffer | ( | RefPtr< RenderEngine::BufferBase > & | buffer | ) |
Definition at line 85 of file MeshComponent.cpp.
| void Sleak::MeshComponent::SetVertexBuffer | ( | RefPtr< RenderEngine::BufferBase > & | buffer | ) |
Definition at line 81 of file MeshComponent.cpp.
|
overridevirtual |
Culls against cull bounds if set, then submits an indexed draw call.
Implements Sleak::Component.
Definition at line 54 of file MeshComponent.cpp.