Vulkan Schnee 0.0.1 (22840dc8)
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< GltfMeshPrimitiveData > getPrimitives () 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 imported model transform for the mesh node.
int getSkinIndex () const
 Gets the glTF skin index referenced by the mesh node.

Private Attributes

std::string name
tinygltf::Mesh mesh
std::vector< GltfMeshPrimitiveData > primitives
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 1155 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 1193 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 1175 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 1184 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 1211 of file GltfLoader.h.

References skinIndex.

◆ getTransform()

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

Gets the imported model transform for the mesh node.

Returns
Node transform matrix parsed from the glTF file.

Definition at line 1202 of file GltfLoader.h.

References transform.

Member Data Documentation

◆ mesh

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

Definition at line 1218 of file GltfLoader.h.

Referenced by GltfMeshData().

◆ name

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

Definition at line 1217 of file GltfLoader.h.

Referenced by getName().

◆ primitives

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

Definition at line 1219 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 1221 of file GltfLoader.h.

Referenced by getSkinIndex().

◆ transform

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

Definition at line 1220 of file GltfLoader.h.

Referenced by getTransform(), and GltfMeshData().


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