Load/Store HumanIK Objects
This section describes the functions provided for saving HumanIK objects to files on disk, and for loading HumanIK objects into memory from saved files.
See also Saving and Loading HumanIK Objects.
|
| void | HIKDefaultAlignedFree (void *pAligned, HIKFree pFree) |
| | Frees a data block allocated using HIKDefaultAlignedMalloc(). More...
|
| |
| void * | HIKDefaultAlignedMalloc (size_t pSize, size_t pAlignment, HIKMalloc pMalloc) |
| | Allocates a data block aligned to the pAlignment pointer boundary. More...
|
| |
| HIKCharacter * | HIKLoadCharacter (const char *pFileName, const char *pValidationString, HIKMalloc pMalloc) |
| | Load file pFileName, and create an HIKCharacter object from its contents. More...
|
| |
| HIKCharacterState * | HIKLoadCharacterState (const char *pFileName, HIKCharacter *pCharacter, HIKMalloc pMalloc) |
| | Load file pFileName, and create an HIKCharacterState object from its contents. More...
|
| |
| void * | HIKLoadDataBlock (const char *pFileName, HIKDataDescription &pDataDesc, HIKMalloc pMalloc) |
| | Load file pFileName, and create a data set from its contents according to the data description provided in the pDataDesc argument. More...
|
| |
| HIKEffectorSetState * | HIKLoadEffectorState (const char *pFileName, HIKMalloc pMalloc) |
| | Load file pFileName, and create an HIKEffectorSetState object from its contents. More...
|
| |
| HIKPropertySetState * | HIKLoadPropertySetState (const char *pFileName, HIKMalloc pMalloc) |
| | Load file pFileName, and create an HIKPropertySetState object from its contents. More...
|
| |
| bool | HIKSaveCharacter (const char *pFileName, HIKCharacter *pCharacter, HIKMalloc pMalloc, HIKFree pFree, float pUnitScale=1.0f) |
| | Save HIKCharacter pCharacter to file pFileName. More...
|
| |
| bool | HIKSaveCharacterState (const char *pFileName, HIKCharacter *pCharacter, HIKCharacterState *pState, int pTransformMode, float pUnitScale=1.0f) |
| | Save HIKCharacterState pState to file pFileName. More...
|
| |
| void | HIKSaveDataBlock (const char *pFileName, const HIKDataDescription &pDataDesc, const void *pDataBlock) |
| | Save the data set located in memory at pDataBlock to file pFileName. More...
|
| |
| bool | HIKSaveEffectorState (const char *pFileName, HIKEffectorSetState *pState, float pUnitScale=1.0f) |
| | Save HIKEffectorSetState pState to file pFileName. More...
|
| |
| bool | HIKSavePropertySetState (const char *pFileName, HIKPropertySetState *pState, float pUnitScale=1.0f) |
| | Save HIKPropertySetState pState to file pFileName. More...
|
| |
| void HIKDefaultAlignedFree |
( |
void * |
pAligned, |
|
|
HIKFree |
pFree |
|
) |
| |
|
inline |
Frees a data block allocated using HIKDefaultAlignedMalloc().
- Parameters
-
| pAligned | Pointer allocated using HIKDefaultAlignedMalloc(). |
| pFree | Pointer to a memory de-allocation function. If you do not have a custom memory de-allocation function, use &free. |
| void * HIKDefaultAlignedMalloc |
( |
size_t |
pSize, |
|
|
size_t |
pAlignment, |
|
|
HIKMalloc |
pMalloc |
|
) |
| |
|
inline |
Allocates a data block aligned to the pAlignment pointer boundary.
This allocator is used in HIKSaveDataBlock() to align the resulting dataset to 16 bytes.
- Parameters
-
| pSize | Size of the block of data to allocate. |
| pAlignment | Required address alignment. |
| pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
- Returns
- A void pointer to the aligned block. You must use HIKDefaultAlignedFree() to free this memory.
| HIKCharacter * HIKLoadCharacter |
( |
const char * |
pFileName, |
|
|
const char * |
pValidationString, |
|
|
HIKMalloc |
pMalloc |
|
) |
| |
|
inline |
Load file pFileName, and create an HIKCharacter object from its contents.
- Parameters
-
| pFileName | Path and file name of the file to load. |
| pValidationString | The customer identification string given to you by Autodesk to license the use of HumanIK in your project. |
| pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
- Returns
- An HIKCharacter object if the file is valid, otherwise NULL.
Load file pFileName, and create an HIKCharacterState object from its contents.
- Parameters
-
| pFileName | Path and file name of the file to load. |
| pCharacter | HIKCharacter used to create the HIKCharacterState loaded from the file. |
| pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
- Returns
- An HIKCharacterState if the file is valid, otherwise NULL.
Load file pFileName, and create a data set from its contents according to the data description provided in the pDataDesc argument.
For more information about data sets, see Setting and Retrieving Animation Data.
- Parameters
-
| pFileName | Path and file name of the file to load. |
| pDataDesc | Data description that defines the memory layout of the data set contained in the file. |
| pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
- Returns
- A void pointer to the new data set.
Load file pFileName, and create an HIKEffectorSetState object from its contents.
- Parameters
-
| pFileName | Path and file name of the file to load. |
| pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
- Returns
- An HIKEffectorSetState if the file is valid, otherwise NULL.
Load file pFileName, and create an HIKPropertySetState object from its contents.
- Parameters
-
| pFileName | Path and file name of the file to load. |
| pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
- Returns
- An HIKPropertySetState if the file is valid, otherwise NULL.
Save HIKCharacter pCharacter to file pFileName.
Where possible, it is recommended that you use the HIKWriteToStream() function to export your HIKCharacter instead, as it saves more information about your character. See HIKWriteToStream() and HIKReadFromStream().
- Parameters
-
| pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
| pCharacter | HIKCharacter to be saved. |
| pMalloc | Pointer to a memory allocation function. If you do not have a custom memory allocation function, use &malloc. |
| pFree | Pointer to a memory de-allocation function. If you do not have a custom memory de-allocation function, use &free. |
- Returns
- True if the operation was succesful, otherwise false.
| bool HIKSaveCharacterState |
( |
const char * |
pFileName, |
|
|
HIKCharacter * |
pCharacter, |
|
|
HIKCharacterState * |
pState, |
|
|
int |
pTransformMode, |
|
|
float |
pUnitScale = 1.0f |
|
) |
| |
|
inline |
Save HIKCharacterState pState to file pFileName.
- Parameters
-
| pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
| pCharacter | The HIKCharacter used to create the HIKCharacterState being saved. |
| pState | HIKCharacterState to save. |
| pTransformMode | Determines whether the Node transforms in the saved HIKCharacterState will be expressed in global space or local space. 0 = global space, 1 = local space. |
- Returns
- True if the operation was succesful, otherwise false.
| void HIKSaveDataBlock |
( |
const char * |
pFileName, |
|
|
const HIKDataDescription & |
pDataDesc, |
|
|
const void * |
pDataBlock |
|
) |
| |
|
inline |
Save the data set located in memory at pDataBlock to file pFileName.
For more information about data sets, see Setting and Retrieving Animation Data.
- Parameters
-
| pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
| pDataDesc | Data description that defines the memory layout of the data set to be saved. |
| pDataBlock | Pointer to the beginning of the data set in memory. |
| bool HIKSaveEffectorState |
( |
const char * |
pFileName, |
|
|
HIKEffectorSetState * |
pState, |
|
|
float |
pUnitScale = 1.0f |
|
) |
| |
|
inline |
Save HIKEffectorSetState pState to file pFileName.
- Parameters
-
| pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
| pState | HIKEffectorSetState to save. |
- Returns
- True if the operation was succesful, otherwise false.
| bool HIKSavePropertySetState |
( |
const char * |
pFileName, |
|
|
HIKPropertySetState * |
pState, |
|
|
float |
pUnitScale = 1.0f |
|
) |
| |
|
inline |
Save HIKPropertySetState pState to file pFileName.
- Parameters
-
| pFileName | Path and file name of the file to create. If the file already exists, it is overwritten. |
| pState | HIKPropertySetState to save. |
- Returns
- True if the operation was succesful, otherwise false.