#include <ModelComponent.hpp>
|
| void | init () override |
| void | destroy () override |
| | Sets active to false on component destruction.
|
| void | update (ae::q20_12_t) override |
| | Draws the mesh to the screen every frame.
|
| ae::ComponentTypeID | getType () const override |
| bool | loadMesh (std::string *meshFilePath) |
| | Loads a mesh from a file into memory.
|
| void | drawMesh () |
| | Draws the loaded mesh to the screen.
|
Definition at line 16 of file ModelComponent.hpp.
◆ destroy()
| void ModelComponent::destroy |
( |
| ) |
|
|
override |
Sets active to false on component destruction.
Definition at line 9 of file ModelComponent.cpp.
◆ drawMesh()
| void ModelComponent::drawMesh |
( |
| ) |
|
◆ getType()
| ae::ComponentTypeID ModelComponent::getType |
( |
| ) |
const |
|
inlineoverride |
◆ init()
| void ModelComponent::init |
( |
| ) |
|
|
inlineoverride |
◆ loadMesh()
| bool ModelComponent::loadMesh |
( |
std::string * | meshFilePath | ) |
|
Loads a mesh from a file into memory.
- Parameters
-
| meshFilePath | The path to the mesh file to load. |
- Returns
- true if the mesh was successfully loaded, false otherwise.
Definition at line 115 of file ModelComponent.cpp.
◆ loadTexture()
| bool ModelComponent::loadTexture |
( |
FILE * | f, |
|
|
MDL3Texture & | tex ) |
|
private |
Loads an embedded texture from the file buffer and uploads it to the GPU.
- Parameters
-
| buffer | The file buffer to read from. |
| tex | The texture object to populate with the texture data. |
- Returns
- true if the texture was successfully loaded and uploaded, false otherwise.
- Note
- The function allocates a 32-bit aligned buffer for the GPU upload and frees it after use.
Definition at line 65 of file ModelComponent.cpp.
◆ loadTextureHeader()
| bool ModelComponent::loadTextureHeader |
( |
FILE * | f, |
|
|
MDL3Texture & | tex ) |
|
private |
Loads a texture header from the file buffer into memory.
- Parameters
-
| buffer | The file buffer to read from. |
| tex | The texture object to populate with the header data. |
- Returns
- true if the header was successfully loaded, false otherwise.
Definition at line 39 of file ModelComponent.cpp.
◆ submitToManager()
| void ModelComponent::submitToManager |
( |
| ) |
|
|
inlineoverrideprotected |
◆ update()
| void ModelComponent::update |
( |
ae::q20_12_t | | ) |
|
|
override |
◆ model
| std::unique_ptr<MDL3Model> ModelComponent::model |
|
private |
◆ render
| RenderManager& ModelComponent::render = RenderManager::getInstance() |
|
private |
◆ TYPE_ID
| ae::ComponentTypeID ModelComponent::TYPE_ID = static_cast<ae::ComponentTypeID>(ComponentType::Model) |
|
staticconstexpr |
The documentation for this class was generated from the following files: