Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::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 EngineCore::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
TexturegetColorTexturePtr () 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

Public Attributes

friend AssetManager

Private Attributes

uint32_t textureIndex = 0
TexturecolorTexturePtr = nullptr
tinygltf::Primitive primitive
GltfMaterialData materialData
std::vector< Vertexvertices
std::vector< uint32_t > indices

Detailed Description

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

Date
2025-05-31
Author
Konstantin Passig

Definition at line 350 of file GltfLoader.h.

Constructor & Destructor Documentation

◆ GltfMeshPrimitiveData() [1/2]

EngineCore::GltfLoader::GltfMeshPrimitiveData::GltfMeshPrimitiveData ( )
default

References primitive.

◆ GltfMeshPrimitiveData() [2/2]

EngineCore::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
Date
2025-05-31
Author
Konstantin Passig

Definition at line 636 of file GltfLoader.cpp.

References indices, materialData, Vertex::normal, Vertex::position, primitive, Vertex::textureCoordinate, TRACY_ZONE_SCOPED_NAMED, vertices, and EngineCore::GltfLoader::StaticMeshExtensions::vulkanSchneeExtension.

Member Function Documentation

◆ getColorTextureIndex()

uint32_t EngineCore::GltfLoader::GltfMeshPrimitiveData::getColorTextureIndex ( ) const
nodiscard

Definition at line 771 of file GltfLoader.cpp.

References textureIndex.

◆ getColorTexturePtr()

Texture * EngineCore::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
Date
2025-05-31
Author
Konstantin Passig

Definition at line 767 of file GltfLoader.cpp.

References colorTexturePtr.

◆ getIndices()

std::vector< uint32_t > EngineCore::GltfLoader::GltfMeshPrimitiveData::getIndices ( ) const
nodiscard

Gets the raw unprocessed list of all indices.

Returns
Index list of how to connect the vertices to tris
Date
2025-05-31
Author
Konstantin Passig

Definition at line 759 of file GltfLoader.cpp.

References indices.

◆ getMaterialData()

GltfLoader::GltfMaterialData EngineCore::GltfLoader::GltfMeshPrimitiveData::getMaterialData ( ) const
nodiscard

Definition at line 763 of file GltfLoader.cpp.

References materialData.

Referenced by EngineCore::Texture::createTexturePath(), and EngineCore::MeshPrimitive::MeshPrimitive().

Here is the caller graph for this function:

◆ getVertices()

std::vector< Vertex > EngineCore::GltfLoader::GltfMeshPrimitiveData::getVertices ( ) const
nodiscard

Gets a list of all unprocessed vertices of this primtitive.

Returns
List of all vertices of this primitive
Date
2025-05-31
Author
Konstantin Passig

Definition at line 755 of file GltfLoader.cpp.

References vertices.

Member Data Documentation

◆ AssetManager

friend EngineCore::GltfLoader::GltfMeshPrimitiveData::AssetManager

Definition at line 351 of file GltfLoader.h.

◆ colorTexturePtr

Texture* EngineCore::GltfLoader::GltfMeshPrimitiveData::colorTexturePtr = nullptr
private

Definition at line 405 of file GltfLoader.h.

Referenced by getColorTexturePtr().

◆ indices

std::vector<uint32_t> EngineCore::GltfLoader::GltfMeshPrimitiveData::indices
private

Definition at line 410 of file GltfLoader.h.

Referenced by getIndices(), and GltfMeshPrimitiveData().

◆ materialData

GltfMaterialData EngineCore::GltfLoader::GltfMeshPrimitiveData::materialData
private

Definition at line 408 of file GltfLoader.h.

Referenced by getMaterialData(), and GltfMeshPrimitiveData().

◆ primitive

tinygltf::Primitive EngineCore::GltfLoader::GltfMeshPrimitiveData::primitive
private

Definition at line 407 of file GltfLoader.h.

Referenced by GltfMeshPrimitiveData(), and GltfMeshPrimitiveData().

◆ textureIndex

uint32_t EngineCore::GltfLoader::GltfMeshPrimitiveData::textureIndex = 0
private

Definition at line 404 of file GltfLoader.h.

Referenced by getColorTextureIndex().

◆ vertices

std::vector<Vertex> EngineCore::GltfLoader::GltfMeshPrimitiveData::vertices
private

Definition at line 409 of file GltfLoader.h.

Referenced by getVertices(), and GltfMeshPrimitiveData().


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