class RED::ISkeletalAnimationBlender

Skeletal animation blender interface. More...

#include <REDISkeletalAnimationBlender.h>

Inherits: IREDObject.

Public functions:

virtual RED_RCAddController ( RED::Object * iAnimation ) = 0
virtual RED_RCAddSkinnedMeshToBlendTree ( RED::Object * iSkinnedMesh, bool iRecursive = true ) = 0
virtual RED_RCBlendTo ( RED::Object * iAnimation, double iDuration, double iBlendWeight = 1.0 ) = 0
virtual RED_RCClear ( ) = 0
virtual RED_RCClearSkinnedMeshesFromBlendTree ( bool iRecursive = true ) = 0
virtual RED_RCGetController ( RED::Object *& oController, unsigned int iControllerIndex ) const = 0
virtual RED_RCGetControllersCount ( unsigned int & oControllersCount ) const = 0
virtual RED_RCRemoveController ( RED::Object * iAnimation ) = 0
virtual RED_RCRemoveSkinnedMeshFromBlendTree ( RED::Object * iSkinnedMesh, bool iRecursive = true ) = 0

Public static functions:

static RED::CIDGetClassID ( )

Detailed description:

Skeletal animation blender interface.

The animation blender is used to mix RED::ISkeletalAnimationController objects. It contains a list of animation controllers.

As the blender is also a RED::ISkeletalAnimationController itself, it allows to build an animation tree by using animation blenders inside another blender.

Only the root blender of the animation tree must be applied to the skeleton (see RED::ISkeletalAnimationController::SetIsAppliedToSkeleton). The child controllers results are stored internally.

Skeletal animation blender is created with RED::Factory::CreateSkeletalAnimationBlender.

Functions documentation

Adds a skeletal animation controller in the blender.

Parameters:

iAnimation:The RED::ISkeletalAnimationController object to add.

Returns:

RED_OK if the operation has succeeded,
RED_BAD_PARAM if iAnimation is incorrect,
RED_FAIL otherwise
public virtual RED_RC RED::ISkeletalAnimationBlender::AddSkinnedMeshToBlendTree(RED::Object *iSkinnedMesh,
booliRecursive = true
) = 0

Adds a skinned mesh to the controller and its children (recursively or not).

Parameters:

iSkinnedMesh:The skinned mesh to add (RED::ISkeletalAnimationController).
iRecursive:Add the skinned mesh to all the children recursively.

Returns:

RED_OK if the operation has succeeded,
RED_FAIL otherwise
public virtual RED_RC RED::ISkeletalAnimationBlender::BlendTo(RED::Object *iAnimation,
doubleiDuration,
doubleiBlendWeight = 1.0
) = 0

Blends from the current played animation to a new one.

This function fade-out all the animations of the same group as iAnimation currently played in the blender and fade-in iAnimation.

All the animations belonging to a different group than iAnimation are left untouched.

Parameters:

iAnimation:The RED::ISkeletalAnimationController object to blend to.
iDuration:Duration of the blending.
iBlendWeight:Target blend weight.

Returns:

RED_OK if the operation has succeeded,
RED_FAIL otherwise

Clears the animation blender by removing all the animation controllers.

Returns:

RED_OK if the operation has succeeded,
RED_FAIL otherwise

Removes all the skinned meshes from the blender and its children (recursively or not).

Parameters:

iRecursive:Remove the skinned meshes from all the children recursively.

Returns:

RED_OK if the operation has succeeded,
RED_FAIL otherwise
public virtual RED_RC RED::ISkeletalAnimationBlender::GetController(RED::Object *&oController,
unsigned intiControllerIndex
)const = 0

Gets a skeletal animation controller from the blender.

Parameters:

oController:Returned RED::ISkeletalAnimationController object.
iControllerIndex:Index of the controller to get.

Returns:

RED_OK if the operation has succeeded,
RED_BAD_PARAM if iControllerIndex is incorrect,
RED_FAIL otherwise
public virtual RED_RC RED::ISkeletalAnimationBlender::GetControllersCount(unsigned int &oControllersCount) const = 0

Gets the number of skeletal animation controllers in the blender.

Parameters:

oControllersCount:Returned number of controllers.

Returns:

RED_OK if the operation has succeeded,
RED_FAIL otherwise

Removes a skeletal animation controller from the blender.

Parameters:

iAnimation:The RED::ISkeletalAnimationController object to remove.

Returns:

RED_OK if the operation has succeeded,
RED_BAD_PARAM if iAnimation is incorrect,
RED_FAIL otherwise
public virtual RED_RC RED::ISkeletalAnimationBlender::RemoveSkinnedMeshFromBlendTree(RED::Object *iSkinnedMesh,
booliRecursive = true
) = 0

Removes a skinned mesh from the blender and its children (recursively or not).

Parameters:

iSkinnedMesh:The skinned mesh to remove (RED::ISkeletalAnimationController).
iRecursive:Remove the skinned mesh from all the children recursively.

Returns:

RED_OK if the operation has succeeded,
RED_FAIL otherwise