World-space transformation of a model.
More...
#include <GREM/resource/Model.hpp>
|
| 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.
|
World-space transformation of a model.
◆ operator TransformationReference()
Get a reference to the transformation.
- Returns
- the transformation reference.
◆ operator TransformationView()
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
-
| rootTransformation | world-space transformation of the root joint. |
| localJoints | local joints of the pose. Must have a size equal to the number of joint matrices in the transformation. |
| localMorphTargetWeights | morph target weights of the pose. Must have a size equal to the number of morph target weights in the transformation. |
| modelJointParentIndices | indices 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
-
| localJoints | local joints of the pose. Must have a size equal to the number of joint matrices in the transformation. |
| localMorphTargetWeights | local morph target weights of the pose. Must have a size equal to the number of morph target weights in the transformation. |
| modelJointParentIndices | indices 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. |
◆ 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: