Floor Contact

Module description

This section describes the functions used to set up floor contact for your characters.

Note that setting up floor contact also requires you to set up appropriate character properties in your HIKPropertySetState. For an overview of the HumanIK floor contact engine, and for complete instructions on the process of setting up floor contact, see ~{ Foot and Hand Contact }~.

Enumerations

enum  HIKFloorContact {
  HIKLeftHandFloor =0, HIKRightHandFloor, HIKLeftFootFloor, HIKRightFootFloor,
  HIKLastFloorId, HIKLeftHandFloor =0, HIKRightHandFloor, HIKLeftFootFloor,
  HIKRightFootFloor, HIKLastFloorId
}
 Lists the surfaces that can be controlled by the floor contact engine. More...
 

Functions

int HIKGetFloorContactPointPositionfv (const HIKCharacter *pCharacter, const HIKCharacterState *pState, const HIKPropertySetState *pPropertySetState, int pMemberIndex, int pContactIndex, float pT[4])
 Retrieve the translation in global space for one of the markers used by the floor contact engine to define the feet or hands of character pCharacter with HIKCharacterState pState. More...
 
int HIKGetFloorContactPointPositiondv (const HIKCharacter *pCharacter, const HIKCharacterState *pState, const HIKPropertySetState *pPropertySetState, int pMemberIndex, int pContactIndex, double pXForm[16])
 Retrieve the translation in global space for one of the markers used by the floor contact engine to define the feet or hands of character pCharacter with HIKCharacterState pState. More...
 
void HIKSetEffectorFloorStatefv (HIKEffectorSetState *pEffectorSetState, int pFloor, const float pXForm[16])
 Set the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 
void HIKSetEffectorFloorStatedv (HIKEffectorSetState *pEffectorSetState, int pFloor, const double pXForm[16])
 Set the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 
void HIKSetEffectorFloorStateTQfv (HIKEffectorSetState *pEffectorSetState, int pFloor, const float pT[4], const float pQ[4])
 Set the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 
void HIKSetEffectorFloorStateTQdv (HIKEffectorSetState *pEffectorSetState, int pFloor, const double pT[4], const double pQ[4])
 Set the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 
void HIKGetEffectorFloorStatefv (const HIKEffectorSetState *pEffectorSetState, int pFloor, float pXForm[16])
 Retrieve the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 
void HIKGetEffectorFloorStatedv (const HIKEffectorSetState *pEffectorSetState, int pFloor, double pXForm[16])
 Retrieve the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 
void HIKGetEffectorFloorStateTQfv (const HIKEffectorSetState *pEffectorSetState, int pFloor, float pT[4], float pQ[4])
 Retrieve the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 
void HIKGetEffectorFloorStateTQdv (const HIKEffectorSetState *pEffectorSetState, int pFloor, double pT[4], double pQ[4])
 Retrieve the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands. More...
 

Enumeration Type Documentation

Lists the surfaces that can be controlled by the floor contact engine.

Used when setting the transform matrix that defines the position of the floor for a limb. See HIKSetEffectorFloorStatefv() and HIKGetEffectorFloorStatefv().

See also
~{ Setting up Foot and Hand Contact }~.
Enumerator
HIKLeftHandFloor 

Left hand floor contact.

HIKRightHandFloor 

Right hand floor contact.

HIKLeftFootFloor 

Left foot floor contact.

HIKRightFootFloor 

Right foot floor contact.

HIKLastFloorId 

Marks the end of the enumeration.

HIKLeftHandFloor 

Left hand floor contact.

HIKRightHandFloor 

Right hand floor contact.

HIKLeftFootFloor 

Left foot floor contact.

HIKRightFootFloor 

Right foot floor contact.

HIKLastFloorId 

Marks the end of the enumeration.

Definition at line 326 of file humanik.h.

327 {
328  HIKLeftHandFloor=0,
333 };
Marks the end of the enumeration.
Definition: humanik.h:332
Left hand floor contact.
Definition: humanik.h:328
Right foot floor contact.
Definition: humanik.h:331
Left foot floor contact.
Definition: humanik.h:330
Right hand floor contact.
Definition: humanik.h:329

Function Documentation

void HIKGetEffectorFloorStatedv ( const HIKEffectorSetState pEffectorSetState,
int  pFloor,
double  pXForm[16] 
)

Retrieve the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that holds the floor orientation.
pFloorSpecifies the joint for which the floor orientation will be retrieved. See the HIKFloorContact enumeration for possible values.
[out]pXFormStores the transform matrix of the floor or oriented plane, in global space (4x4 column major matrix).
void HIKGetEffectorFloorStatefv ( const HIKEffectorSetState pEffectorSetState,
int  pFloor,
float  pXForm[16] 
)

Retrieve the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that holds the floor orientation.
pFloorSpecifies the joint for which the floor orientation will be retrieved. See the HIKFloorContact enumeration for possible values.
[out]pXFormStores the transform matrix of the floor or oriented plane, in global space (4x4 column major matrix).
void HIKGetEffectorFloorStateTQdv ( const HIKEffectorSetState pEffectorSetState,
int  pFloor,
double  pT[4],
double  pQ[4] 
)

Retrieve the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that holds the floor orientation.
pFloorSpecifies the joint for which the floor orientation will be retrieved. See the HIKFloorContact enumeration for possible values.
pTTranslation value to retrieve, in global space.
pQRotation value to retrieve, in global space.
+ Examples:
void HIKGetEffectorFloorStateTQfv ( const HIKEffectorSetState pEffectorSetState,
int  pFloor,
float  pT[4],
float  pQ[4] 
)

Retrieve the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that holds the floor orientation.
pFloorSpecifies the joint for which the floor orientation will be retrieved. See the HIKFloorContact enumeration for possible values.
pTTranslation value to retrieve, in global space.
pQRotation value to retrieve, in global space.
int HIKGetFloorContactPointPositiondv ( const HIKCharacter pCharacter,
const HIKCharacterState pState,
const HIKPropertySetState pPropertySetState,
int  pMemberIndex,
int  pContactIndex,
double  pXForm[16] 
)

Retrieve the translation in global space for one of the markers used by the floor contact engine to define the feet or hands of character pCharacter with HIKCharacterState pState.

For details on how these floor contact markers are calculated from character properties, see ~{ Foot and Hand Contact }~.

Parameters
pCharacterHIKCharacter.
pStateHIKCharacterState.
pPropertySetStateHIKPropertySetState defining the floor contact properties for the character. See the floor contact properties, such as HIKFootBottomToAnkleId, etc...
pMemberIndexDefines which limb to retrieve the result from. 0 = left hand, 1 = right hand, 2 = left foot, 3 = right foot.
pContactIndexDefines which floor contact marker to retrieve. Can be a value from 0 to 5 depending on floor contact type: normal, wrist, fingerbase or hoof.
[out]pXFormGlobal transformation matrix of the floor contact marker.
Returns
Returns 1 if pMemberIndex and pContactIndex are valid, otherwise 0.
int HIKGetFloorContactPointPositionfv ( const HIKCharacter pCharacter,
const HIKCharacterState pState,
const HIKPropertySetState pPropertySetState,
int  pMemberIndex,
int  pContactIndex,
float  pT[4] 
)

Retrieve the translation in global space for one of the markers used by the floor contact engine to define the feet or hands of character pCharacter with HIKCharacterState pState.

For details on how these floor contact markers are calculated from character properties, see ~{ Foot and Hand Contact }~.

Parameters
pCharacterHIKCharacter.
pStateHIKCharacterState.
pPropertySetStateHIKPropertySetState defining the floor contact properties for the character. See the floor contact properties, such as HIKFootBottomToAnkleId, etc...
pMemberIndexDefines which limb to retrieve the result from. 0 = left hand, 1 = right hand, 2 = left foot, 3 = right foot.
pContactIndexDefines which floor contact marker to retrieve. Can be a value from 0 to 5 depending on floor contact type: normal, wrist, fingerbase or hoof.
[out]pTGlobal translation of the floor contact marker.
Returns
Returns 1 if pMemberIndex and pContactIndex are valid, otherwise 0.
void HIKSetEffectorFloorStatedv ( HIKEffectorSetState pEffectorSetState,
int  pFloor,
const double  pXForm[16] 
)

Set the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that will hold the floor orientation.
pFloorDetermines the joint to which the floor orientation will apply. See the HIKFloorContact enumeration for possible values.
pXFormTransform matrix of the floor or oriented plane, in global space (4x4 column major matrix).
+ Examples:
void HIKSetEffectorFloorStatefv ( HIKEffectorSetState pEffectorSetState,
int  pFloor,
const float  pXForm[16] 
)

Set the transform matrix of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that will hold the floor orientation.
pFloorDetermines the joint to which the floor orientation will apply. See the HIKFloorContact enumeration for possible values.
pXFormTransform matrix of the floor or oriented plane, in global space (4x4 column major matrix).
void HIKSetEffectorFloorStateTQdv ( HIKEffectorSetState pEffectorSetState,
int  pFloor,
const double  pT[4],
const double  pQ[4] 
)

Set the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that will hold the floor orientation.
pFloorDetermines the joint to which the floor orientation will apply. See the HIKFloorContact enumeration for possible values.
pTTranslation value to set, in global space.
pQRotation value to set, in global space.
+ Examples:
void HIKSetEffectorFloorStateTQfv ( HIKEffectorSetState pEffectorSetState,
int  pFloor,
const float  pT[4],
const float  pQ[4] 
)

Set the translation and rotation in global space of the oriented plane that the floor contact engine applies to one of your character's feet or hands.

Parameters
pEffectorSetStateHIKEffectorSetState that will hold the floor orientation.
pFloorDetermines the joint to which the floor orientation will apply. See the HIKFloorContact enumeration for possible values.
pTTranslation value to set, in global space.
pQRotation value to set, in global space.