#include <GltfLoader.h>
Definition at line 31 of file GltfLoader.h.
◆ GltfLoader()
| Engine::Assets::Loaders::GltfLoader::GltfLoader |
( |
NamedThreadPool * | threadPool = nullptr | ) |
|
◆ ~GltfLoader()
| Engine::Assets::Loaders::GltfLoader::~GltfLoader |
( |
| ) |
|
◆ getPrimitiveVertices()
| std::vector< Vertex > Engine::Assets::Loaders::GltfLoader::getPrimitiveVertices |
( |
const tinygltf::Primitive & | primitive | ) |
|
◆ load()
| void Engine::Assets::Loaders::GltfLoader::load |
( |
const std::filesystem::path & | path, |
|
|
std::vector< GltfMeshData > & | meshes ) const |
Loads a vector of meshes from a gltf file.
- Parameters
-
| path | Where to load the asset from (preferably a relative path like: "assets/Engine/geometry/LightDemo/LightDemo.gltf" for engine assets) |
| meshes | The loaded meshes from the file |
- Note
- Use relative paths or else you will get issues with assets not loading on different systems "assets/Engine/geometry/LightDemo/LightDemo.gltf" engine asset "assets/AirHockey/geometry/.../<asset>.gltf" game asset
◆ loadAnimationData()
| Animation Engine::Assets::Loaders::GltfLoader::loadAnimationData |
( |
const tinygltf::Model & | model, |
|
|
int | animIndex, |
|
|
const Assets::Skin & | skin ) |
|
static |
Load animation data from a glTF model.
Extracts keyframe tracks, maps target nodes to joint indices via the provided SkinAsset, and computes total duration.
- Parameters
-
| model | The loaded glTF model |
| animIndex | Index into model.animations[] |
| skin | The SkinAsset to map node indices to joint indices |
- Returns
- Populated AnimationAsset
◆ loadAsync()
| tinygltf::Model Engine::Assets::Loaders::GltfLoader::loadAsync |
( |
const std::filesystem::path & | path | ) |
const |
◆ loadMetadataOnly()
| tinygltf::Model Engine::Assets::Loaders::GltfLoader::loadMetadataOnly |
( |
const std::filesystem::path & | path | ) |
const |
Loads only the GLTF metadata (nodes, names, transforms) without loading buffer data.
This is a fast operation that parses only the JSON structure, skipping all binary buffer loading. Use this when you only need node names and transforms (e.g., for spawning actors before mesh data is fully loaded).
- Parameters
-
| path | Path to the GLTF/GLB file |
- Returns
- Parsed model with node metadata (buffers will be empty)
◆ loadModel()
| std::optional< tinygltf::Model > Engine::Assets::Loaders::GltfLoader::loadModel |
( |
const std::filesystem::path & | path | ) |
const |
◆ loadPrimitiveData()
◆ loadSkinData()
| Assets::Skin Engine::Assets::Loaders::GltfLoader::loadSkinData |
( |
const tinygltf::Model & | model, |
|
|
int | skinIndex ) |
|
static |
Load skin (skeleton) data from a glTF model.
Extracts joint hierarchy, inverse bind matrices, and joint names from the specified glTF skin.
- Parameters
-
| model | The loaded glTF model |
| skinIndex | Index into model.skins[] |
- Returns
- Populated SkinAsset
◆ threadPool
The documentation for this class was generated from the following file:
- /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Mesh/GltfLoader.h