Loading...
Searching...
No Matches
hellfire::ModelInstantiator Class Reference

Creates scene entities from an ImportResult. More...

#include <ModelInstantiator.h>

Collaboration diagram for hellfire::ModelInstantiator:

Public Member Functions

 ModelInstantiator (AssetManager &assets, AssetRegistry &registry)
 
EntityID instantiate (Scene &scene, AssetID model_asset_id, EntityID parent=INVALID_ENTITY)
 
EntityID instantiate (Scene &scene, const std::filesystem::path &hfmodel_path, EntityID parent=INVALID_ENTITY)
 
EntityID instantiate (Scene &scene, const ImportResult &model, EntityID parent=INVALID_ENTITY)
 

Private Member Functions

EntityID instantiate_node (Scene &scene, const ImportResult &model, size_t node_index, EntityID parent)
 
void attach_mesh_components (Entity *entity, const ImportedMesh &mesh_ref)
 

Private Attributes

AssetManagerassets_
 
AssetRegistryregistry_
 

Detailed Description

Creates scene entities from an ImportResult.

Definition at line 14 of file ModelInstantiator.h.

Constructor & Destructor Documentation

◆ ModelInstantiator()

hellfire::ModelInstantiator::ModelInstantiator ( AssetManager assets,
AssetRegistry registry 
)

Definition at line 13 of file ModelInstantiator.cpp.

Member Function Documentation

◆ attach_mesh_components()

void hellfire::ModelInstantiator::attach_mesh_components ( Entity entity,
const ImportedMesh mesh_ref 
)
private

Definition at line 101 of file ModelInstantiator.cpp.

◆ instantiate() [1/3]

EntityID hellfire::ModelInstantiator::instantiate ( Scene scene,
AssetID  model_asset_id,
EntityID  parent = INVALID_ENTITY 
)

Definition at line 18 of file ModelInstantiator.cpp.

◆ instantiate() [2/3]

EntityID hellfire::ModelInstantiator::instantiate ( Scene scene,
const ImportResult model,
EntityID  parent = INVALID_ENTITY 
)

Definition at line 40 of file ModelInstantiator.cpp.

◆ instantiate() [3/3]

EntityID hellfire::ModelInstantiator::instantiate ( Scene scene,
const std::filesystem::path &  hfmodel_path,
EntityID  parent = INVALID_ENTITY 
)

Definition at line 28 of file ModelInstantiator.cpp.

◆ instantiate_node()

EntityID hellfire::ModelInstantiator::instantiate_node ( Scene scene,
const ImportResult model,
size_t  node_index,
EntityID  parent 
)
private

Definition at line 51 of file ModelInstantiator.cpp.

Member Data Documentation

◆ assets_

AssetManager& hellfire::ModelInstantiator::assets_
private

Definition at line 28 of file ModelInstantiator.h.

◆ registry_

AssetRegistry& hellfire::ModelInstantiator::registry_
private

Definition at line 29 of file ModelInstantiator.h.


The documentation for this class was generated from the following files: