ISkeletalAnimationBlender
Functions
Detailed Description
-
class
ISkeletalAnimationBlender
: public RED::IREDObject Skeletal animation blender interface.
@related Loading and Playing Skeletal Animations, class RED::ISkeletalAnimationController, function RED::Factory::CreateSkeletalAnimationBlender
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.
Public Functions
-
SET_CID
(CID_class_REDISkeletalAnimationBlender)
-
virtual RED_RC
AddController
(RED::Object *iAnimation) = 0 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
-
virtual RED_RC
RemoveController
(RED::Object *iAnimation) = 0 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
-
virtual RED_RC
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
-
virtual RED_RC
GetController
(RED::Object *&oController, unsigned int iControllerIndex) 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
-
virtual RED_RC
Clear
() = 0 Clears the animation blender by removing all the animation controllers.
Returns: RED_OK if the operation has succeeded, RED_FAIL otherwise
-
virtual RED_RC
AddSkinnedMeshToBlendTree
(RED::Object *iSkinnedMesh, bool iRecursive = 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
-
virtual RED_RC
RemoveSkinnedMeshFromBlendTree
(RED::Object *iSkinnedMesh, bool iRecursive = 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
-
virtual RED_RC
ClearSkinnedMeshesFromBlendTree
(bool iRecursive = true) = 0 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
-
virtual RED_RC
BlendTo
(RED::Object *iAnimation, double iDuration, double iBlendWeight = 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
-