Solving for bone stretch

IKinema engine can derive both rotational and tranalstional (stretch) infromation based on given constraints.

Stretch IK can be enabled using

virtual void setActiveDofs(bool x, bool y, bool z, bool rotation=true) = 0;

For example, to enable stretch on bone "hand.L" along Z-local axis, the following is needed

g_pIKinemaSolver->getSegment("hand.L")->setActiveDofs(false,false,true,false);//Z translational dof

The new position of the bone (in addition to orientation of the boone) can be derived from

const FIK::Vector pos=g_pIKinemaSolver->getSegment("hand.L")->getPos(); 

The strecth stiffness can be controlled using

Segment::setWeight

where the first three ids (0-2) control rotational mobility/stiffness and the remaining ids (3-5) copntrol stretch stiffness.