Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::Loaders::GltfLoader::GltfMeshData Struct Reference

Mesh data extracted from a glTF mesh node. More...

#include <GltfLoader.h>

Collaboration diagram for Engine::Assets::Loaders::GltfLoader::GltfMeshData:

Public Member Functions

 GltfMeshData (const tinygltf::Model &model, const tinygltf::Mesh &mesh, const tinygltf::Node &node, const glm::mat4 &transform)
 Parses one mesh node into engine primitive data.
std::vector< GltfMeshPrimitiveDatagetPrimitives () const
 Gets a copy of parsed primitives.
std::vector< GltfMeshPrimitiveData > & getPrimitivesRef ()
 Gets mutable parsed primitives.
std::string getName () const
 Gets the mesh node name.
glm::mat4 getTransform () const
 Gets the model matrix for the object from the file it was imported from.
int getSkinIndex () const
 Gets the glTF skin index referenced by the mesh node.

Private Attributes

std::string name
tinygltf::Mesh mesh
std::vector< GltfMeshPrimitiveDataprimitives
glm::mat4 transform
int skinIndex = -1
 glTF skin index (-1 = no skin)

Detailed Description

Mesh data extracted from a glTF mesh node.

Definition at line 821 of file GltfLoader.h.

Constructor & Destructor Documentation

◆ GltfMeshData()

Engine::Assets::Loaders::GltfLoader::GltfMeshData::GltfMeshData ( const tinygltf::Model & model,
const tinygltf::Mesh & mesh,
const tinygltf::Node & node,
const glm::mat4 & transform )

Parses one mesh node into engine primitive data.

Parameters
modelSource glTF model.
meshglTF mesh referenced by the node.
nodeglTF node that owns the mesh instance.
transformNode transform matrix in model space.

References mesh, and transform.

Member Function Documentation

◆ getName()

std::string Engine::Assets::Loaders::GltfLoader::GltfMeshData::getName ( ) const
inlinenodiscard

Gets the mesh node name.

Returns
Name imported from the glTF node.

Definition at line 859 of file GltfLoader.h.

References name.

◆ getPrimitives()

std::vector< GltfMeshPrimitiveData > Engine::Assets::Loaders::GltfLoader::GltfMeshData::getPrimitives ( ) const
inlinenodiscard

Gets a copy of parsed primitives.

Returns
Primitive data for this mesh.

Definition at line 841 of file GltfLoader.h.

References primitives.

◆ getPrimitivesRef()

std::vector< GltfMeshPrimitiveData > & Engine::Assets::Loaders::GltfLoader::GltfMeshData::getPrimitivesRef ( )
inlinenodiscard

Gets mutable parsed primitives.

Returns
Primitive data for this mesh.

Definition at line 850 of file GltfLoader.h.

References primitives.

◆ getSkinIndex()

int Engine::Assets::Loaders::GltfLoader::GltfMeshData::getSkinIndex ( ) const
inlinenodiscard

Gets the glTF skin index referenced by the mesh node.

Returns
Skin index, or -1 when the node has no skin.

Definition at line 881 of file GltfLoader.h.

References skinIndex.

◆ getTransform()

glm::mat4 Engine::Assets::Loaders::GltfLoader::GltfMeshData::getTransform ( ) const
inlinenodiscard

Gets the model matrix for the object from the file it was imported from.

Returns
the scene transform from the 3d model file
Date
2025-05-31
Author
Konstantin Passig

Definition at line 872 of file GltfLoader.h.

References transform.

Member Data Documentation

◆ mesh

tinygltf::Mesh Engine::Assets::Loaders::GltfLoader::GltfMeshData::mesh
private

Definition at line 888 of file GltfLoader.h.

Referenced by GltfMeshData().

◆ name

std::string Engine::Assets::Loaders::GltfLoader::GltfMeshData::name
private

Definition at line 887 of file GltfLoader.h.

Referenced by getName().

◆ primitives

std::vector<GltfMeshPrimitiveData> Engine::Assets::Loaders::GltfLoader::GltfMeshData::primitives
private

Definition at line 889 of file GltfLoader.h.

Referenced by getPrimitives(), and getPrimitivesRef().

◆ skinIndex

int Engine::Assets::Loaders::GltfLoader::GltfMeshData::skinIndex = -1
private

glTF skin index (-1 = no skin)

Definition at line 891 of file GltfLoader.h.

Referenced by getSkinIndex().

◆ transform

glm::mat4 Engine::Assets::Loaders::GltfLoader::GltfMeshData::transform
private

Definition at line 890 of file GltfLoader.h.

Referenced by getTransform(), and GltfMeshData().


The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Mesh/GltfLoader.h