Creating a Skeletal Animation Clip Controller

A skeletal animation clip controller is an object merging the animation clip controller properties to the skeletal animation system. It allows to play skeletal animation clips and apply the result to a skeleton. It is created using the RED::Factory.

// Create a skeletal animation clip controller to control a RED::AnimationClip.
RED_RC rc;
RED::Object* animController = RED::Factory::CreateSkeletalAnimationClipController( *resmgr, clip, rc );
RC_TEST( rc );

// It implements both interfaces.
RED::IAnimationClipController* iclipController = animController->As< RED::IAnimationClipController >();
RED::ISkeletalAnimationController* iskeletalController = animController->As< RED::ISkeletalAnimationController >();

The destruction of the animation controller is done like this:

// Delete the skeletal animation clip controller.
RC_TEST( RED::Factory::DeleteInstance( animController, iresmgr->GetState() ) );