Read HIKCharacterState Data

Read HIKCharacterState Data

Module description

This section describes the functions used to read data from an HIKCharacterState.

All of these functions return translation.w = 0.f and scale.w = 1.f.

Functions

void HIKGetNodeNormalizedStateTQSfv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float pT[4], float pQ[4], float pS[4])
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) values in global space for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance). More...
 
void HIKGetNodeNormalizedStateTQSdv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, double pT[4], double pQ[4], double pS[4])
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) values in global space for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance). More...
 
void HIKGetNodeNormalizedStatefv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float pXForm[16])
 Retrieve the transform matrix for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance). More...
 
void HIKGetNodeNormalizedStatedv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, double pXForm[16])
 Retrieve the transform matrix for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance). More...
 
void HIKGetNormalizedCharacterStateTransformTQS (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, void *pDataSet)
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) values in global space for all Nodes listed in data description pDataDescription, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance). More...
 
void HIKGetCharacterStateTransformTQS (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, void *pDataSet)
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription. More...
 
void HIKGetCharacterStateTransformTQ (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, void *pDataSet)
 Retrieve the translation (T) and quaternion rotation (Q) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription. More...
 
void HIKGetCharacterStateTransformQ (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, void *pDataSet)
 Retrieve the quaternion rotation (Q) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription. More...
 
void HIKGetCharacterStateTransform (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescriptionMatrix *pDataDescription, void *pDataSet)
 Retrieve the transform matrices of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription. More...
 
void HIKGetCharacterStateTransformTQS_SoA (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, void *pDataSet)
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription. More...
 
void HIKGetNodeStatefv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float pXForm[16])
 Retrieve the transform matrix of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKGetNodeStatedv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, double pXForm[16])
 Retrieve the transform matrix of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKGetNodeStateTQSfv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float pT[4], float pQ[4], float pS[4])
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKGetNodeStateTQNonUniformSfv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float pT[4], float pQ[4], float pS[4])
 Retrieve the translation (T), quaternion rotation (Q) and non-uniform scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKGetNodeStateTQSdv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, double pT[4], double pQ[4], double pS[4])
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKGetNodeStateTQfv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float pT[4], float pQ[4])
 Retrieve the translation (T) and quaternion rotation (Q) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKGetNodeStateTQSAlignfv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float *pTQS, size_t pTOffset, size_t pQOffset, size_t pSOffset)
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKGetNodeStateTQAlignfv (const HIKCharacter *pCharacter, const HIKCharacterState *pCharacterState, int pNodeId, float *pTQ, size_t pTOffset, size_t pQOffset)
 Retrieve the translation (T) and quaternion rotation (Q) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 

Function Documentation

void HIKGetCharacterStateTransform ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
const HIKDataDescriptionMatrix pDataDescription,
void *  pDataSet 
)

Retrieve the transform matrices of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription.

This function is faster than retrieving the data for each Node individually using functions such as HIKGetNodeStateTQS().

Parameters
pCharacterHIKCharacter from which you want to retrieve the data values.
pCharacterStateHIKCharacterState from which you want to retrieve the data values.
pDataDescriptionData description defining the memory layout of your data set.
[out]pDataSetVoid pointer to the beginning of your first data block.
void HIKGetCharacterStateTransformQ ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
const HIKDataDescription pDataDescription,
void *  pDataSet 
)

Retrieve the quaternion rotation (Q) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription.

This function is faster than retrieving the data for each Node individually using functions such as HIKGetNodeStateTQS().

Parameters
pCharacterHIKCharacter from which you want to retrieve the data values.
pCharacterStateHIKCharacterState from which you want to retrieve the data values.
pDataDescriptionData description defining the memory layout of your data set.
[out]pDataSetVoid pointer to the beginning of your first data block.
void HIKGetCharacterStateTransformTQ ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
const HIKDataDescription pDataDescription,
void *  pDataSet 
)

Retrieve the translation (T) and quaternion rotation (Q) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription.

This function is faster than retrieving the data for each Node individually using functions such as HIKGetNodeStateTQS().

Parameters
pCharacterHIKCharacter from which you want to retrieve the data values.
pCharacterStateHIKCharacterState from which you want to retrieve the data values.
pDataDescriptionData description defining the memory layout of your data set.
[out]pDataSetVoid pointer to the beginning of your first data block.
void HIKGetCharacterStateTransformTQS ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
const HIKDataDescription pDataDescription,
void *  pDataSet 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription.

This function is faster than retrieving the data for each Node individually using functions such as HIKGetNodeStateTQS().

Parameters
pCharacterHIKCharacter from which you want to retrieve the data values.
pCharacterStateHIKCharacterState from which you want to retrieve the data values.
pDataDescriptionData description defining the memory layout of your data set.
[out]pDataSetVoid pointer to the beginning of your first data block.
+ Examples:
void HIKGetCharacterStateTransformTQS_SoA ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
const HIKDataDescription pDataDescription,
void *  pDataSet 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from HIKCharacterState pCharacterState, writing them to memory in data set pDataSet according to data description pDataDescription.

When using this SoA function, each data block will interleave the data for four Nodes instead of containing data for only one Node. If you choose to use this format, the offsets in your data description must give the location of the first translation, orientation and scaling vectors within each data block. HumanIK will store the values for all four Nodes in order starting from those offsets.

This function is faster than retrieving the data for each Node individually using functions such as HIKGetNodeStateTQS().

Parameters
pCharacterHIKCharacter from which you want to retrieve the data values.
pCharacterStateHIKCharacterState from which you want to retrieve the data values.
pDataDescriptionData description defining the memory layout of your data set.
[out]pDataSetVoid pointer to the beginning of your first data block.
void HIKGetNodeNormalizedStatedv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
double  pXForm[16] 
)

Retrieve the transform matrix for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance).

You can use this function to retrieve a Node's TQS values in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKGetNodeStatefv().

Parameters
pCharacterHIKCharacter used to create the HIKCharacterState specified in the pCharacterState parameter.
pCharacterStateHIKCharacterState.
pNodeIdIndex of the Node whose matrix is to be retrieved. See the HIKNodeId enumeration for possible values.
[out]pXFormTransform matrix of the Node.

This function converts floating-point numbers internally to double-precision. For best performance, use the HIKGetNodeNormalizedStatefv() function instead wherever possible.

+ Examples:
void HIKGetNodeNormalizedStatefv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float  pXForm[16] 
)

Retrieve the transform matrix for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance).

You can use this function to retrieve a Node's TQS values in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKGetNodeStatefv().

Parameters
pCharacterHIKCharacter used to create the HIKCharacterState specified in the pCharacterState parameter.
pCharacterStateHIKCharacterState.
pNodeIdIndex of the Node whose matrix is to be retrieved. See the HIKNodeId enumeration for possible values.
[out]pXFormTransform matrix of the Node.
void HIKGetNodeNormalizedStateTQSdv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
double  pT[4],
double  pQ[4],
double  pS[4] 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) values in global space for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance).

You can use this function to retrieve a Node's TQS values in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKGetNodeStateTQSfv().

Parameters
pCharacterHIKCharacter used to create the HIKCharacterState specified in the pCharacterState parameter.
pCharacterStateHIKCharacterState.
pNodeIdIndex of the Node whose TQS values are to be retrieved. See the HIKNodeId enumeration for possible values.
[out]pTGlobal translation values of the Node.
[out]pQGlobal rotation values of the Node.
[out]pSGlobal scaling values of the Node.

This function converts floating-point numbers internally to double-precision. For best performance, use the HIKGetNodeNormalizedStateTQSfv() function instead wherever possible.

+ Examples:
void HIKGetNodeNormalizedStateTQSfv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float  pT[4],
float  pQ[4],
float  pS[4] 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) values in global space for Node pNodeId in HIKCharacterState pCharacterState, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance).

You can use this function to retrieve a Node's TQS values in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKGetNodeStateTQSfv().

Parameters
pCharacterHIKCharacter used to create the HIKCharacterState specified in the pCharacterState parameter.
pCharacterStateHIKCharacterState.
pNodeIdIndex of the Node whose TQS values are to be retrieved. See the HIKNodeId enumeration for possible values.
[out]pTGlobal translation values of the Node.
[out]pQGlobal rotation values of the Node.
[out]pSGlobal scaling values of the Node.
void HIKGetNodeStatedv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
double  pXForm[16] 
)

Retrieve the transform matrix of Node pNodeId in HIKCharacterState pCharacterState.

Values are expressed using separate arrays.

Parameters
pCharacterHIKCharacter from which you want to retrieve the matrix.
pCharacterStateHIKCharacterState from which you want to retrieve the matrix.
pNodeIdUnique ID of the Node whose TQS values you want to set. See the HIKNodeId enumeration for possible values.
[out]pXFormStores the retrieved transform matrix, in global space.

This function converts floating-point numbers internally to double-precision. It is intended for use only where floating-point values are unavailable. For best performance, use the HIKGetNodeStatefv() function instead wherever possible.

+ Examples:
void HIKGetNodeStatefv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float  pXForm[16] 
)

Retrieve the transform matrix of Node pNodeId in HIKCharacterState pCharacterState.

Values are expressed using separate arrays.

Parameters
pCharacterHIKCharacter from which you want to retrieve the matrix.
pCharacterStateHIKCharacterState from which you want to retrieve the matrix.
pNodeIdUnique ID of the Node whose TQS values you want to set. See the HIKNodeId enumeration for possible values.
[out]pXFormStores the retrieved transform matrix, in global space.
+ Examples:
void HIKGetNodeStateTQAlignfv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float *  pTQ,
size_t  pTOffset,
size_t  pQOffset 
)

Retrieve the translation (T) and quaternion rotation (Q) in global space of Node pNodeId in HIKCharacterState pCharacterState.

Values are stored at specified offsets within a single array.

The T and Q values are each expected to be expressed as an array of four floating-point numbers within the pTQ array, and the offset of each of these arrays must be aligned on 16 bytes. The arrays containing the T and Q values may be in any order within the larger array. For example, the offset of the scaling data may be less than the offset of the translation data. The pTQ array may also contain other arbitrary data values interspersed between the arrays containing the T and Q , if that is convenient.

Parameters
pCharacterHIKCharacter from which you want to retrieve the translation and rotation values.
pCharacterStateHIKCharacterState from which you want to retrieve the translation and rotation values.
pNodeIdUnique ID of the Node whose data you want to retrieve. See the HIKNodeId enumeration for possible values.
pTQPointer to an array of floating-point numbers that will be used to store the translation and rotation values of the Node. This array must be aligned on 16 bytes.
pTOffsetOffset of the translation values within the pTQ array. This offset must be aligned on 16 bytes.
pQOffsetOffset of the rotation values within the pTQ array. This offset must be aligned on 16 bytes.
void HIKGetNodeStateTQfv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float  pT[4],
float  pQ[4] 
)

Retrieve the translation (T) and quaternion rotation (Q) in global space of Node pNodeId in HIKCharacterState pCharacterState.

Values are expressed using separate arrays.

Parameters
pCharacterHIKCharacter from which you want to retrieve the translation and rotation values.
pCharacterStateHIKCharacterState from which you want to retrieve the translation and rotation values.
pNodeIdUnique ID of the Node whose TQS values you want to retrieve. See the HIKNodeId enumeration for possible values.
pTTranslation value retrieved, in global space.
pQRotation value retrieved, in global space.
void HIKGetNodeStateTQNonUniformSfv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float  pT[4],
float  pQ[4],
float  pS[4] 
)

Retrieve the translation (T), quaternion rotation (Q) and non-uniform scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState.

Values are expressed using separate arrays.

This function allows you to specify different scaling values for the X, Y and Z axes. Values are expressed using separate arrays.

Parameters
pCharacterHIKCharacter from which you want to retrieve the translation, rotation, and scaling values.
pCharacterStateHIKCharacterState from which you want to retrieve the translation, rotation, and scaling values.
pNodeIdUnique ID of the Node whose data you want to retrieve. See the HIKNodeId enumeration for possible values.
[out]pTTranslation value retrieved, in global space.
[out]pQRotation value retrieved, in global space.
[out]pSScaling value retrieved, in global space.
void HIKGetNodeStateTQSAlignfv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float *  pTQS,
size_t  pTOffset,
size_t  pQOffset,
size_t  pSOffset 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState.

Values are stored at specified offsets within a single array.

The T, Q and S values are each stored as an array of four floating-point numbers within the pTQS array, and the offset of each of these arrays must be aligned on 16 bytes. The arrays containing the T, Q and S values may be in any order within the larger array. For example, the offset of the scaling data may be less than the offset of the translation data. The pTQS array may also contain other arbitrary data values interspersed between the arrays containing the T, Q and S values, if that is convenient.

Parameters
pCharacterHIKCharacter from which you want to retrieve the translation, rotation, and scaling values.
pCharacterStateHIKCharacterState from which you want to retrieve the translation, rotation, and scaling values.
pNodeIdUnique ID of the Node whose data you want to retrieve. See the HIKNodeId enumeration for possible values.
pTQSPointer to an array of floating-point numbers that will be used to store the translation, rotation and scaling values of the Node. This array must be aligned on 16 bytes.
pTOffsetOffset of the translation values within the pTQS array. This offset must be aligned on 16 bytes.
pQOffsetOffset of the rotation values within the pTQS array. This offset must be aligned on 16 bytes.
pSOffsetOffset of the scaling values within the pTQS array. This offset must be aligned on 16 bytes.
void HIKGetNodeStateTQSdv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
double  pT[4],
double  pQ[4],
double  pS[4] 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState.

Values are expressed using separate arrays.

Parameters
pCharacterHIKCharacter from which you want to retrieve the translation, rotation, and scaling values.
pCharacterStateHIKCharacterState from which you want to retrieve the translation, rotation, and scaling values.
pNodeIdUnique ID of the Node whose data you want to retrieve. See the HIKNodeId enumeration for possible values.
[out]pTTranslation value retrieved, in global space.
[out]pQRotation value retrieved, in global space.
[out]pSScaling value retrieved, in global space.

This function converts floating-point numbers internally to double-precision. It is intended for use only where floating-point values are unavailable. For best performance, use the HIKGetNodeStateTQSfv() function instead wherever possible.

+ Examples:
void HIKGetNodeStateTQSfv ( const HIKCharacter pCharacter,
const HIKCharacterState pCharacterState,
int  pNodeId,
float  pT[4],
float  pQ[4],
float  pS[4] 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState.

Values are expressed using separate arrays.

Parameters
pCharacterHIKCharacter from which you want to retrieve the translation, rotation, and scaling values.
pCharacterStateHIKCharacterState from which you want to retrieve the translation, rotation, and scaling values.
pNodeIdUnique ID of the Node whose data you want to retrieve. See the HIKNodeId enumeration for possible values.
[out]pTTranslation value retrieved, in global space.
[out]pQRotation value retrieved, in global space.
[out]pSScaling value retrieved, in global space.
void HIKGetNormalizedCharacterStateTransformTQS ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
const HIKDataDescription pDataDescription,
void *  pDataSet 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) values in global space for all Nodes listed in data description pDataDescription, without applying any rotation and scale offsets contained in the character's characterization pose (its default T-stance).

You can use this function to retrieve a Node's TQS values in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKGetCharacterStateTransformTQS(), and faster than retrieving the values for each Node individually through iterative calls to HIKGetNodeNormalizedStateTQSfv().

Parameters
pCharacterHIKCharacter used to create the HIKCharacterState specified in the pCharacterState parameter.
pCharacterStateHIKCharacterState.
pDataDescriptionData description for your data set.
[out]pDataSetvoid pointer to the beginning of your first data block.
+ Examples: