#include <model_factory.h>
Factory for loading models.
This is a very straightforward factory. It allows you to load models from disk of any type that Assimp supports. Models aren't added to the scene, you have to do that yourself via EntityFactory::AddChildToEntity().
Loads a model from disk.
- Parameters
-
[in] | file_path_to_model | A file path to the model that you want to load. |
- Returns
- An entity that sits at the root of the model. Make this Entity a child of any other child to start using it.
void blowbox::ModelFactory::ProcessIndices |
( |
aiMesh * |
mesh, |
|
|
Vector< Index > * |
out_indices |
|
) |
| |
|
staticprotected |
Converts the indices in an aiMesh to blowbox vertices.
- Parameters
-
[in] | mesh | The mesh from which the indices should be processed. |
[out] | out_indices | The indices that were converted. |
void blowbox::ModelFactory::ProcessMeshes |
( |
aiMesh ** |
meshes, |
|
|
unsigned int |
num_meshes, |
|
|
Vector< SharedPtr< Mesh >> * |
out_meshes |
|
) |
| |
|
staticprotected |
Converts aiMesh objects to blowbox meshes.
- Parameters
-
[in] | meshes | The meshes that should be converted. |
[in] | num_meshes | The number of meshes in the meshes array. |
[out] | out_meshes | The meshes that were created. |
Recursively processes a node. It will output a blowbox Entity.
- Parameters
-
[in] | node | The aiNode that should be processed. |
[in] | parent | The parent of this node. |
[in] | available_meshes | An array of meshes from which the meshes should be picked as defined by the node. |
void blowbox::ModelFactory::ProcessVertices |
( |
aiMesh * |
mesh, |
|
|
Vector< Vertex > * |
out_vertices |
|
) |
| |
|
staticprotected |
Converts the vertices in a aiMesh to blowbox vertices.
- Parameters
-
[in] | mesh | The mesh from which the vertices should be processed. |
[out] | out_vertices | The vertices that were converted. |
The documentation for this class was generated from the following files:
- C:/Projects/blowbox-2017/src/content/model_factory.h
- C:/Projects/blowbox-2017/src/content/model_factory.cc