esp::assets::MeshMetaData struct

Stores meta data for an asset possibly containing multiple meshes, materials, textures, and a heirarchy of component transform relationships.

As each type of data may contain a few items, we save the start index, and the end index (of each type) as a pair. In current implementation: ptex mesh: meshes_ (1 item), textures_ (0 item), materials_ (0 item); instance mesh: meshes_ (1 item), textures_ (0 item), materials_ (0 item); gltf_mesh, glb_mesh: meshes_ (i items), textures (j items), materials_ (k items), i, j, k = 0, 1, 2 ...

Public types

using start = int
Start index of a data type in the global asset datastructure.
using end = int
End index of a data type in the global asset datastructure.

Constructors, destructors, conversion operators

MeshMetaData()
Default constructor.
MeshMetaData(int meshStart, int meshEnd, int textureStart = ID_UNDEFINED, int textureEnd = ID_UNDEFINED, int materialStart = ID_UNDEFINED, int materialEnd = ID_UNDEFINED)
Constructor.

Public functions

void setMeshIndices(int meshStart, int meshEnd)
Sets the mesh indices for the asset See ResourceManager::meshes_.
void setTextureIndices(int textureStart, int textureEnd)
Sets the texture indices for the asset. See ResourceManager::textures_.
void setMaterialIndices(int materialStart, int materialEnd)
Sets the material indices for the asset. See ResourceManager::materials_.

Public variables

std::pair<start, end> meshIndex
Index range (inclusive) of mesh data for the asset in the global asset datastructure.
std::pair<start, end> textureIndex
Index range (inclusive) of texture data for the asset in the global asset datastructure.
std::pair<start, end> materialIndex
Index range (inclusive) of material data for the asset in the global asset datastructure.
MeshTransformNode root
The root of the mesh component transformation heirarchy tree which stores the relationship between components of the asset.

Function documentation

void esp::assets::MeshMetaData::setMeshIndices(int meshStart, int meshEnd)

Sets the mesh indices for the asset See ResourceManager::meshes_.

Parameters
meshStart First index for asset mesh data in the global mesh datastructure.
meshEnd Final index for asset mesh data in the global mesh datastructure.

void esp::assets::MeshMetaData::setTextureIndices(int textureStart, int textureEnd)

Sets the texture indices for the asset. See ResourceManager::textures_.

Parameters
textureStart First index for asset texture data in the global texture datastructure.
textureEnd Final index for asset texture data in the global texture datastructure.

void esp::assets::MeshMetaData::setMaterialIndices(int materialStart, int materialEnd)

Sets the material indices for the asset. See ResourceManager::materials_.

Parameters
materialStart First index for asset material data in the global material datastructure.
materialEnd Final index for asset material data in the global material datastructure.