struct AnimationProxy

Represents a copy of the Animation data for use specifically on the animation thread.

Public

Constructors

AnimationProxy

AnimationProxy(u64 animationId)

Methods

~AnimationProxy

~AnimationProxy()

RebuildFull

void RebuildFull(const SPtr<Skeleton> &skeleton, const SkeletonMask &mask, Vector<AnimationClipInfo> &inOutClipInfos, const Vector<SceneObjectMappingCurveInfo> &sceneObjects, const SPtr<MorphShapes> &morphShapes)

Rebuilds the internal proxy data according to the newly assigned skeleton and clips.

This should be called whenever the animation skeleton changes.

skeleton
New skeleton to assign to the proxy.
mask
Mask that filters which skeleton bones are enabled or disabled.
inOutClipInfos
Potentially new clip infos that will be used for rebuilding the proxy. Once the method completes clip info layout and state indices will be populated for further use in the Update*() methods.
sceneObjects
A list of scene objects that are influenced by specific animation curves.
morphShapes
Morph shapes used for per-vertex animation.

RebuildClips

void RebuildClips(Vector<AnimationClipInfo> &inOutClipInfos, const Vector<SceneObjectMappingCurveInfo> &sceneObjects, const SPtr<MorphShapes> &morphShapes)

Rebuilds the internal proxy data according to the newly clips.

This should be called whenever clips are added or removed, or clip layout indices change.

inOutClipInfos
New clip infos that will be used for rebuilding the proxy. Once the method completes clip info layout and state indices will be populated for further use in the Update*() methods.
sceneObjects
A list of scene objects that are influenced by specific animation curves.
morphShapes
Morph shapes used for per-vertex animation.

UpdateClipInfos

void UpdateClipInfos(const Vector<AnimationClipInfo> &clipInfos)

Updates the proxy data with new information about the clips.

Caller must guarantee that clip layout didn't change since the last call to Rebuild*().

UpdateMorphChannelWeights

void UpdateMorphChannelWeights(const Vector<float> &weights)

Updates the proxy data with new weights used for morph shapes.

Caller must ensure the weights are ordered so they match with the morph shapes provided to the last Rebuild*() call.

UpdateTransforms

void UpdateTransforms(const Vector<SceneObjectMappingCurveInfo> &sceneObjects)

Updates the proxy data with new scene object transforms.

Caller must guarantee that clip layout didn't change since the last call to Rebuild*().

UpdateTime

void UpdateTime(const Vector<AnimationClipInfo> &clipInfos)

Updates the proxy data with new clip times.

Caller must guarantee that clip layout didn't change since the last call to Rebuild*().

Clear

void Clear()

Destroys all dynamically allocated objects.

Fields

AnimationId

u64 AnimationId

Layers

LayerCount

u32 LayerCount

Skeleton

SkeletonMask

SceneObjectCount

u32 SceneObjectCount

SceneObjectInfos

AnimatedSceneObjectInfo * SceneObjectInfos

SceneObjectTransforms

Matrix4 * SceneObjectTransforms

MorphChannelInfos

MorphChannelInfo * MorphChannelInfos

MorphShapeInfos

MorphShapeInfo * MorphShapeInfos

MorphChannelCount

u32 MorphChannelCount

MorphShapeCount

u32 MorphShapeCount

MorphVertexCount

u32 MorphVertexCount

MorphChannelWeightsDirty

bool MorphChannelWeightsDirty

Bounds

AABox Bounds

CullEnabled

bool CullEnabled

SampleStep

SkeletonPose

LocalSkeletonPose SkeletonPose

SceneObjectPose

LocalSkeletonPose SceneObjectPose

GenericCurveCount

u32 GenericCurveCount

GenericCurveOutputs

float * GenericCurveOutputs

WasCulled

bool WasCulled