Setting up the rig by adding Position and Orientation Tasks / Constraints

To add constraints, or to build your rig you need to just call the follownig API calls on the selected bones.

FIK::IKPositionTask *mLeftHandTask, *mRightHandTask, *mLeftFootTask, *mRightFootTask, *mChestTask ;
FIK::IKOrientationTask *mLeftHandTask, *mRightHandTask, *mLeftFootTask, *mRightFootTask, *mChestTask ;
FIK::IKOrientationTask *mHeadTask;

Add the tasks to the solver for position

mLeftHandTask = mSolver->addPositionTask( /*NAME OF LEFT_HAND BONE */ );
mRightHandTask = mSolver->addPositionTask( /*NAME OF RIGHT_HAND BONE */ );
mLeftFootTask= mSolver->addPositionTask( /*NAME OF LEFT_FOOT BONE */ );
mRightFootTask= mSolver->addPositionTask( /*NAME OF RIGHT_FOOT BONE */ );
mChestTask= mSolver->addPositionTask ( /*NAME OF CHEST BONE */ );

and orientation

mLeftHandTask = mSolver->addOrientationTask( /*NAME OF LEFT_HAND BONE */ );
mRightHandTask = mSolver->addOrientationTask( /*NAME OF RIGHT_HAND BONE */ );
mLeftFootTask= mSolver->addOrientationTask( /*NAME OF LEFT_FOOT BONE */ );
mRightFootTask= mSolver->addOrientationTask( /*NAME OF RIGHT_FOOT BONE */ );
mChestTask= mSolver->addOrientationTask ( /*NAME OF CHEST BONE */ );

mHeadTask = mSolver->addOrientationTask( /*NAME OF HEAD BONE */ );

Your rig is now ready! You can start passing world demands and animate the figure. To start, take world positions and orientations from the source animation for the selected bones and add pass them as demands to the target skeleton. 


At that stage you should see again your avatar following exactly the source animation.


Note: All IKinema Tasks are in World space, i.e. in respect to the parent of the root that is the parent of all 
bones used when setting up the solver. If root's parent is World, then all tasks are in World space. If the the
root has a parent, then the tasks will be in respect to this parent of the root space. For example if you have
(World)->root->spine1->spine2-> etc. and you populate the solver from root->spine1->spine2->... then all tasks
will be in World, but if you have (World)->BONE->root->spine1->spine2-> and you populate the solver from
root->spine1->spine2->... then your tasks are in respect to BONE space.