This section describes the functions used to perform a full-body IK solving.
To use full-body IK for a character, you must have already created an HIKCharacter object that defines your character. You need to create an HIKCharacterState for your character, and set the transform matrix of each Node in the HIKCharacterState to match the current pose of the character in your game. You must create an HIKEffectorSetState that defines the IK goal points for the character's body, values for the constraints (Reach Translation, Reach Rotation, Pull and Resist) that control how the IK solver balances the IK goal points, and the solving steps that the IK solver is to perform. Finally, you must create a Property Set State that defines a set of optional configuration parameters for the solver. You must then pass all of these objects to the HIKSolveForEffectorSet() function to perform the solve. The solver stores its results in the same HIKCharacterState you pass in.
Modules | |
Low-LoD Full-Body IK | |
This page details the functions used to perform full-body IK solving for a character with a low level of detail. | |
Full-Body IK solver | |
This page details the functions used to perform full-body IK solving for Creatures. | |
Functions | |
void | HIKSolveForEffectorSet (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Solve character pCharacter with HIKEffectorSetState pEffectorSetState and initial HIKCharacterState pCharacterState , storing results in pCharacterState . More... | |
void | HIKSolveForEffectorSetBegin (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Initializes an IK solve for character pCharacter . More... | |
void | HIKSolveForEffectorSetFloorContactApprox (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the floor contact approximation solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetBodyPull (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the pull solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetArmsAndLegs (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the arms, legs and shoulders IK solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetFingersAndToes (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the fingers and toes IK solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetHeadAndNeck (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the head and neck IK solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetFloorContact (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the floor solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetHipsTranslation (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the special hips translation solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetRollExtraction (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the roll extraction solver for character pCharacter . More... | |
void | HIKSolveForEffectorSetModifiers (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertyState) |
Call the Mirror and Lock modifiers for character pCharacter . More... | |
void | HIKCreatureSolveForEffectorSet (HIKCreature *pCreature, HIKCreatureState *pCreatureState, HIKCreatureEffectorSetState *pEffectorSetState) |
Solve creature pCreature with HIKCreatureEffectorSetState pEffectorSetState and initial HIKCreatureState pCreatureState , storing results in pCreatureState . More... | |
void HIKCreatureSolveForEffectorSet | ( | HIKCreature * | pCreature, |
HIKCreatureState * | pCreatureState, | ||
HIKCreatureEffectorSetState * | pEffectorSetState | ||
) |
Solve creature pCreature
with HIKCreatureEffectorSetState pEffectorSetState
and initial HIKCreatureState pCreatureState
, storing results in pCreatureState
.
You can enable or disable different parts of the solver by calling the HIKSetIKSolvingStep() function to set the solving step in HIKCreatureEffectorSetState pEffectorSetState
.
You can re-use the same HIKCreatureEffectorSetState over multiple calls to this function, changing the position, rotation and IK constraints of only the Effectors you need to modify.
Only Effectors with a Reach Translation or Reach Rotation value greater than 0 are taken into account.
pCreature | Creature to solve. | |
pEffectorSetState | HIKCreatureEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCreatureState | HIKCreatureState containing the initial FK pose for your creature, which may influence the IK solution. |
void HIKSolveForEffectorSet | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Solve character pCharacter
with HIKEffectorSetState pEffectorSetState
and initial HIKCharacterState pCharacterState
, storing results in pCharacterState
.
The HIKSolveForEffectorSet() function calls the following functions in order:
You can enable or disable different parts of the solver by calling the HIKSetIKSolvingStep() function to set the solving step in HIKEffectorSetState pEffectorSetState
.
You can re-use the same HIKEffectorSetState over multiple calls to this function, changing the position, rotation and IK constraints of only the Effectors you need to modify.
Only Effectors with a Reach Translation or Reach Rotation value greater than 0 are taken into account.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetArmsAndLegs | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the arms, legs and shoulders IK solver for character pCharacter
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetBegin | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Initializes an IK solve for character pCharacter
.
When not using the global HIKSolveForEffectorSet() function, you must start each IK solve with a call to HIKSolveForEffectorSetBegin(). After this you can call one or more functions from the following list:
pCharacter | Character to prepare. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetBodyPull | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the pull solver for character pCharacter
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetFingersAndToes | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the fingers and toes IK solver for character pCharacter
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetFloorContact | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the floor solver for character pCharacter
.
This solver move the wrist, ankle, fingers and toes above the floor position. Floor contact must be enabled into the Properties State pPropertyState
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetFloorContactApprox | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the floor contact approximation solver for character pCharacter
.
This solver moves the wrists and ankles to approximate locations above the floor position, if floor contact is enabled in the HIKPropertySetState pPropertyState
.
This function should be called before the pull solver, to avoid having the feet and hands pulled below the floor.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetHeadAndNeck | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the head and neck IK solver for character pCharacter
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetHipsTranslation | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the special hips translation solver for character pCharacter
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetModifiers | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the Mirror and Lock modifiers for character pCharacter
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |
void HIKSolveForEffectorSetRollExtraction | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
HIKEffectorSetState * | pEffectorSetState, | ||
const HIKPropertySetState * | pPropertyState | ||
) |
Call the roll extraction solver for character pCharacter
.
pCharacter | Character to solve. | |
pEffectorSetState | HIKEffectorSetState containing the IK goal points and IK constraint values. | |
[in,out] | pCharacterState | HIKCharacterState containing the initial FK pose for your character, which may influence the IK solution. |
pPropertyState | HIKPropertySetState containing all character properties for the character. |