HIK2016/humanik/hikcreature.h File Reference

hikcreature.h File Reference
#include "humanik.h"
#include "hikproperty.h"

File Description

Header file for Creature solver.

This file contains solver primitives for running IK on creatures (non human and non quadrued)

Definition in file hikcreature.h.

Classes

struct  sHIKCreatureChainDefinition
 
struct  sHIKCreatureSectionDefinition
 
struct  sHIKCreatureDefinition
 

Typedefs

typedef struct sHIKCreatureChainDefinition HIKCreatureChainDefinition
 
typedef struct sHIKCreatureSectionDefinition HIKCreatureSectionDefinition
 
typedef struct sHIKCreatureDefinition HIKCreatureDefinition
 

Enumerations

enum  HIKChainSolvingType {
  HIKChainSolvingTypeOneBoneIK =0, HIKChainSolvingTypeTwoBonesIK, HIKChainSolvingTypeCoplanar, HIKChainSolvingTypeTentacleApprox,
  HIKChainSolvingTypeTentacleCCD, HIKChainSolvingTypeQuadrupedLeg
}
 
enum  HIKParamTwoBonesIK { HIKParamTwoBonesIK_FoldingJointIndex }
 
enum  HIKParamTentacleCCD { HIKParamTentacleCCD_IterationCount, HIKParamTentacleCCD_DOFAngle, HIKParamTentacleCCD_DOFMode, HIKParamTentacleCCD_EndOrientationInfluence }
 

Functions

HIKCreatureHIKCreatureCreate (const HIKCreatureDefinition *pCreatureDefinition, HIKMalloc pMalloc, const char *pValidationString)
 Create a new HIKCreature. More...
 
bool HIKCreatureCharacterizeGeometry (HIKCreature *pCreature)
 Set up and initialize creature pCreature for solving. More...
 
bool HIKCreatureSetCharacterizeNodeStateTQSfv (HIKCreature *pCreature, int pElementId, int pNodeId, const float pT[4], const float pQ[4], const float pS[4])
 Set the translation, orientation and scaling for the Node pNodeId when the character is standing in the default stance. More...
 
bool HIKCreatureSetHasParentOffset (HIKCreature *pCreature, int pChainId, int pNodeId)
 Only relevant when working in local coordinates. More...
 
bool HIKCreatureSetHasLimits (HIKCreature *pCreature, int pChainId, int pNodeId)
 Declares a chain node implements limits. More...
 
bool HIKCreatureSetParentOffsetfv (HIKCreature *pCreature, int pElementId, int pNodeId, const float pT[4], const float pQ[4], const float pS[4])
 Only relevant when working in local coordinates. More...
 
bool HIKCreatureGetParentOffsetfv (const HIKCreature *pCreature, int pElementId, int pNodeId, float pT[4], float pQ[4], float pS[4])
 Retrieve the parent offset set for Node pNodeId. More...
 
bool HIKCreatureSetLimitsfv (HIKCreature *pCreature, int pElementId, int pNodeId, const float pMin[3], const float pMax[3], const float pPreQ[4], const float pPostQ[4], int pActiveMask, eHIKRotationOrder pRotationOrder)
 Set up limits for Node pNodeId. More...
 
HIKCreatureStateHIKCreatureStateCreate (const HIKCreature *pCreature, HIKMalloc pMalloc)
 Create a new HIKCreatureState. More...
 
HIKCreatureEffectorSetStateHIKCreatureEffectorSetStateCreate (const HIKCreature *pCreature, HIKMalloc pMalloc)
 Create a new HIKCreatureEffectorSetState. More...
 
void HIKCreatureGetDefaultState (const HIKCreature *pCreature, HIKCreatureState *pCreatureState)
 Retrieve the default natural stance for creature pCreature, storing it in HIKCreatureState pCreatureState. More...
 
void HIKCreatureSetNodeStateTQSfv (const HIKCreature *pCreature, HIKCreatureState *pCreatureState, int pElementId, 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 from Chain pChainId in HIKCreatureState pCreatureState. More...
 
void HIKCreatureGetNodeStateTQSfv (const HIKCreature *pCreature, const HIKCreatureState *pCreatureState, int pElementId, 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 from Chain pChainId in HIKCreatureState pCreatureState. More...
 
bool HIKCreatureSetStateTransformTQS (const HIKCreature *pCreature, HIKCreatureState *pCreatureState, 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...
 
bool HIKCreatureGetStateTransformTQS (const HIKCreature *pCreature, HIKCreatureState *pCreatureState, const HIKDataDescription *pDataDescription, void *pDataSet)
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from HIKCreatureState pCreatureState, writing them to memory in data set pDataSet according to data description pDataDescription. More...
 
void HIKEffectorSetFromCreature (const HIKCreature *pCreature, HIKCreatureEffectorSetState *pEffectorSetState, const HIKCreatureState *pCreatureState)
 Set up HIKCreatureEffectorSetState pEffectorSetState to match creature pCreature in HIKCreatureState pCreatureState. More...
 
void HIKCreatureGetEffectorStateTQSfv (const HIKCreatureEffectorSetState *pEffectorSetState, int pEffectorIndex, float pT[4], float pQ[4], float pS[4])
 Retrieve the translation (T), quaternion rotation (Q) and scaling (S) in global space of Effector pEffectorIndex in HIKCreatureEffectorSetState pEffectorSetState. More...
 
void HIKCreatureSetEffectorStateTQSfv (HIKCreatureEffectorSetState *pEffectorSetState, int pEffectorIndex, 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 Effector pEffectorIndex in HIKCreatureEffectorSetState pEffectorSetState. More...
 
void HIKCreatureSetTranslationActive (HIKCreatureEffectorSetState *pEffectorSetState, int pEffectorIndex, float pValue)
 Set the Reach Translation constraint for Effector pEffectorIndex. More...
 
void HIKCreatureSetRotationActive (HIKCreatureEffectorSetState *pEffectorSetState, int pEffectorIndex, float pValue)
 Set the Reach Rotation constraint for Effector pEffectorIndex. More...
 
void HIKCreatureSetPull (HIKCreatureEffectorSetState *pEffectorSetState, int pEffectorIndex, float pValue)
 Set the Pull constraint for Effector pEffectorIndex. 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 HIKCreatureSetChainStiffness (HIKCreature *pCreature, int pChainId, float pValue)
 Sets how stiff a chain should behave (* Only relevant when doing FBIK) More...
 
void HIKCreatureSetChainCompressionResistance (HIKCreature *pCreature, int pChainId, float pValue)
 Sets how resistant a chain should behave when being compressed (* Only relevant when doing FBIK) More...
 
void HIKCreatureSetSectionExtraPull (HIKCreature *pCreature, int pSectionId, float pValue)
 Sets how a section should emphasizes its pull (* Only relevant when doing FBIK) More...
 
void HIKCreatureEnableFBIK (HIKCreatureEffectorSetState *pEffectorSetState, bool pValue)
 Enable or disable FullBodyIK solving on the creature. More...
 
void HIKCreatureEnableTorque (HIKCreatureEffectorSetState *pEffectorSetState, bool pValue)
 Enable or disable torque solving on the creature (* Only relevant when doing FBIK) More...
 
void HIKCreatureSetChainSolvingType (HIKCreature *pCreature, int pChainId, HIKChainSolvingType pValue)
 Set solving type for a specific chain in the creature. More...
 
void HIKCreatureSetChainProperty (HIKCreature *pCreature, int pChainId, int pPropertyIndex, float pValue)
 Set property for a specific chain in the creature. More...
 
int HIKCreatureGetChainParentSectionIndex (HIKCreature *pCreature, int pChainId)
 Get parent section index for a chain. More...
 
void HIKCreatureDestroy (HIKCreature *pCreature, HIKFree pFree)
 Destroy HIKCreature pCreature. More...
 
void HIKCreatureEffectorSetStateDestroy (HIKCreatureEffectorSetState *pEffectorSetState, HIKFree pFree)
 Destroy HIKCreatureEffectorSetState pEffectorSetState. More...
 
void HIKCreatureStateDestroy (HIKCreatureState *pCreatureState, HIKFree pFree)
 Destroy HIKCreatureState pCreatureState. More...
 
float HIKCreatureGetChainLastPull (HIKCreature *pCreature, int pChainId)
 
float HIKCreatureGetChainLastPullLength (HIKCreature *pCreature, int pChainId)
 
float HIKCreatureGetChainLastChainWeightsT (HIKCreature *pCreature, int pChainId)
 
void HIKCreatureGetChainLastChainPullDir (HIKCreature *pCreature, int pChainId, int pIter, float pT[4])
 
float HIKCreatureGetChainLastChainErrT (HIKCreature *pCreature, int pChainId, int pIter)
 
void HIKCreatureGetChainLastChainErrQ (HIKCreature *pCreature, int pChainId, int pIter, float pQ[4])
 
void HIKCreatureGetSectionLastSumErr (HIKCreature *pCreature, int pSectionId, int pIter, float pT[4])
 
float HIKCreatureGetSectionLastSectionErrWeightT (HIKCreature *pCreature, int pSectionId, int pIter)
 
float HIKCreatureGetSectionLastSectionWeights (HIKCreature *pCreature, int pSectionId, int pIter)
 
void HIKCreatureGetSectionLastSectionErrQPull (HIKCreature *pCreature, int pSectionId, int pIter, float pQ[4])
 
void HIKCreatureGetSectionLastSectionErrQReach (HIKCreature *pCreature, int pSectionId, int pIter, float pQ[4])
 

Typedef Documentation

Enumeration Type Documentation

Enumerator
HIKChainSolvingTypeOneBoneIK 

Fastest solving mode.

The solving only involves the chain root.

HIKChainSolvingTypeTwoBonesIK 

Fastest solving mode.

The solving only involves the chain root + an intermediary node.

HIKChainSolvingTypeCoplanar 

The solving only involves the chain root + all intermediary nodes, all folding on the same plane.

HIKChainSolvingTypeTentacleApprox 

The solving involves all nodes in the chain, freely rotating - approximation only.

HIKChainSolvingTypeTentacleCCD 

The solving involves all nodes in the chain, freely rotating, constrained with orienation reach.

HIKChainSolvingTypeQuadrupedLeg 

The solving involves all nodes in the chain, potentially DOF constrained, re-ordered, all folding on the same plane.

Definition at line 128 of file hikcreature.h.

129 {
142 };
The solving involves all nodes in the chain, freely rotating - approximation only.
Definition: hikcreature.h:137
The solving involves all nodes in the chain, freely rotating, constrained with orienation reach...
Definition: hikcreature.h:139
The solving involves all nodes in the chain, potentially DOF constrained, re-ordered, all folding on the same plane.
Definition: hikcreature.h:141
The solving only involves the chain root + all intermediary nodes, all folding on the same plane...
Definition: hikcreature.h:135
Fastest solving mode.
Definition: hikcreature.h:133
Fastest solving mode.
Definition: hikcreature.h:131
Enumerator
HIKParamTentacleCCD_IterationCount 

Number of iterations for the CCD algorithm; default is 32.

HIKParamTentacleCCD_DOFAngle 

Maximal joint rotation in radians; default is 0.157f.

HIKParamTentacleCCD_DOFMode 

Defines how DOFs are applied along the chain.

0.0f : DOFFunction_Const : DOF is applied uniformy 1.0f : DOFFunction_Linear : DOF is 0.0f for end node and linearly grows to HIKDOFAngle 2.0f : DOFFunction_Square : DOF is 0.0f for end node and quadratically grows to HIKDOFAngle

HIKParamTentacleCCD_EndOrientationInfluence 

Defines how many joints in chain (from the end) should contribute to end orientation reach; default is 0.5f !

Definition at line 150 of file hikcreature.h.

151 {
164 };
Defines how DOFs are applied along the chain.
Definition: hikcreature.h:161
Number of iterations for the CCD algorithm; default is 32.
Definition: hikcreature.h:153
Defines how many joints in chain (from the end) should contribute to end orientation reach; default i...
Definition: hikcreature.h:163
Maximal joint rotation in radians; default is 0.157f.
Definition: hikcreature.h:155
Enumerator
HIKParamTwoBonesIK_FoldingJointIndex 

Index of the joint to fold in the chain (top = 0); default is 1.

Definition at line 144 of file hikcreature.h.

145 {
148 };
Index of the joint to fold in the chain (top = 0); default is 1.
Definition: hikcreature.h:147

Function Documentation

bool HIKCreatureCharacterizeGeometry ( HIKCreature pCreature)

Set up and initialize creature pCreature for solving.

Call this function after you have called HIKCreatureSetCharacterizeNodeStatefv() for all your creature's Nodes. This function finalizes the default stance and calibrates the engine.

Parameters
pCcreatureCreature to set up and initialize.
Remarks
The character must be standing in a stance where folding angles for chains are explicit (not 180 or 0 degrees)
void HIKCreatureEnableFBIK ( HIKCreatureEffectorSetState pEffectorSetState,
bool  pValue 
)

Enable or disable FullBodyIK solving on the creature.

Parameters
pEffectorSetStateThe EffectorSetState you want to set up.
pValueSet to TRUE to enable FBIK solving; Set to FALSE to disable FBIK solving
void HIKCreatureEnableTorque ( HIKCreatureEffectorSetState pEffectorSetState,
bool  pValue 
)

Enable or disable torque solving on the creature (* Only relevant when doing FBIK)

Parameters
pEffectorSetStateThe EffectorSetState you want to set up.
pValueSet to TRUE to enable torque solving; Set to FALSE to disable torque solving
void HIKCreatureGetChainLastChainErrQ ( HIKCreature pCreature,
int  pChainId,
int  pIter,
float  pQ[4] 
)
float HIKCreatureGetChainLastChainErrT ( HIKCreature pCreature,
int  pChainId,
int  pIter 
)
void HIKCreatureGetChainLastChainPullDir ( HIKCreature pCreature,
int  pChainId,
int  pIter,
float  pT[4] 
)
float HIKCreatureGetChainLastChainWeightsT ( HIKCreature pCreature,
int  pChainId 
)
float HIKCreatureGetChainLastPull ( HIKCreature pCreature,
int  pChainId 
)
float HIKCreatureGetChainLastPullLength ( HIKCreature pCreature,
int  pChainId 
)
int HIKCreatureGetChainParentSectionIndex ( HIKCreature pCreature,
int  pChainId 
)

Get parent section index for a chain.

Parameters
pCreatureThe creature you want to set up.
pChainIdThe unique ID of the Chain to set up.
void HIKCreatureGetDefaultState ( const HIKCreature pCreature,
HIKCreatureState pCreatureState 
)

Retrieve the default natural stance for creature pCreature, storing it in HIKCreatureState pCreatureState.

This function always returns the same stance for the given creature. The default stance does not differ before and after you perform a solve.

Parameters
pCreatureCreature whose default stance is to be retrieved.
[out]pCreatureStateHIKCreatureState to contain the default stance.
void HIKCreatureGetNodeStateTQSfv ( const HIKCreature pCreature,
const HIKCreatureState pCreatureState,
int  pElementId,
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 from Chain pChainId in HIKCreatureState pCreatureState.

Values are expressed using separate arrays.

Parameters
pCreatureHIKCharacter from which you want to retrieve the translation, rotation, and scaling values.
pCreatureStateHIKCharacterState from which you want to retrieve the translation, rotation, and scaling values.
pElementIdUnique ID of the Element whose data you want to set (chainId or -sectionId-1)
pNodeIdUnique ID of the Node whose data you want to retrieve.
[out]pTTranslation value retrieved, in global space.
[out]pQRotation value retrieved, in global space.
[out]pSScaling value retrieved, in global space.
bool HIKCreatureGetParentOffsetfv ( const HIKCreature pCreature,
int  pElementId,
int  pNodeId,
float  pT[4],
float  pQ[4],
float  pS[4] 
)

Retrieve the parent offset set for Node pNodeId.

This function is needed only if the parent joint is unknown to HumanIK, and if you are using either local space transforms or limits (DoF).

Parameters
pCreatureThe character you want to get.
pElementIdThe unique ID of the Element that you want to set up (ChainId or -SectionId-1).
pNodeIdThe unique ID of the Node that you want to set up.
pTThe parent node translation offset.
pQThe parent node rotation offset, expressed as a quaternion.
pSThe parent node scaling offset.
void HIKCreatureGetSectionLastSectionErrQPull ( HIKCreature pCreature,
int  pSectionId,
int  pIter,
float  pQ[4] 
)
void HIKCreatureGetSectionLastSectionErrQReach ( HIKCreature pCreature,
int  pSectionId,
int  pIter,
float  pQ[4] 
)
float HIKCreatureGetSectionLastSectionErrWeightT ( HIKCreature pCreature,
int  pSectionId,
int  pIter 
)
float HIKCreatureGetSectionLastSectionWeights ( HIKCreature pCreature,
int  pSectionId,
int  pIter 
)
void HIKCreatureGetSectionLastSumErr ( HIKCreature pCreature,
int  pSectionId,
int  pIter,
float  pT[4] 
)
bool HIKCreatureGetStateTransformTQS ( const HIKCreature pCreature,
HIKCreatureState pCreatureState,
const HIKDataDescription pDataDescription,
void *  pDataSet 
)

Retrieve the translation (T), quaternion rotation (Q) and scaling (S) of multiple Nodes from HIKCreatureState pCreatureState, 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 HIKCreatureGetNodeStateTQS().

Parameters
pCreatureHIKCreature from which you want to retrieve the data values.
pCreatureStateHIKCreatureState 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 HIKCreatureSetChainCompressionResistance ( HIKCreature pCreature,
int  pChainId,
float  pValue 
)

Sets how resistant a chain should behave when being compressed (* Only relevant when doing FBIK)

Parameters
pCreatureThe creature you want to set up.
pChainIdThe unique ID of the Chain to set up.
pValueThe resistance to compression (0.0 means no resistance, 1.0 means maximal resistance)
void HIKCreatureSetChainProperty ( HIKCreature pCreature,
int  pChainId,
int  pPropertyIndex,
float  pValue 
)

Set property for a specific chain in the creature.

Parameters
pCreatureThe creature you want to set up.
pChainIdThe unique ID of the Chain to set up.
pPropertyIndexProperty index
pValueChain solving type (see enum above)
void HIKCreatureSetChainSolvingType ( HIKCreature pCreature,
int  pChainId,
HIKChainSolvingType  pValue 
)

Set solving type for a specific chain in the creature.

Parameters
pCreatureThe creature you want to set up.
pChainIdThe unique ID of the Chain to set up.
pValueChain solving type (see enum above)
void HIKCreatureSetChainStiffness ( HIKCreature pCreature,
int  pChainId,
float  pValue 
)

Sets how stiff a chain should behave (* Only relevant when doing FBIK)

Parameters
pCreatureThe creature you want to set up.
pChainIdThe unique ID of the Chain to set up.
pValueThe stiffness (0.0 means no stiffnes, 1.0 means maximal stiffness)
bool HIKCreatureSetCharacterizeNodeStateTQSfv ( HIKCreature pCreature,
int  pElementId,
int  pNodeId,
const float  pT[4],
const float  pQ[4],
const float  pS[4] 
)

Set the translation, orientation and scaling for the Node pNodeId when the character is standing in the default stance.

Parameters
pCreatureThe creature you want to set up.
pElementIdThe unique ID of the Element that you want to set up (ChainId or -SectionId-1).
pNodeIdThe unique ID of the Node that you want to set up.
pTDefault stance translation for this joint in global space.
pQDefault stance orientation for this joint in global space, expressed as a quaternion.
pSDefault stance scale for this joint in global space.
Returns
FALSE if an error occured. This usually comes from wrong index (check 'pElementId' and 'pNodeId').
bool HIKCreatureSetHasLimits ( HIKCreature pCreature,
int  pChainId,
int  pNodeId 
)

Declares a chain node implements limits.

Has to be called before HIKCreatureCharacterizeGeometry(...) Number of limits for a Chain should be declared in the HIKCreatureChainDefinition structure first.

Parameters
pCreatureThe creature you want to set up.
pChainIdThe unique ID of the Chain that you want to set up.
pNodeIdThe unique ID of the Node that you want to set up.
bool HIKCreatureSetHasParentOffset ( HIKCreature pCreature,
int  pChainId,
int  pNodeId 
)

Only relevant when working in local coordinates.

Declares a parent offset for a chain node. Has to be called before HIKCreatureCharacterizeGeometry(...) Number of parent offsets for a Chain should be declared in the HIKCreatureChainDefinition structure first.

Parameters
pCreatureThe creature you want to set up.
pChainIdThe unique ID of the Chain that you want to set up.
pNodeIdThe unique ID of the Node that you want to set up.
bool HIKCreatureSetLimitsfv ( HIKCreature pCreature,
int  pElementId,
int  pNodeId,
const float  pMin[3],
const float  pMax[3],
const float  pPreQ[4],
const float  pPostQ[4],
int  pActiveMask,
eHIKRotationOrder  pRotationOrder 
)

Set up limits for Node pNodeId.

Parameters
pCreatureThe creature you want to set up.
pElementIdThe unique ID of the Element that you want to set up (ChainId or -SectionId-1).
pNodeIdThe unique ID of the Node that you want to set up.
pMinDetermines the minimum rotation, in radians, that the joint can achieve around each axis. The order in which the X, Y and Z axes should be represented in this array depends on the value set for the pRotationOrder parameter.
pMaxDetermines the maximum rotation, in radians, that the joint can achieve around each axis. The order in which the X, Y and Z axes should be represented in this array depends on the value set for the pRotationOrder parameter.
pPreQA quaternion that defines the pre-rotation offset, which HumanIK will apply to the rotation of this Node before testing whether the orientation of the Node lies within the minimum and maximum limits.
pPostQA quaternion that defines the post-rotation offset, which HumanIK will apply to the rotation of this Node after testing whether the orientation of the Node lies within the minimum and maximum limits.
pActiveMaskBit mask that determines which axes are activated. This mask may include any one or more of the elements in the HIKLimitActiveMask enumeration. You can combine multiple values using the | operator (bitwise OR).
pRotationOrderAn element from the HIKRotationOrder enumeration that indicates the order in which the X, Y and Z axes are listed in the pMin and pMax parameters. This rotation order also determines the order in which HumanIK calculates Euler rotations. Changing this order can help to avoid or alleviate issues with gimbal locking.

HumanIK always interprets the first axis in this rotation order as the roll axis for the Node. This axis should align with the bone attached to the joint, controlling the way that bone rolls or twists around its center.
void HIKCreatureSetNodeStateTQSfv ( const HIKCreature pCreature,
HIKCreatureState pCreatureState,
int  pElementId,
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 from Chain pChainId in HIKCreatureState pCreatureState.

Values are expressed using separate arrays.

Parameters
pCreatureHIKCreature for which you want to set the translation, rotation and scaling values.
pCreatureStateHIKCreatureState in which you want to set the translation, rotation and scaling values.
pElementIdUnique ID of the Element whose data you want to set (chainId or -sectionId-1)
pNodeIdUnique ID of the Node whose data you want to set.
pTTranslation value to set, in global space.
pQRotation value to set, in global space.
pSScaling value to set, in global space.
bool HIKCreatureSetParentOffsetfv ( HIKCreature pCreature,
int  pElementId,
int  pNodeId,
const float  pT[4],
const float  pQ[4],
const float  pS[4] 
)

Only relevant when working in local coordinates.

Set the parent offset for Node pNodeId.

This function is needed only if the parent joint is unknown to HumanIK

Parameters
pCreatureThe creature you want to set up.
pElementIdThe unique ID of the Element that you want to set up (ChainId or -SectionId-1).
pNodeIdThe unique ID of the Node that you want to set up.
pTThe parent node translation offset, relative to the next HumanIK Node above the parent in the joint chain.
pQThe parent node rotation offset, expressed as a quaternion., relative to the next HumanIK Node above the parent in the joint chain. This value must be normalized. You can calculate this offset as follows:
pParentQOffset = inverse(HIKParentGQ) * RealParentGQ
where:
  • HIKParentGQ is a quaternion containing the rotation of the next HumanIK joint above the unknown parent joint in the skeletal hierarchy, expressed in global space
  • RealParentGQ is a quaternion containing the rotation of the unknown parent joint, expressed in global space.
pSThe parent node scaling offset, relative to the next HumanIK Node above the parent in the joint chain.
void HIKCreatureSetSectionExtraPull ( HIKCreature pCreature,
int  pSectionId,
float  pValue 
)

Sets how a section should emphasizes its pull (* Only relevant when doing FBIK)

Parameters
pCreatureThe creature you want to set up.
pSectionIdThe unique ID of the Section to set up.
pValueThe extra pull factor (0.0 means no extra pull (default))
bool HIKCreatureSetStateTransformTQS ( const HIKCreature pCreature,
HIKCreatureState pCreatureState,
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 HIKCreatureSetNodeStateTQS().

Parameters
pCreatureHIKCreature for which you want to set the data values.
pCreatureStateHIKCreatureState 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.

Go to the source code of this file.