Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Entities::GltfSpawner Class Reference

Utility class for spawning GLTF meshes into a scene. More...

#include <GltfSpawner.h>

Static Public Member Functions

template<typename ActorT = StaticMeshActor>
static std::vector< ActorT * > spawnAll (Scene *scene, const std::filesystem::path &gltfPath)
 Spawns one actor for each mesh node in a GLTF file.
template<typename ActorT = StaticMeshActor>
static std::vector< ActorT * > spawnAll (Scene *scene, Assets::GltfHandle gltf)
 Spawns one actor for each mesh node in a loaded GLTF asset.

Detailed Description

Utility class for spawning GLTF meshes into a scene.

Can be used from Scene::loadContent() or from within Actor classes to spawn assemblies of meshes (e.g., a turret with multiple moving parts).

Definition at line 15 of file GltfSpawner.h.

Member Function Documentation

◆ spawnAll() [1/2]

template<typename ActorT = StaticMeshActor>
std::vector< ActorT * > Engine::Entities::GltfSpawner::spawnAll ( Scene * scene,
Assets::GltfHandle gltf )
inlinestatic

Spawns one actor for each mesh node in a loaded GLTF asset.

Template Parameters
ActorTActor type to spawn. Defaults to StaticMeshActor.
Parameters
sceneScene that owns the spawned actors.
gltfLoaded GLTF asset handle.
Returns
Spawned actors in mesh-node order.

Definition at line 38 of file GltfSpawner.h.

References Engine::Entities::Scene::spawnAll().

Here is the call graph for this function:

◆ spawnAll() [2/2]

template<typename ActorT = StaticMeshActor>
std::vector< ActorT * > Engine::Entities::GltfSpawner::spawnAll ( Scene * scene,
const std::filesystem::path & gltfPath )
inlinestatic

Spawns one actor for each mesh node in a GLTF file.

Template Parameters
ActorTActor type to spawn. Defaults to StaticMeshActor.
Parameters
sceneScene that owns the spawned actors.
gltfPathPath to the GLTF/GLB asset.
Returns
Spawned actors in mesh-node order.

Definition at line 25 of file GltfSpawner.h.

References Engine::Entities::Scene::spawnAll().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Entity/GltfSpawner.h