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

World-space transformation of a model. More...

#include <GREM/resource/Model.hpp>

Public Member Functions

constexpr operator TransformationReference () noexcept
 Get a reference to the transformation.
constexpr operator TransformationView () const noexcept
 Get a read-only view over the transformation.
void assign (const mat4 &rootTransformation, Span< const Joint > localJoints, Span< const float > localMorphTargetWeights, Span< const JointIndex > modelJointParentIndices)
 Assign new joints and morph target weights to the transformation according to a local pose, relative to a new root transformation.
void pose (Span< const Joint > localJoints, Span< const float > localMorphTargetWeights, Span< const JointIndex > modelJointParentIndices)
 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

ArrayList< mat4 > jointMatrices {}
 World-space transformations of the joints in the model.
ArrayList< bool > jointsVisible {}
 Whether each joint in the model is currently visible.
ArrayList< float > morphTargetWeights {}
 Morph target weights of the model.

Detailed Description

World-space transformation of a model.

Member Function Documentation

◆ operator TransformationReference()

grem::resource::Model::Transformation::operator TransformationReference ( )
inlineconstexprnoexcept

Get a reference to the transformation.

Returns
the transformation reference.

◆ operator TransformationView()

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

Get a read-only view over the transformation.

Returns
the transformation view.

◆ assign()

void grem::resource::Model::Transformation::assign ( const mat4 & rootTransformation,
Span< const Joint > localJoints,
Span< const float > localMorphTargetWeights,
Span< const JointIndex > modelJointParentIndices )
inline

Assign new joints and morph target weights to the transformation according to a local pose, relative to a new root transformation.

Parameters
rootTransformationworld-space transformation of the root joint.
localJointslocal joints of the pose. Must have a size equal to the number of joint matrices in the transformation.
localMorphTargetWeightsmorph 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.

◆ pose()

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

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

ArrayList<mat4> grem::resource::Model::Transformation::jointMatrices {}

World-space transformations of the joints in the model.

◆ jointsVisible

ArrayList<bool> grem::resource::Model::Transformation::jointsVisible {}

Whether each joint in the model is currently visible.

◆ morphTargetWeights

ArrayList<float> grem::resource::Model::Transformation::morphTargetWeights {}

Morph target weights of the model.


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