struct
#include <esp/assets/MeshMetaData.h>
MeshMetaData Stores meta data for an asset possibly containing multiple meshes, materials, textures, and a heirarchy of component transform relationships.
Contents
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
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::
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::
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. |