Creating a Skeletal Animation Blender
A skeletal animation blender is an object used to combine several skeletal animations and mix their outputs dynamically. It is created using the RED::Factory
.
// Create a skeletal animation blender.
RED_RC rc;
RED::Object* animBlender = RED::Factory::CreateSkeletalAnimationBlender( *resmgr, rc );
RC_TEST( rc );
// It implements both interfaces.
RED::ISkeletalAnimationBlender* iblender = animBlender->As< RED::ISkeletalAnimationBlender >();
RED::ISkeletalAnimationController* iskeletalController = animBlender->As< RED::ISkeletalAnimationController >();
The destruction of the animation blender is done like this:
// Delete the skeletal animation blender.
RC_TEST( RED::Factory::DeleteInstance( animBlender, iresmgr->GetState() ) );