Passing constraints

When passing position and/or orientation constraints from source animation to IKinema controlled avatar, the procedure requires two steps:

A. At a match pose, where the source animation and the target avatar have similar mesh deformation in world space, calculate match transformations as follows:

//For Position Task			
FIK::Vector sourcePos(srcSeg->getGlobalPos());
FIK::Vector targetPos(targetSeg->getGlobalPos());
posOffset = targetPos -sourcePos ;
//For Orientation Task
FIK::Quaternion sourceQuat(srcSeg->getGlobalQ());
FIK::Quaternion targetQuat(targetSeg->getGlobalQ());
rotOffset = sourceQuat.inverse()*targetQuat;
Note that if the source animation and the target avatar are the same character in terms of bone size and count, 
then the Offsets calculated above would be identity, therefore this procedure is required only when passing
constraints from characters in different dimensions.

B. At every frame when the task needs updating, the offset above needs to be applied as

//For Position Task
FIK::Vector targetPos = srcPos + posOffset; 
m_Pos->setTarget(targetPos[0],targetPos[1],targetPos[2]);
//For Orientation Task
FIK::Quaternion targetQuat = srcQuat * rotOffset;
m_Orient->setTarget(targetQuat[0],targetQuat[1],targetQuat[2],targetQuat[3]);