Constructors

Module description

This section describes the functions used to create HIK objects.

For details on memory management when creating these objects, see HumanIK Objects and Memory Management.

For details on using these functions in the context of initializing HumanIK, see Initialization.

Functions

HIKCharacterHIKCharacterCreate (const HIKCharacterDefinition *pCharacterDefinition, HIKMalloc pMalloc, const char *pValidationString)
 Create a new HIKCharacter. More...
 
HIKCharacterHIKCharacterCreateInPlace (const HIKCharacterDefinition *pCharacterDefinition, void *pBuffer, const char *pValidationString)
 Create a new HIKCharacter in the buffer pBuffer. More...
 
HIKCharacterStateHIKCharacterStateCreate (const HIKCharacter *pCharacter, HIKMalloc pMalloc)
 Create a new HIKCharacterState. More...
 
HIKCharacterStateHIKCharacterStateCreateInPlace (const HIKCharacter *pCharacter, void *pBuffer)
 Create a new HIKCharacterState in the buffer pBuffer. More...
 
HIKEffectorSetStateHIKEffectorSetStateCreate (HIKMalloc pMalloc)
 Create a new HIKEffectorSetState. More...
 
HIKEffectorSetStateHIKEffectorSetStateCreateInPlace (void *pBuffer)
 Create a new HIKEffectorSetState in the buffer pBuffer. More...
 
HIKPropertySetStateHIKPropertySetStateCreate (HIKMalloc pMalloc)
 Create a new HIKPropertySetState. More...
 
HIKPropertySetStateHIKPropertySetStateCreateInPlace (void *pBuffer)
 Create a new HIKPropertySetState in the buffer pBuffer. More...
 

Function Documentation

HIKCharacter* HIKCharacterCreate ( const HIKCharacterDefinition pCharacterDefinition,
HIKMalloc  pMalloc,
const char *  pValidationString 
)

Create a new HIKCharacter.

Parameters
pCharacterDefinitionThe HIKCharacterDefinition that specifies which Nodes your character will be using, and which Nodes have DoF and parent offsets.
pMallocPointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc.
pValidationStringThe customer identification string given to you by Autodesk to license the use of HumanIK in your project.
Returns
NULL if an error occurs during the creation. This may indicate an invalid license, or that required Nodes are missing in the character definition. You can determine which Nodes are missing by calling HIKValidateRequiredBone() on your HIKCharacterDefinition.
HIKCharacter* HIKCharacterCreateInPlace ( const HIKCharacterDefinition pCharacterDefinition,
void *  pBuffer,
const char *  pValidationString 
)

Create a new HIKCharacter in the buffer pBuffer.

Characters created using this function do not need to be destroyed with HIKCharacterDestroy(), as the memory allocation is typically managed outside HumanIK.

Parameters
pCharacterDefinitionThe HIKCharacterDefinition that specifies which Nodes your character will be using, and which Nodes have DoF and parent offsets.
pBufferPre-allocated memory buffer of the appropriate size, aligned on 16 bytes.
pValidationStringThe customer identification string ("Customer String") given to you by Autodesk to license the use of HumanIK in your project.
Returns
NULL if an error occurs during the creation. This may indicate an invalid license, or that required Nodes are missing in the character definition. You can determine which Nodes are missing by calling HIKValidateRequiredBone() on your HIKCharacterDefinition.
HIKCharacterState* HIKCharacterStateCreate ( const HIKCharacter pCharacter,
HIKMalloc  pMalloc 
)

Create a new HIKCharacterState.

Each characterized joint requires 128 bytes of memory.

Parameters
pCharacterHIKCharacter associated with this HIKCharacterState.
pMallocPointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc.
Remarks
This HIKCharacterState cannot be shared between different HIKCharacters.
HIKCharacterState* HIKCharacterStateCreateInPlace ( const HIKCharacter pCharacter,
void *  pBuffer 
)

Create a new HIKCharacterState in the buffer pBuffer.

HIKCharacterStates created using this function do not need to be destroyed with HIKCharacterStateDestroy(), as the memory allocation is typically managed outside HumanIK.

Parameters
pCharacterHIKCharacter associated with this HIKCharacterState.
pBufferPre-allocated memory buffer of the appropriate size, aligned on 16 bytes.
HIKEffectorSetState* HIKEffectorSetStateCreate ( HIKMalloc  pMalloc)

Create a new HIKEffectorSetState.

This HIKEffectorSetState will be used by the full-body IK solver.

Parameters
pMallocPointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc.
HIKEffectorSetState* HIKEffectorSetStateCreateInPlace ( void *  pBuffer)

Create a new HIKEffectorSetState in the buffer pBuffer.

This HIKEffectorSetState will be used by the full-body IK solver. HIKEffectorSetStates created using this function do not need to be destroyed with HIKEffectorSetStateDestroy(), as the memory allocation is typically managed outside HumanIK.

Parameters
pBufferPre-allocated memory buffer of the appropriate size, aligned on 16 bytes.
HIKPropertySetState* HIKPropertySetStateCreate ( HIKMalloc  pMalloc)

Create a new HIKPropertySetState.

Parameters
pMallocPointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc.
HIKPropertySetState* HIKPropertySetStateCreateInPlace ( void *  pBuffer)

Create a new HIKPropertySetState in the buffer pBuffer.

HIKPropertySetStates created using this function do not need to be destroyed with HIKPropertySetStateDestroy(), as the memory allocation is typically managed outside HumanIK.

Parameters
pBufferPre-allocated memory buffer of the appropriate size, aligned on 16 bytes.