This engine's representation of a single unrigged 3D model.
More...
#include <model.hpp>
|
| | StaticModel (const std::vector< std::shared_ptr< StaticMesh > > &meshHandles, const std::vector< std::shared_ptr< Material > > &materialHandles) |
| | Constructs a model out of a list of handles to meshes and materials.
|
| |
|
| ~StaticModel () |
| | Model destructor.
|
| |
|
| StaticModel (StaticModel &&other) |
| | Move constructor.
|
| |
|
| StaticModel (const StaticModel &other) |
| | Copy constructor.
|
| |
|
StaticModel & | operator= (StaticModel &&other) |
| | Move assignment.
|
| |
|
StaticModel & | operator= (const StaticModel &other) |
| | Copy assignment.
|
| |
| std::vector< std::shared_ptr< StaticMesh > > | getMeshHandles () const |
| | Gets the list of StaticMeshes associated with this Model object.
|
| |
| std::vector< std::shared_ptr< Material > > | getMaterialHandles () const |
| | Gets the materials associated with this model object.
|
| |
| std::string | getResourceTypeName_ () const override |
| | Get the resource type string for this resource.
|
| |
|
virtual | ~IResource ()=default |
| | Destroy the IResource object.
|
| |
|
|
void | free () |
| | Utility method for destroying resources associated with this model.
|
| |
|
void | stealResources (StaticModel &other) |
| | Utility method for taking resources from another instance of this class.
|
| |
|
void | copyResources (const StaticModel &other) |
| | Utility method for deeply replicating resources from another instance of this class.
|
| |
|
void | destroyResource () |
| | Destroys the resources associated with this object.
|
| |
|
void | releaseResource () |
| | Releases resources associated with this object so that they may be claimed by another part of the program.
|
| |
|
|
std::vector< std::shared_ptr< StaticMesh > > | mMeshHandles {} |
| | The meshes that make up this model.
|
| |
|
std::vector< std::shared_ptr< Material > > | mMaterialHandles {} |
| | The materials that correspond to each mesh on this model.
|
| |
This engine's representation of a single unrigged 3D model.
This object:
- Stores references to all the meshes used by the model
- Stores the hierarchical relationship between the meshes
- Stores material properties used by shaders for each mesh
- See also
- toymaker/core/ecs_world_resource_ext.hpp
◆ StaticModel()
| StaticModel::StaticModel |
( |
const std::vector< std::shared_ptr< StaticMesh > > & | meshHandles, |
|
|
const std::vector< std::shared_ptr< Material > > & | materialHandles ) |
Constructs a model out of a list of handles to meshes and materials.
Every mesh in the mesh list must have its material reference in the same index of the material list.
- Parameters
-
| meshHandles | List of meshes making up this model. |
| materialHandles | The materials corresponding to each mesh. |
◆ getComponentTypeName()
| static std::string ToyMaker::StaticModel::getComponentTypeName |
( |
| ) |
|
|
inlinestatic |
Gets the component type string for this object.
- Returns
- std::string This type's component type string.
◆ getMaterialHandles()
| std::vector< std::shared_ptr< Material > > StaticModel::getMaterialHandles |
( |
| ) |
const |
Gets the materials associated with this model object.
- Returns
- std::vector<std::shared_ptr<Material>> This model's materials.
◆ getMeshHandles()
| std::vector< std::shared_ptr< StaticMesh > > StaticModel::getMeshHandles |
( |
| ) |
const |
Gets the list of StaticMeshes associated with this Model object.
- Returns
- std::vector<std::shared_ptr<StaticMesh>> This model's meshes.
◆ getResourceTypeName()
| static std::string ToyMaker::StaticModel::getResourceTypeName |
( |
| ) |
|
|
inlinestatic |
Gets the resource type string for this object.
- Returns
- std::string This type's resource type string.
The documentation for this class was generated from the following files: