Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
GltfSpawner.h
1#pragma once
2#include <filesystem>
3#include <vector>
4
5#include "Engine/Entity/Scene.h"
6#include "Engine/Entity/StaticMeshActor.h"
7
8namespace Engine::Entities {
16 public:
24 template<typename ActorT = StaticMeshActor>
25 static std::vector<ActorT*> spawnAll( Scene * scene, const std::filesystem::path & gltfPath )
26 {
27 return Scene::spawnAll<ActorT>( scene, gltfPath );
28 }
29
37 template<typename ActorT = StaticMeshActor>
38 static std::vector<ActorT*> spawnAll( Scene * scene, Assets::GltfHandle gltf )
39 {
40 return Scene::spawnAll<ActorT>( scene, gltf );
41 }
42 };
43}
Utility class for spawning GLTF meshes into a scene.
Definition GltfSpawner.h:15
static std::vector< ActorT * > spawnAll(Scene *scene, const std::filesystem::path &gltfPath)
Spawns one actor for each mesh node in a GLTF file.
Definition GltfSpawner.h:25
static std::vector< ActorT * > spawnAll(Scene *scene, Assets::GltfHandle gltf)
Spawns one actor for each mesh node in a loaded GLTF asset.
Definition GltfSpawner.h:38
Owns scene entities, actor lifetime, and the scene graph root.
Definition Scene.h:84
static std::vector< ActorT * > spawnAll(Scene *scene, const std::filesystem::path &gltfPath)
Spawns one actor for each mesh node in a GLTF file.
Definition Scene.h:219
AssetHandle< GltfHandleTag > GltfHandle
Handle to a glTF container file.