GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::resource::Model::Instance Struct Reference

Mesh instance in a model. More...

#include <GREM/resource/Model.hpp>

Public Attributes

MaterialIndex materialIndex
 Index of the instance's material, or an out-of-range index if the instance uses the default material.
MeshIndex meshIndex
 Index of the instance's mesh.
ValueOffset skinDataOffset
 Index of the first 4-byte value in the skin data in the model.
MorphTargetWeightIndex morphTargetWeightOffset
 Offset of the initial morph target weights of the instance, or 0 if not morphed.
JointIndex jointIndex
 Index of the joint that the instance is attached to.
InstanceFlags instanceFlags
 Instance flags of the instance.

Detailed Description

Mesh instance in a model.

Member Data Documentation

◆ materialIndex

MaterialIndex grem::resource::Model::Instance::materialIndex

Index of the instance's material, or an out-of-range index if the instance uses the default material.

◆ meshIndex

MeshIndex grem::resource::Model::Instance::meshIndex

Index of the instance's mesh.

◆ skinDataOffset

ValueOffset grem::resource::Model::Instance::skinDataOffset

Index of the first 4-byte value in the skin data in the model.

After this offset, the skin data is stored in the following order:

  • Inverse bind-pose matrices, model.bindPose.localJoints.size() values of type 'mat4', if the mesh's vertexFlags contains VERTEX_SKINNED.
Note
The vertexFlags are stored in the instance's mesh, which is referenced by meshIndex.

◆ morphTargetWeightOffset

MorphTargetWeightIndex grem::resource::Model::Instance::morphTargetWeightOffset

Offset of the initial morph target weights of the instance, or 0 if not morphed.

◆ jointIndex

JointIndex grem::resource::Model::Instance::jointIndex

Index of the joint that the instance is attached to.

◆ instanceFlags

InstanceFlags grem::resource::Model::Instance::instanceFlags

Instance flags of the instance.


The documentation for this struct was generated from the following file: