Utility functions for use with HumanIK.
Functions | |
void | HIKSetEffectorPullResistFromPropertyState (HIKEffectorSetState *pEffectorSetState, const HIKPropertySetState *pPropertySetState) |
Transfer the Pull and Resist properties from the HIKPropertySetState pPropertySetState to the HIKEffectorSetState pEffectorSetState . More... | |
int | HIKGetParentNodeId (const HIKCharacter *pCharacter, int pChildNodeId) |
Retrieve the parent Node of the specified Node pChildNodeId . More... | |
int | HIKGetChildNodeCount (const HIKCharacter *pCharacter, int pParentNodeId) |
Retrieve the number of child Nodes associated with the parent Node pParentNodeId . More... | |
int | HIKGetChildNodeId (const HIKCharacter *pCharacter, int pParentNodeId, int pChildIndex) |
Retrieve the child Node with index pChildIndex for the parent Node pParentNodeId . More... | |
void | HIKCharacterStateCopy (HIKCharacterState *pStateOut, const HIKCharacterState *pStateIn) |
Copy HIKCharacterState from pStateIn to pStateOut . More... | |
void | HIKBlendState (const HIKCharacter *pCharacter, HIKCharacterState *pStateOut, HIKCharacterState const *pStateIn1, HIKCharacterState const *pStateIn2, float blendFactor) |
Perform a linear blending between HIKCharacterState pStateIn1 and HIKCharacterState pStateIn2 . More... | |
void | HIKEffectorStatePostMultTQSfv (HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, const float pT[4], const float pQ[4], const float pS[4], int pInverse) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex with pT, pQ and pS. More... | |
void | HIKEffectorStatePostMultTQSdv (HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, const double pT[4], const double pQ[4], const double pS[4], int pInverse) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex with pT, pQ and pS. More... | |
void | HIKEffectorStatePostMultfv (HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, const float pXForm[16], int pInverse) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex with pXForm. More... | |
void | HIKEffectorStatePostMultdv (HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, const double pXForm[16], int pInverse) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex with pXForm. More... | |
void | HIKApplyHumanLimits (const HIKCharacter *pCharacter, HIKCharacterState *pState) |
Applies the limits built in to the HumanIK bio-mechanical model to the pose contained in pState . More... | |
void | HIKRelaxState (const HIKCharacter *pCharacter, HIKCharacterState *pState, float pX, float pY, float pZ) |
Blends the pose contained in HIKCharacterState pState with a default "relaxed pose" generated internally for the character. More... | |
void | HIKNodeStatePreMultTQSfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float pT[4], const float pQ[4], const float pS[4], int pInverse) |
Pre multiply the current translation, rotation and scale of Node pNodeId with pT, pQ and pS. More... | |
void | HIKNodeStatePreMultTQSdv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const double pT[4], const double pQ[4], const double pS[4], int pInverse) |
Pre multiply the current translation, rotation and scale of Node pNodeId with pT, pQ and pS. More... | |
void | HIKNodeStatePreMultTQSUpfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const float pT[4], const float pQ[4], const float pS[4], int pInverse) |
Pre multiply the current translation, rotation and scale of all Nodes in the HIKCharacterState with pT, pQ and pS. More... | |
void | HIKNodeStatePreMultTQSUpdv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const double pT[4], const double pQ[4], const double pS[4], int pInverse) |
Pre multiply the current translation, rotation and scale of all Nodes in the HIKCharacterState with pT, pQ and pS. More... | |
void | HIKGetCharacterSpaceEffectorStateFromCharacterTQSdv (int pEffectorIndex, const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, const HIKPropertySetState *pPropertyState, double pT[4], double pQ[4], double pS[4]) |
Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of Effector pEffectorIndex for character pCharacter in HIKCharacterState pCharacterState , applying any rotation and scaling offsets contained in the character's characterization pose (its default T-stance) to the final rotation of the Effector. More... | |
void | HIKGetCharacterSpaceEffectorStateFromCharacterdv (int pEffectorIndex, const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, const HIKPropertySetState *pPropertyState, double pXForm[16]) |
Retrieve the transform matrix of Effector pEffectorIndex for character pCharacter in HIKCharacterState pCharacterState , applying any rotation and scaling offsets contained in the character's characterization pose (its default T-stance) to the final rotation of the Effector. More... | |
void | HIKBlendEffectorPivotsTQSdv (HIKEffectorSetState *pEffectorSetState, int pEffectorId, double(*pT)[4], double(*pQ)[4], double(*pS)[4], double(*pIKPivotArray)[4], double *pReachTArray, double *pReachRArray, int pPivotCount) |
Blend the translation (T), quaternion rotation (Q), scaling (S) and IK constraints of Effector pEffectorId in HIKEffectorSetState pEffectorSetState between multiple values, each provided in a separate array. More... | |
void | HIKBlendEffectorPivotsdv (HIKEffectorSetState *pEffectorSetState, int pEffectorId, double(*pXFormArray)[16], double(*pIKPivotArray)[4], double *pReachTArray, double *pReachRArray, int pPivotCount) |
Blend the transform matrix and IK constraints of Effector pEffectorId in HIKEffectorSetState pEffectorSetState between multiple values, each provided in a separate array. More... | |
void | HIKPasteState (HIKCharacter *pCharacter, HIKCharacterState *pOutputState, HIKCharacterState *pCurrentState, HIKCharacter *pFromCharacter, HIKCharacterState *pFromState, HIKPropertySetState *pFilterSet, HIKPropertySetState *pFromFilterSet, double pHipsOffsetGX[16]) |
Copies HIKCharacterState pFromState for HIKCharacter pFromCharacter , and pastes it into pOutputState for use with a different HIKCharacter. More... | |
void | HIKMirrorState (HIKCharacter *pCharacter, HIKCharacterState *pMirrorState, HIKCharacterState *pFromState, HIKCharacter *pFromCharacter, double pMirrorGQ[4]) |
Reflects the pose contained in HIKCharacterState pFromState in a plane whose orientation is defined by pMirrorGQ . More... | |
int | HIKNodeIdFromNodeName (const char *pName) |
Retrieve the Node ID from a descriptive name. More... | |
const char * | HIKNodeNameFromNodeId (int pNodeId) |
Retrieve a descriptive name for Node pNodeId . More... | |
int | HIKEffectorIdFromEffectorName (const char *pName) |
Retrieve the Effector ID from a descriptive name. More... | |
const char * | HIKEffectorNameFromEffectorId (int pEffectorId) |
Retrieve a descriptive name for Effector pEffectorId . More... | |
void | HIKBlendEffectorPivotsTQSdv (HIKEffectorSetState *pEffectorSetState, int pEffectorId, double(*pT)[4], double(*pQ)[4], double(*pS)[4], double(*pIKPivotArray)[4], double *pReachTArray, double *pReachRArray, int pPivotCount, double pRevert[4]) |
Blend the translation (T), quaternion rotation (Q), scaling (S) and IK constraints of Effector pEffectorId in HIKEffectorSetState pEffectorSetState between multiple values, each provided in a separate array. More... | |
void | HIKGetLocalQFromDOFfv (const HIKCharacter *pCharacter, int pNodeId, const float pEuler[4], float pQuat[4]) |
Compute a local quaternion from an euler angle, using the DOFs structures (pre-rotation, rotation order, ...) More... | |
void | HIKGetDOFFromLocalQfv (const HIKCharacter *pCharacter, int pNodeId, const float pQuat[4], float pEuler[4]) |
Compute the euler angle equivalent of a local quaternion, using the DOFs structures (pre-rotation, rotation order, ...) More... | |
void | HIKQTransform (const float quat[4], const float p[4], float q[4]) |
Compute the result of a point tranformed by a quaternion. More... | |
void | HIKEulerFromQuat (const float quat[4], float euler[4]) |
Compute euler angles from a quaternion (default XYZ order) More... | |
void | HIKSetOriginalSnSLength (HIKCharacter *pCharacter, bool pFromCharacterizationPose, HIKCharacterState *pCharacterState) |
Allow setting original length for joints from CharacterState instead of characterization pose (default) More... | |
void HIKApplyHumanLimits | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pState | ||
) |
Applies the limits built in to the HumanIK bio-mechanical model to the pose contained in pState
.
This function takes a pose that may not be tenable for a real biped, such as a pose generated by a ragdoll physics system, and constrains the translations and rotations of the Nodes to produce a valid position for a biped character that satisfies the requirements built in to the HumanIK bio-mechanical model.
pCharacter | The HIKCharacter corresponding to pState . | |
[in,out] | pState | A HIKCharacterState containing the pose to be altered. |
void HIKBlendEffectorPivotsdv | ( | HIKEffectorSetState * | pEffectorSetState, |
int | pEffectorId, | ||
double(*) | pXFormArray[16], | ||
double(*) | pIKPivotArray[4], | ||
double * | pReachTArray, | ||
double * | pReachRArray, | ||
int | pPivotCount | ||
) |
Blend the transform matrix and IK constraints of Effector pEffectorId
in HIKEffectorSetState pEffectorSetState
between multiple values, each provided in a separate array.
The blending between each set of values is controlled by the pReachTArray
and pReachRArray
parameters. The higher these values, the more the final solution will be weighted toward the corresponding transform matrix and IK constraint values.
pEffectorSetState | The HIKEffectorSetState containing pEffectorId . |
pEffectorId | The unique ID of the Effector to be blended. |
pXFormArray | An array that contains the different transform matrices to be blended for the Effector. |
pIKPivotArray | An array of IK pivots to be blended for the Effector. You can blend the transform matrix and IK constraint values for Effectors that do not have IK pivots by setting the values in this array to 0.0f. |
pReachTArray | An array that controls the relative weight of the translation values provided for the Effector. |
pReachRArray | An array that controls the relative weight of the orientation values provided for the Effector. |
pPivotCount | The total number of sets of transform matrices and IK constraint values (i.e. the length of the pXFormArray , pIKPivotArray , pReachTArray and pReachRArray parameters). |
This function converts the double-precision numbers internally to floating-point numbers. It is intended for use only where floating-point values are unavailable. For best performance, use the HIKSetEffectorPivotStateTQSfv() function instead wherever possible.
void HIKBlendEffectorPivotsTQSdv | ( | HIKEffectorSetState * | pEffectorSetState, |
int | pEffectorId, | ||
double(*) | pT[4], | ||
double(*) | pQ[4], | ||
double(*) | pS[4], | ||
double(*) | pIKPivotArray[4], | ||
double * | pReachTArray, | ||
double * | pReachRArray, | ||
int | pPivotCount | ||
) |
Blend the translation (T), quaternion rotation (Q), scaling (S) and IK constraints of Effector pEffectorId
in HIKEffectorSetState pEffectorSetState
between multiple values, each provided in a separate array.
The blending between each set of values is controlled by the pReachTArray
and pReachRArray
parameters. The higher these values, the more the final solution will be weighted toward the corresponding set of TQS and IK constraint values.
pEffectorSetState | The HIKEffectorSetState containing pEffectorId . |
pEffectorId | The unique ID of the Effector to be blended. |
pT | An array that contains the different translation values to be blended for the Effector. |
pQ | An array of quaternions that contains the different rotation values to be blended for the Effector. |
pS | An array that contains the different scaling values to be blended for the Effector. |
pIKPivotArray | An array of IK pivots to be blended for the Effector. You can blend TQS and IK constraint values for Effectors that do not have IK pivots by setting the values in this array to 0.0f. |
pReachTArray | An array that controls the relative weight of the translation values provided for the Effector. |
pReachRArray | An array that controls the relative weight of the orientation values provided for the Effector. |
pPivotCount | The total number of sets of TQS and IK constraint values (i.e. the length of the pT , pQ , pT , pIKPivotArray , pReachTArray and pReachRArray parameters). |
This function converts the double-precision numbers internally to floating-point numbers. It is intended for use only where floating-point values are unavailable. For best performance, use the HIKSetEffectorPivotStateTQSfv() function instead wherever possible.
void HIKBlendEffectorPivotsTQSdv | ( | HIKEffectorSetState * | pEffectorSetState, |
int | pEffectorId, | ||
double(*) | pT[4], | ||
double(*) | pQ[4], | ||
double(*) | pS[4], | ||
double(*) | pIKPivotArray[4], | ||
double * | pReachTArray, | ||
double * | pReachRArray, | ||
int | pPivotCount, | ||
double | pRevert[4] | ||
) |
Blend the translation (T), quaternion rotation (Q), scaling (S) and IK constraints of Effector pEffectorId
in HIKEffectorSetState pEffectorSetState
between multiple values, each provided in a separate array.
The blending between each set of values is controlled by the pReachTArray
and pReachRArray
parameters. The higher these values, the more the final solution will be weighted toward the corresponding set of TQS and IK constraint values.
pEffectorSetState | The HIKEffectorSetState containing pEffectorId . |
pEffectorId | The unique ID of the Effector to be blended. |
pT | An array that contains the different translation values to be blended for the Effector. |
pQ | An array of quaternions that contains the different rotation values to be blended for the Effector. |
pS | An array that contains the different scaling values to be blended for the Effector. |
pIKPivotArray | An array of IK pivots to be blended for the Effector. You can blend TQS and IK constraint values for Effectors that do not have IK pivots by setting the values in this array to 0.0f. |
pReachTArray | An array that controls the relative weight of the translation values provided for the Effector. |
pReachRArray | An array that controls the relative weight of the orientation values provided for the Effector. |
pPivotCount | The total number of sets of TQS and IK constraint values (i.e. the length of the pT , pQ , pT , pIKPivotArray , pReachTArray and pReachRArray parameters). |
This function converts the double-precision numbers internally to floating-point numbers. It is intended for use only where floating-point values are unavailable. For best performance, use the HIKSetEffectorPivotStateTQSfv() function instead wherever possible.
pRevert | Storage for a quaternion that needs to be preserved for subsequent HIKRevertEffectorPivotsTQSdv calls |
void HIKBlendState | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pStateOut, | ||
HIKCharacterState const * | pStateIn1, | ||
HIKCharacterState const * | pStateIn2, | ||
float | blendFactor | ||
) |
Perform a linear blending between HIKCharacterState pStateIn1
and HIKCharacterState pStateIn2
.
pCharacter | HIKCharacter for which the blend is performed. | |
[out] | pStateOut | HIKCharacterState containing the blended pose. |
pStateIn1 | HIKCharacterState 1. | |
pStateIn2 | HIKCharacterState 2. | |
blendFactor | Blend factor. The value of this parameter must be between 0 and 1, where lower values prioritize HIKCharacterState 1, higher values prioritize HIKCharacterState 2, and a value of 0.5 blends the two states equally. |
void HIKCharacterStateCopy | ( | HIKCharacterState * | pStateOut, |
const HIKCharacterState * | pStateIn | ||
) |
Copy HIKCharacterState from pStateIn
to pStateOut
.
[out] | pStateOut | Output HIKCharacterState. |
pStateIn | Input HIKCharacterState. |
int HIKEffectorIdFromEffectorName | ( | const char * | pName | ) |
Retrieve the Effector ID from a descriptive name.
This is a utility function that maps between FBX and HIK.
pName | Descriptive name for an Effector. Must match a value returned by HIKEffectorNameFromEffectorId(). |
const char * HIKEffectorNameFromEffectorId | ( | int | pEffectorId | ) |
Retrieve a descriptive name for Effector pEffectorId
.
This is a utility function that maps between FBX and HIK.
pEffectorId | Unique ID of the Effector. See the HIKEffectorId enumeration for possible values. |
void HIKEffectorStatePostMultdv | ( | HIKEffectorSetState * | pEffectorSetState, |
int | pEffectorIndex, | ||
const double | pXForm[16], | ||
int | pInverse | ||
) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex
with pXForm.
pEffectorSetState | HIKEffectorSetState. |
pEffectorIndex | Index of the Effector whose transform matrix will be post multiplied. See the HIKEffectorId enumeration for possible values. |
pXForm | Transform matrix to post multiply. |
pInverse | If set to 1, the inverse post multiplication is performed. |
void HIKEffectorStatePostMultfv | ( | HIKEffectorSetState * | pEffectorSetState, |
int | pEffectorIndex, | ||
const float | pXForm[16], | ||
int | pInverse | ||
) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex
with pXForm.
pEffectorSetState | HIKEffectorSetState. |
pEffectorIndex | Index of the Effector whose transform matrix will be post multiplied. See the HIKEffectorId enumeration for possible values. |
pXForm | Transform matrix to post multiply. |
pInverse | If set to 1, the inverse post multiplication is performed. |
void HIKEffectorStatePostMultTQSdv | ( | HIKEffectorSetState * | pEffectorSetState, |
int | pEffectorIndex, | ||
const double | pT[4], | ||
const double | pQ[4], | ||
const double | pS[4], | ||
int | pInverse | ||
) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex
with pT, pQ and pS.
pEffectorSetState | HIKEffectorSetState. |
pEffectorIndex | Index of the Effector whose transform matrix will be post multiplied. See the HIKEffectorId enumeration for possible values. |
pT | Global translation to post multiply. |
pQ | Global rotation to post multiply. |
pS | Global scaling to post multiply. |
pInverse | If set to 1, the inverse post multiplication is performed. |
void HIKEffectorStatePostMultTQSfv | ( | HIKEffectorSetState * | pEffectorSetState, |
int | pEffectorIndex, | ||
const float | pT[4], | ||
const float | pQ[4], | ||
const float | pS[4], | ||
int | pInverse | ||
) |
Post multiply the current translation, rotation and scale of Effector pEffectorIndex
with pT, pQ and pS.
pEffectorSetState | HIKEffectorSetState. |
pEffectorIndex | Index of the Effector whose transform matrix will be post multiplied. See the HIKEffectorId enumeration for possible values. |
pT | Global translation to post multiply. |
pQ | Global rotation to post multiply. |
pS | Global scaling to post multiply. |
pInverse | If set to 1, the inverse post multiplication is performed. |
void HIKEulerFromQuat | ( | const float | quat[4], |
float | euler[4] | ||
) |
Compute euler angles from a quaternion (default XYZ order)
void HIKGetCharacterSpaceEffectorStateFromCharacterdv | ( | int | pEffectorIndex, |
const HIKCharacter * | pCharacter, | ||
const HIKCharacterState * | pCharacterState, | ||
const HIKPropertySetState * | pPropertyState, | ||
double | pXForm[16] | ||
) |
Retrieve the transform matrix of Effector pEffectorIndex
for character pCharacter
in HIKCharacterState pCharacterState
, applying any rotation and scaling offsets contained in the character's characterization pose (its default T-stance) to the final rotation of the Effector.
pEffectorIndex | Unique ID of the Effector whose transform matrix you want to retrieve. See the HIKEffectorId enumeration for possible values. | |
pCharacter | HIKCharacter to query. | |
pCharacterState | HIKCharacterState from which to retrieve the Effector placement. | |
pPropertyState | HIKPropertySetState containing all character properties for the character. | |
[out] | pXForm | Stores the transform matrix of the Effector in global space (4x4 column major matrix). |
This function converts the double-precision numbers internally to floating-point numbers. It is intended for use only where floating-point values are unavailable. For best performance, use the HIKSetEffectorPivotStateTQSfv() function instead wherever possible.
void HIKGetCharacterSpaceEffectorStateFromCharacterTQSdv | ( | int | pEffectorIndex, |
const HIKCharacter * | pCharacter, | ||
const HIKCharacterState * | pCharacterState, | ||
const HIKPropertySetState * | pPropertyState, | ||
double | pT[4], | ||
double | pQ[4], | ||
double | pS[4] | ||
) |
Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of Effector pEffectorIndex
for character pCharacter
in HIKCharacterState pCharacterState
, applying any rotation and scaling offsets contained in the character's characterization pose (its default T-stance) to the final rotation of the Effector.
pEffectorIndex | Unique ID of the Effector whose TQS values you want to retrieve. See the HIKEffectorId enumeration for possible values. | |
pCharacter | HIKCharacter to query. | |
pCharacterState | HIKCharacterState from which to retrieve the Effector placement. | |
pPropertyState | HIKPropertySetState containing all character properties for the character. | |
[out] | pT | Stores the translation value. |
[out] | pQ | Stores the orientation value. |
[out] | pS | Stores the scaling value. |
This function converts the double-precision numbers internally to floating-point numbers. It is intended for use only where floating-point values are unavailable. For best performance, use the HIKSetEffectorPivotStateTQSfv() function instead wherever possible.
int HIKGetChildNodeCount | ( | const HIKCharacter * | pCharacter, |
int | pParentNodeId | ||
) |
Retrieve the number of child Nodes associated with the parent Node pParentNodeId
.
pCharacter | HIKCharacter. |
pParentNodeId | ID of the parent node. See the HIKNodeId enumeration for possible values. |
int HIKGetChildNodeId | ( | const HIKCharacter * | pCharacter, |
int | pParentNodeId, | ||
int | pChildIndex | ||
) |
Retrieve the child Node with index pChildIndex
for the parent Node pParentNodeId
.
pCharacter | HIKCharacter. |
pParentNodeId | ID of the parent node. See the HIKNodeId enumeration for possible values. |
pChildIndex | Index of the child. Should be a value between 0 and the value returned by HIKGetChildNodeCount() for the parent Node. |
void HIKGetDOFFromLocalQfv | ( | const HIKCharacter * | pCharacter, |
int | pNodeId, | ||
const float | pQuat[4], | ||
float | pEuler[4] | ||
) |
Compute the euler angle equivalent of a local quaternion, using the DOFs structures (pre-rotation, rotation order, ...)
void HIKGetLocalQFromDOFfv | ( | const HIKCharacter * | pCharacter, |
int | pNodeId, | ||
const float | pEuler[4], | ||
float | pQuat[4] | ||
) |
Compute a local quaternion from an euler angle, using the DOFs structures (pre-rotation, rotation order, ...)
int HIKGetParentNodeId | ( | const HIKCharacter * | pCharacter, |
int | pChildNodeId | ||
) |
Retrieve the parent Node of the specified Node pChildNodeId
.
pCharacter | HIKCharacter. |
pChildNodeId | ID of the child node. See the HIKNodeId enumeration for possible values. |
void HIKMirrorState | ( | HIKCharacter * | pCharacter, |
HIKCharacterState * | pMirrorState, | ||
HIKCharacterState * | pFromState, | ||
HIKCharacter * | pFromCharacter, | ||
double | pMirrorGQ[4] | ||
) |
Reflects the pose contained in HIKCharacterState pFromState
in a plane whose orientation is defined by pMirrorGQ
.
pCharacter | The HIKCharacter that will use the reflected HIKCharacterState. | |
[out] | pMirrorState | The HIKCharacterState containing the pose reflected from pFromState . |
pFromState | The HIKCharacterState to be reflected. | |
pFromCharacter | The HIKCharacter corresponding to pFromState . | |
pMirrorGQ | The orientation of the plane of the mirror, expressed as a quaternion. |
int HIKNodeIdFromNodeName | ( | const char * | pName | ) |
Retrieve the Node ID from a descriptive name.
This is a utility function that maps between FBX and HIK.
pName | Descriptive name for a Node. Must match a value returned by HIKNodeNameFromNodeId(). |
const char * HIKNodeNameFromNodeId | ( | int | pNodeId | ) |
Retrieve a descriptive name for Node pNodeId
.
This is a utility function that maps between FBX and HIK.
pNodeId | Unique ID of the Node. See the HIKNodeId enumeration for possible values. |
void HIKNodeStatePreMultTQSdv | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
int | pNodeId, | ||
const double | pT[4], | ||
const double | pQ[4], | ||
const double | pS[4], | ||
int | pInverse | ||
) |
Pre multiply the current translation, rotation and scale of Node pNodeId
with pT, pQ and pS.
pCharacter | HIKCharacter to be modified. |
pCharacterState | HIKCharacterState containing the pose to be modified by pre-rotation. |
pNodeId | Index of the Node whose transform matrix will be pre multiplied. See the HIKNodeId enumeration for possible values. |
pT | Global translation to pre multiply. |
pQ | Global rotation to pre multiply. |
pS | Global scaling to pre multiply. |
pInverse | If set to 1, the inverse pre multiplication is performed. |
void HIKNodeStatePreMultTQSfv | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
int | pNodeId, | ||
const float | pT[4], | ||
const float | pQ[4], | ||
const float | pS[4], | ||
int | pInverse | ||
) |
Pre multiply the current translation, rotation and scale of Node pNodeId
with pT, pQ and pS.
pCharacter | HIKCharacter to be modified. |
pCharacterState | HIKCharacterState containing the pose to be modified by pre-rotation. |
pNodeId | Index of the Node whose transform matrix will be pre multiplied. See the HIKNodeId enumeration for possible values. |
pT | Global translation to pre multiply. |
pQ | Global rotation to pre multiply. |
pS | Global scaling to pre multiply. |
pInverse | If set to 1, the inverse pre multiplication is performed. |
void HIKNodeStatePreMultTQSUpdv | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
const double | pT[4], | ||
const double | pQ[4], | ||
const double | pS[4], | ||
int | pInverse | ||
) |
Pre multiply the current translation, rotation and scale of all Nodes in the HIKCharacterState with pT, pQ and pS.
pCharacter | HIKCharacter to be modified. |
pCharacterState | HIKCharacterState containing the pose to be modified by pre-rotation. |
pT | Global translation to pre multiply. |
pQ | Global rotation to pre multiply. |
pS | Global scaling to pre multiply. |
pInverse | If set to 1, the inverse pre multiplication is performed. |
void HIKNodeStatePreMultTQSUpfv | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pCharacterState, | ||
const float | pT[4], | ||
const float | pQ[4], | ||
const float | pS[4], | ||
int | pInverse | ||
) |
Pre multiply the current translation, rotation and scale of all Nodes in the HIKCharacterState with pT, pQ and pS.
pCharacter | HIKCharacter to be modified. |
pCharacterState | HIKCharacterState containing the pose to be modified by pre-rotation. |
pT | Global translation to pre multiply. |
pQ | Global rotation to pre multiply. |
pS | Global scaling to pre multiply. |
pInverse | If set to 1, the inverse pre multiplication is performed. |
void HIKPasteState | ( | HIKCharacter * | pCharacter, |
HIKCharacterState * | pOutputState, | ||
HIKCharacterState * | pCurrentState, | ||
HIKCharacter * | pFromCharacter, | ||
HIKCharacterState * | pFromState, | ||
HIKPropertySetState * | pFilterSet, | ||
HIKPropertySetState * | pFromFilterSet, | ||
double | pHipsOffsetGX[16] | ||
) |
Copies HIKCharacterState pFromState
for HIKCharacter pFromCharacter
, and pastes it into pOutputState
for use with a different HIKCharacter.
pCharacter | The HIKCharacter that will use the pasted HIKCharacterState. | |
[out] | pOutputState | The HIKCharacterState containing the pose pasted from pFromState . |
pCurrentState | The current pose of pCharacter . | |
pFromCharacter | The HIKCharacter corresponding to pFromState . | |
pFromState | The HIKCharacterState to be pasted. | |
pFilterSet | The HIKPropertySetState corresponding to pCharacter . | |
pFromFilterSet | The HIKPropertySetState corresponding to pFromCharacter . | |
pHipsOffsetGX | The offset to apply to the hips, if any, expressed in global space. |
void HIKQTransform | ( | const float | quat[4], |
const float | p[4], | ||
float | q[4] | ||
) |
Compute the result of a point tranformed by a quaternion.
void HIKRelaxState | ( | const HIKCharacter * | pCharacter, |
HIKCharacterState * | pState, | ||
float | pX, | ||
float | pY, | ||
float | pZ | ||
) |
Blends the pose contained in HIKCharacterState pState
with a default "relaxed pose" generated internally for the character.
This function generates a "relaxed pose" for HIKCharacter pCharacter:
a pose in which all limbs are rotated helf-way between their minimum and maximum extents. This relaxed pose is then blended with the pose provided in pState
.
The relative weight of the blending along each axis is controlled by pX
, pY
and pZ
. A value of 0 for any of these parameters weights the blending entirely toward pState
. A value of 1.0f weights the blending entirely toward the relaxed pose. Values in between interpolate the resulting position between pState
and the relaxed pose.
pCharacter | The HIKCharacter corresponding to pState . | |
[in,out] | pState | A HIKCharacterState containing the pose to be relaxed. |
pX | The relative weight on the X axis when blending between pState and the relaxed pose. | |
pY | The relative weight on the Y axis when blending between pState and the relaxed pose. | |
pZ | The relative weight on the Z axis when blending between pState and the relaxed pose. |
void HIKSetEffectorPullResistFromPropertyState | ( | HIKEffectorSetState * | pEffectorSetState, |
const HIKPropertySetState * | pPropertySetState | ||
) |
Transfer the Pull and Resist properties from the HIKPropertySetState pPropertySetState
to the HIKEffectorSetState pEffectorSetState
.
pEffectorSetState | HIKEffectorSetState. |
pPropertySetState | HIKPropertySetState. |
void HIKSetOriginalSnSLength | ( | HIKCharacter * | pCharacter, |
bool | pFromCharacterizationPose, | ||
HIKCharacterState * | pCharacterState | ||
) |
Allow setting original length for joints from CharacterState instead of characterization pose (default)