class
Skeleton
Contains information about bones required for skeletal animation.
Public
Methods
GetPose
void GetPose(Matrix4 *outPose, LocalSkeletonPose &outLocalPose, const SkeletonMask &mask, const AnimationClip &clip, float time, bool loop = true)
Outputs a skeleton pose containing required transforms for transforming the skeleton to the values specified by the provided animation clip evaluated at the specified time.
- outPose
- Output pose containing the requested transforms. Must be pre-allocated with enough space to hold all the bone matrices of this skeleton.
- mask
- Mask that filters which skeleton bones are enabled or disabled.
- outLocalPose
- Output pose containing the local transforms. Must be pre-allocated with enough space to hold all the bone data of this skeleton.
- clip
- Clip to evaluate.
- time
- Time to evaluate the clip with.
- loop
- Determines should the time be looped (wrapped) if it goes past the clip start/end.
GetPose
void GetPose(Matrix4 *outPose, LocalSkeletonPose &outLocalPose, const SkeletonMask &mask, const AnimationStateLayer *layers, u32 layerCount)
Outputs a skeleton pose containing required transforms for transforming the skeleton to the values specified by the provided set of animation curves.
- outPose
- Output pose containing the requested transforms. Must be pre-allocated with enough space to hold all the bone matrices of this skeleton.
- mask
- Mask that filters which skeleton bones are enabled or disabled.
- outLocalPose
- Output pose containing the local transforms. Must be pre-allocated with enough space to hold all the bone data of this skeleton.
- layers
- One or multiple layers, containing one or multiple animation states to evaluate.
- layerCount
- Number of layers in the array.
GetBoneCount
u32 GetBoneCount() const
Returns the total number of bones in the skeleton.
GetBoneInfo
Returns information about a bone at the provided index.
GetRootBoneIndex
u32 GetRootBoneIndex() const
Searches all bones to find a root bone.
Returns -1 if no root can be found.
GetInvBindPose
const Matrix4 &GetInvBindPose(u32 index) const
Returns the inverse bind pose for the bone at the provided index.
CalcBoneTransform
Transform CalcBoneTransform(u32 index) const
Calculates the bind-pose transform of the bone at the specified index.
staticCreate
Creates a new Skeleton.
- bones
- An array of bones to initialize the skeleton with. Data will be copied.
- boneCount
- Number of bones in the array.
staticGetRttiStatic
static RTTIType *GetRttiStatic()
Private
Constructors
Skeleton
Skeleton() = default
Skeleton
Skeleton(BoneInformation *bones, u32 boneCount)
Fields
mNumBones
u32 mNumBones
mBoneTransforms
TArray<Transform> mBoneTransforms
mInvBindPoses
TArray<Matrix4> mInvBindPoses
mBoneInfo
TArray<SkeletonBoneInfo> mBoneInfo