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

Reference to a world-space transformation of a model. More...

#include <GREM/resource/Model.hpp>

Public Member Functions

constexpr operator TransformationView () const noexcept
 Get a read-only view over the transformation.
void pose (Span< const Joint > localJoints, Span< const float > localMorphTargetWeights, Span< const JointIndex > modelJointParentIndices) const
 Skin the non-root joints of the transformation according to a local pose, relative to the current root joint(s) of the transformation, and add a set of morph target weights to the current morph target weights of the transformation.

Public Attributes

mat4 * jointMatrices
 Non-owning pointer to the world-space transformations of the joints in the model.
bool * jointsVisible
 Non-owning pointer to the visibility flags of the joints in the model.
float * morphTargetWeights
 Non-owning pointer to the morph target weights of the model.

Detailed Description

Reference to a world-space transformation of a model.

Member Function Documentation

◆ operator TransformationView()

grem::resource::Model::TransformationReference::operator TransformationView ( ) const
inlineconstexprnoexcept

Get a read-only view over the transformation.

Returns
the transformation view.

◆ pose()

void grem::resource::Model::TransformationReference::pose ( Span< const Joint > localJoints,
Span< const float > localMorphTargetWeights,
Span< const JointIndex > modelJointParentIndices ) const

Skin the non-root joints of the transformation according to a local pose, relative to the current root joint(s) of the transformation, and add a set of morph target weights to the current morph target weights of the transformation.

Parameters
localJointslocal joints of the pose. Must have a size equal to the number of joint matrices in the transformation.
localMorphTargetWeightslocal morph target weights of the pose. Must have a size equal to the number of morph target weights in the transformation.
modelJointParentIndicesindices of each joint's parent joint in the joints array. Must have the same size as the joints array of the new pose. Each parent index, except the first, must be less than its own index. The first parent index must be 0.

Member Data Documentation

◆ jointMatrices

mat4* grem::resource::Model::TransformationReference::jointMatrices

Non-owning pointer to the world-space transformations of the joints in the model.

◆ jointsVisible

bool* grem::resource::Model::TransformationReference::jointsVisible

Non-owning pointer to the visibility flags of the joints in the model.

◆ morphTargetWeights

float* grem::resource::Model::TransformationReference::morphTargetWeights

Non-owning pointer to the morph target weights of the model.


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