struct
#include <esp/assets/MeshMetaData.h>
MeshMetaData Stores meta data for an asset possibly containing multiple meshes, materials, textures, and a hierarchy 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: 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() defaulted
- Default constructor.
-
MeshMetaData(int meshStart,
int meshEnd,
int textureStart = ID_
UNDEFINED, int textureEnd = 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 setSkinIndices(int skinStart, int skinEnd)
- Sets the skin indices for the asset. See ResourceManager::
skins_. -
void setRootFrameOrientation(const geo::
CoordinateFrame& frame) - Set the root frame orientation based on passed frame.
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> skinIndex - Index range (inclusive) of skin data for the asset in the global asset datastructure.
- MeshTransformNode root
- The root of the mesh component transformation hierarchy 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:: setSkinIndices(int skinStart,
int skinEnd)
Sets the skin indices for the asset. See ResourceManager::
Parameters | |
---|---|
skinStart | First index for asset skin data in the global skin datastructure. |
skinEnd | Final index for asset skin data in the global skin datastructure. |
void esp:: assets:: MeshMetaData:: setRootFrameOrientation(const geo:: CoordinateFrame& frame)
Set the root frame orientation based on passed frame.
Parameters | |
---|---|
frame | target frame in world space |