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

Stores intermediate data from loading the asset from disk. These are the vertices, indices and material data. More...

#include <GltfLoader.h>

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

Public Member Functions

 GltfMeshPrimitiveData ()=default
 GltfMeshPrimitiveData (tinygltf::Model model, tinygltf::Primitive primitive, StaticMeshExtensions meshSettings)
 Extracts all relevant data from the tinygltf importer objects.
std::vector< VertexgetVertices () const
 Gets a list of all unprocessed vertices of this primtitive.
std::vector< uint32_t > getIndices () const
 Gets the raw unprocessed list of all indices.
GltfMaterialData getMaterialData () const
RuntimeTexturegetColorTexturePtr () const
 Gets the pointer to the primitive of the color texture. This is only a valid pointer after it has been set by the asset manager.
uint32_t getColorTextureIndex () const
const std::vector< BoneVertexData > & getBoneVertexData () const
bool hasSkinData () const

Private Attributes

uint32_t textureIndex = std::numeric_limits<uint32_t>::max()
RuntimeTexturecolorTexturePtr = nullptr
tinygltf::Primitive primitive
GltfMaterialData materialData
std::vector< Vertexvertices
std::vector< uint32_t > indices
std::vector< BoneVertexDataboneVertexData
 Empty for static meshes.

Detailed Description

Stores intermediate data from loading the asset from disk. These are the vertices, indices and material data.

Definition at line 395 of file GltfLoader.h.

Constructor & Destructor Documentation

◆ GltfMeshPrimitiveData() [1/2]

Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::GltfMeshPrimitiveData ( )
default

◆ GltfMeshPrimitiveData() [2/2]

Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::GltfMeshPrimitiveData ( tinygltf::Model model,
tinygltf::Primitive primitive,
StaticMeshExtensions meshSettings )

Extracts all relevant data from the tinygltf importer objects.

Parameters
modelthe 3d model which was loaded by tinygltf
primitivethe primitive in the 3d model from the tinygltf importer
meshSettings

References primitive.

Member Function Documentation

◆ getBoneVertexData()

const std::vector< BoneVertexData > & Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::getBoneVertexData ( ) const
inlinenodiscard

Definition at line 436 of file GltfLoader.h.

References boneVertexData.

◆ getColorTextureIndex()

uint32_t Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::getColorTextureIndex ( ) const
nodiscard

◆ getColorTexturePtr()

RuntimeTexture * Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::getColorTexturePtr ( ) const
nodiscard

Gets the pointer to the primitive of the color texture. This is only a valid pointer after it has been set by the asset manager.

Returns
Pointer to the texture of this primitive

◆ getIndices()

std::vector< uint32_t > Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::getIndices ( ) const
nodiscard

Gets the raw unprocessed list of all indices.

Returns
Index list of how to connect the vertices to tris

◆ getMaterialData()

GltfMaterialData Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::getMaterialData ( ) const
nodiscard

◆ getVertices()

std::vector< Vertex > Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::getVertices ( ) const
nodiscard

Gets a list of all unprocessed vertices of this primtitive.

Returns
List of all vertices of this primitive

◆ hasSkinData()

bool Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::hasSkinData ( ) const
inlinenodiscard

Definition at line 437 of file GltfLoader.h.

References boneVertexData.

Member Data Documentation

◆ boneVertexData

std::vector<BoneVertexData> Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::boneVertexData
private

Empty for static meshes.

Definition at line 447 of file GltfLoader.h.

Referenced by getBoneVertexData(), and hasSkinData().

◆ colorTexturePtr

RuntimeTexture* Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::colorTexturePtr = nullptr
private

Definition at line 441 of file GltfLoader.h.

◆ indices

std::vector<uint32_t> Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::indices
private

Definition at line 446 of file GltfLoader.h.

◆ materialData

GltfMaterialData Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::materialData
private

Definition at line 444 of file GltfLoader.h.

◆ primitive

tinygltf::Primitive Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::primitive
private

Definition at line 443 of file GltfLoader.h.

Referenced by GltfMeshPrimitiveData().

◆ textureIndex

uint32_t Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::textureIndex = std::numeric_limits<uint32_t>::max()
private

Definition at line 440 of file GltfLoader.h.

◆ vertices

std::vector<Vertex> Engine::Assets::Loaders::GltfLoader::GltfMeshPrimitiveData::vertices
private

Definition at line 445 of file GltfLoader.h.


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