|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
#include <GltfLoader.h>
Classes | |
| struct | GltfBufferDataView |
| struct | GltfMaterialData |
| Stores the material data which is relevant for our current set of shaders. More... | |
| struct | GltfMeshData |
| struct | GltfMeshPrimitiveData |
| Stores intermediate data from loading the asset from disk. These are the vertices, indices and material data. More... | |
| struct | GltfTextureData |
| struct | GltfVertexData |
| struct | MaterialExtensions |
| Stores all material extensions. So if another extension for some kind of specific material attribute is needed we can add it here. More... | |
| struct | StaticMeshExtensions |
| Parses all extensions and extracts recognized extensions. More... | |
| struct | StaticMeshSettings |
| struct | VulkanSchneeExtension |
| The vulkan schnee extension for gltf files stores all data related to the engines core functionality. More... | |
| struct | VulkanSchneeMaterialExtension |
| Extracts all material data from the gltf file. All data during runtime will be read from an object of this type. More... | |
Public Member Functions | |
| GltfLoader (NamedThreadPool *threadPool=nullptr) | |
| ~GltfLoader () | |
| std::vector< Vertex > | getPrimitiveVertices (const tinygltf::Primitive &primitive) |
| Ecs::PrimitiveData | loadPrimitiveData (GltfVertexData vertexData) |
| void | load (const std::filesystem::path &path, std::vector< GltfMeshData > &meshes) const |
| Loads a vector of meshes from a gltf file. | |
| std::optional< tinygltf::Model > | loadModel (const std::filesystem::path &path) const |
| tinygltf::Model | loadAsync (const std::filesystem::path &path) const |
| tinygltf::Model | loadMetadataOnly (const std::filesystem::path &path) const |
| Loads only the GLTF metadata (nodes, names, transforms) without loading buffer data. | |
Private Attributes | |
| NamedThreadPool * | threadPool = nullptr |
Definition at line 23 of file GltfLoader.h.
| EngineCore::GltfLoader::GltfLoader | ( | NamedThreadPool * | threadPool = nullptr | ) |
Definition at line 19 of file GltfLoader.cpp.
References threadPool.
| EngineCore::GltfLoader::~GltfLoader | ( | ) |
Definition at line 22 of file GltfLoader.cpp.
References threadPool.
| std::vector< Vertex > EngineCore::GltfLoader::getPrimitiveVertices | ( | const tinygltf::Primitive & | primitive | ) |
Definition at line 58 of file GltfLoader.cpp.
| void EngineCore::GltfLoader::load | ( | const std::filesystem::path & | path, |
| std::vector< GltfMeshData > & | meshes ) const |
Loads a vector of meshes from a gltf file.
| 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 |
Definition at line 801 of file GltfLoader.cpp.
References loadModel(), TRACY_LOCKABLE, TRACY_ZONE_SCOPED_NAMED, and EngineCore::UnpackOptional().
| tinygltf::Model EngineCore::GltfLoader::loadAsync | ( | const std::filesystem::path & | path | ) | const |
Definition at line 874 of file GltfLoader.cpp.
References TRACY_ZONE_SCOPED_NAMED.
| tinygltf::Model EngineCore::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).
| path | Path to the GLTF/GLB file |
Definition at line 905 of file GltfLoader.cpp.
References TRACY_ZONE_SCOPED_NAMED.
Referenced by EngineCore::GltfSpawner::spawnAll().
| std::optional< tinygltf::Model > EngineCore::GltfLoader::loadModel | ( | const std::filesystem::path & | path | ) | const |
Definition at line 848 of file GltfLoader.cpp.
References TRACY_ZONE_SCOPED_NAMED.
Referenced by load().
| Ecs::PrimitiveData EngineCore::GltfLoader::loadPrimitiveData | ( | GltfVertexData | vertexData | ) |
Definition at line 62 of file GltfLoader.cpp.
References EngineCore::GltfLoader::GltfVertexData::indexDataView, EngineCore::GltfLoader::GltfVertexData::lightmapDataView, Vertex::lightmapUvCoordinate, Vertex::normal, EngineCore::GltfLoader::GltfVertexData::normalDataView, Vertex::position, EngineCore::GltfLoader::GltfVertexData::positionDataView, Vertex::tangent, EngineCore::GltfLoader::GltfVertexData::tangentDataView, Vertex::textureCoordinate, TRACY_ZONE_SCOPED_NAMED, and EngineCore::GltfLoader::GltfVertexData::uvDataView.
|
private |
Definition at line 471 of file GltfLoader.h.
Referenced by GltfLoader(), and ~GltfLoader().