Write HIKCharacterState Data

Write HIKCharacterState Data

Module description

This section describes the functions used to write data to an HIKCharacterState.

All of these functions mask translation.w to 0.f and scale.w to 1.f.

Functions

void HIKSetNodeNormalizedStateTQSfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float pT[4], const float pQ[4], const float pS[4])
 Set 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 HIKSetNodeNormalizedStateTQSdv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const double pT[4], const double pQ[4], const double pS[4])
 Set 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 HIKSetNodeNormalizedStatefv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float pXForm[16])
 Set 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 HIKSetNodeNormalizedStatedv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const double pXForm[16])
 Set 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 HIKSetNormalizedCharacterStateTransformTQS (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, const void *pDataSet)
 Set 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 HIKSetCharacterStateTransformTQS (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, const void *pDataSet)
 Set the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription. More...
 
void HIKSetCharacterStateTransformTQ (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, const void *pDataSet)
 Set the translation (T) and quaternion rotation (Q) of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription. More...
 
void HIKSetCharacterStateTransform (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescriptionMatrix *pDataDescription, const void *pDataSet)
 Set the transform matrix of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription. More...
 
void HIKSetCharacterStateTransformTQS_SoA (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, const HIKDataDescription *pDataDescription, const void *pDataSet)
 Set the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription. More...
 
void HIKSetNodeStatefv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float pXForm[16])
 Set the transform matrix of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStatedv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const double pXForm[16])
 Set the transform matrix of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStateTQSfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float pT[4], const float pQ[4], const float pS[4])
 Set the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStateTQNonUniformSfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float pT[4], const float pQ[4], const float pS[4])
 Set the translation (T), quaternion rotation (Q) and non-uniform scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStateTQSdv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const double pT[4], const double pQ[4], const double pS[4])
 Set the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStateTQSfvComputeDependent (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float *pT, const float *pQ, const float *pS, const bool pLocal)
 Set the translation (T), quaternion rotation (Q) and scaling (S) in global or local space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStateTQfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float pT[4], const float pQ[4])
 Set the translation (T) and quaternion rotation (Q) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStateTQSAlignfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float *pTQS, size_t pTOffset, size_t pQOffset, size_t pSOffset)
 Set the translation (T), quaternion rotation (Q) and scaling (S) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 
void HIKSetNodeStateTQAlignfv (const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState, int pNodeId, const float *pTQ, size_t pTOffset, size_t pQOffset)
 Set the translation (T) and quaternion rotation (Q) in global space of Node pNodeId in HIKCharacterState pCharacterState. More...
 

Function Documentation

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

Set the transform matrix of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription.

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

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

Set the translation (T) and quaternion rotation (Q) of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription.

This function sets the scaling values for all axes to 1.0f.

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

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

Set the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription.

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

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

Set the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from data set pDataSet, interpreted according to data description pDataDescription.

When using this SoA function, each data block is expected to 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 reads the values for all four Nodes in order starting from those offsets.

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

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

Set 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 set a Node's TQS values from FK animation in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKSetNodeStatefv().

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

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 HIKSetNodeNormalizedStatefv() function instead wherever possible.

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

Set 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 set a Node's TQS values from FK animation in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKSetNodeStatefv().

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

Set 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 set a Node's TQS values from FK animation in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKSetNodeStateTQSfv().

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

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 HIKSetNodeNormalizedStateTQSfv() function instead wherever possible.

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

Set 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 set a Node's TQS values from FK animation in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKSetNodeStateTQSfv().

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

Set the transform matrix of Node pNodeId in HIKCharacterState pCharacterState.

Parameters
pCharacterHIKCharacter for which you want to set the matrix.
pCharacterStateHIKCharacterState in which you want to set the matrix.
pNodeIdUnique ID of the Node whose matrix you want to set. See the HIKNodeId enumeration for possible values.
pXFormTransform matrix to set, 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 HIKSetNodeStatefv() function instead wherever possible.

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

Set the transform matrix of Node pNodeId in HIKCharacterState pCharacterState.

Parameters
pCharacterHIKCharacter for which you want to set the matrix.
pCharacterStateHIKCharacterState in which you want to set the matrix.
pNodeIdUnique ID of the Node whose matrix you want to set. See the HIKNodeId enumeration for possible values.
pXFormTransform matrix to set, in global space (4x4 column major matrix).
void HIKSetNodeStateTQAlignfv ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
int  pNodeId,
const float *  pTQ,
size_t  pTOffset,
size_t  pQOffset 
)

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

Values are read from specified offsets within a single array.

This function sets the scaling values for all axes to 1.0f.

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 quaternion rotation 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 values, if that is convenient.

Parameters
pCharacterHIKCharacter for which you want to set the translation and rotation values.
pCharacterStateHIKCharacterState in which you want to set the translation and rotation values.
pNodeIdUnique ID of the Node whose TQ values you want to set. See the HIKNodeId enumeration for possible values.
pTQPointer to an array of floating-point numbers containing the desired translation and rotation values for 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 HIKSetNodeStateTQfv ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
int  pNodeId,
const float  pT[4],
const float  pQ[4] 
)

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

Values are expressed using separate arrays.

This function sets the scaling values for all axes to 1.0f.

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

Set 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 for which you want to set the translation, rotation and scaling values.
pCharacterStateHIKCharacterState in which you want to set the translation, rotation and scaling values.
pNodeIdUnique ID of the Node whose data you want to set. See the HIKNodeId enumeration for possible values.
pTTranslation value to set, in global space.
pQRotation value to set, in global space.
pSScaling value to set, in global space.
void HIKSetNodeStateTQSAlignfv ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
int  pNodeId,
const float *  pTQS,
size_t  pTOffset,
size_t  pQOffset,
size_t  pSOffset 
)

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

Values are read from specified offsets within a single array.

The T, Q and S values are each expected to be expressed 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 for which you want to set the translation, rotation, and scaling values.
pCharacterStateHIKCharacterState in which you want to set the translation, rotation, and scaling values.
pNodeIdUnique ID of the Node whose TQS values you want to set. See the HIKNodeId enumeration for possible values.
pTQSPointer to an array of floating-point numbers containing the desired translation, rotation and scaling values for 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 HIKSetNodeStateTQSdv ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
int  pNodeId,
const double  pT[4],
const double  pQ[4],
const double  pS[4] 
)

Set 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 for which you want to set the translation, rotation and scaling values.
pCharacterStateHIKCharacterState in which you want to set the translation, rotation and scaling values.
pNodeIdUnique ID of the Node whose data you want to set. See the HIKNodeId enumeration for possible values.
pTTranslation value to set, in global space.
pQRotation value to set, in global space.
pSScaling value to set, in global space.

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 HIKSetNodeStateTQSfv() function instead wherever possible.

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

Set 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 for which you want to set the translation, rotation and scaling values.
pCharacterStateHIKCharacterState in which you want to set the translation, rotation and scaling values.
pNodeIdUnique ID of the Node whose data you want to set. See the HIKNodeId enumeration for possible values.
pTTranslation value to set, in global space.
pQRotation value to set, in global space.
pSScaling value to set, in global space.
void HIKSetNodeStateTQSfvComputeDependent ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
int  pNodeId,
const float *  pT,
const float *  pQ,
const float *  pS,
const bool  pLocal 
)

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

Values are expressed using separate arrays and update dependent nodes.

Parameters
pCharacterHIKCharacter for which you want to set the data values.
pCharacterStateHIKCharacterState in which you want to set the data values.
pNodeIdUnique ID of the Node whose data you want to set. See the HIKNodeId enumeration for possible values.
pTTranslation value to set, in global or local space.
pQRotation value to set, in global or local space.
pSScaling value to set, in global or local space.
pLocalSpecify whether pT,pQ and pS are local or not (if not, they are global)
void HIKSetNormalizedCharacterStateTransformTQS ( const HIKCharacter pCharacter,
HIKCharacterState pCharacterState,
const HIKDataDescription pDataDescription,
const void *  pDataSet 
)

Set 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 set a Node's TQS values from FK animation in cases where the characterization pose of your character does not contain any rotation or scale offsets. This function is faster than HIKSetCharacterStateTransformTQS(), and faster than setting the values for each Node individually through iterative calls to HIKSetNodeNormalizedStateTQSfv().

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