You can use the following functions to set or retrieve data for a single Effector in an HIKEffectorSetState. For each Effector, you can set not only its translation, orientation and scaling values along each axis, but also the values of its Reach, Pull and Resist IK constraints.
The functions listed below follow the naming conventions outlined under Data Representations and Function Variants. For additional details, see the description of each function in the API Reference.
Functions that use separate number arrays for translation, quaternion rotation and scaling values:
Functions that use transform matrices:
Functions that set IK constraints (Reach, Pull, Resist):
The following code uses the HIKSetEffectorStateTQSfv() and HIKGetEffectorStateTQSfv() functions to set the translation, quaternion rotation and scaling of the right hand Node, and to retrieve the same data for the left hand Node:
HIKSetEffectorStateTQSfv(MyEffState, RightHandEffectorId, myTargetPoint.GetTranslation() myTargetPoint.GetRotation() myTargetPoint.GetScale()); HIKSetTranslationActive(MyEffState, RightHandEffectorId, 1.0f); HIKSetRotationActive(MyEffState, RightHandEffectorId, 1.0f); HIKSetPull(MyEffState, RightHandEffectorId, 0.5f); ... const float trans[4]; const float rota[4]; const float scale[4]; const float reachT; const float reachR; const float pull; HIKGetEffectorStateTQSfv(MyEffState, LeftHandEffectorId, trans, rota, scale); HIKGetTranslationActive(MyEffState, LeftHandEffectorId, reachT); HIKGetRotationActive(MyEffState, LeftHandEffectorId, reachR); HIKGetPull(MyEffState, LeftHandEffectorId, pull);