Creating an Animation Clip Controller
An animation clip controller allows to play an animation clip. It is created thanks to the RED::Factory
.
// Create an animation clip controller to control a RED::AnimationClip.
RED_RC rc;
RED::Object* animController = RED::Factory::CreateAnimationClipController( *resmgr, clip, rc );
RC_TEST( rc );
RED::IAnimationClipController* ianimController = animController->As< RED::IAnimationClipController >();
The controller will allow to play the animation clip by calling its update function at each frame.
The destruction of the animation clip controller can be done like this:
// Delete the animation clip controller.
RC_TEST( RED::Factory::DeleteInstance( animController, iresmgr->GetState() ) );