42 #ifndef _CRT_SECURE_NO_WARNINGS
43 #define _CRT_SECURE_NO_WARNINGS
53 #if defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__ICL)
55 #define attribute_align(a) __declspec(align(a))
56 #elif defined(__GNUC__) || defined(__SNC__) || defined(__MWERKS__)
58 #define attribute_align(a) __attribute__ ((aligned(a)))
192 #define HEADERLENGTH 16
194 const char HIKCHARACTER_HEADER[] =
"HIKCHARACTER000\0";
195 const char HIKCHARACTERSTATE_HEADER[] =
"HIKSTATE0000000\0";
196 const char HIKCHARACTEREFFECTOR_HEADER[] =
"HIKEFFECTOR0000\0";
197 const char HIKCHARACTERPROPERTY_HEADER[] =
"HIKPROPERTY0000\0";
198 const char HIKCHARACTERDATABLOCK_HEADER[] =
"HIKDATABLOCK000\0";
199 const int MagicNumber = 0xabcdef12;
203 char HeaderStr[HEADERLENGTH];
208 Header():bSwap(false) {}
209 inline void Init(
const char *_Header)
211 #if (_MSC_VER == 1500)
212 strcpy(HeaderStr, _Header);
214 strcpy_s(HeaderStr, HEADERLENGTH, _Header);
218 template<
typename HIKFile>
219 inline bool Write(HIKFile pFile)
const;
221 template<
typename HIKFile>
222 inline bool Read(HIKFile pFile);
225 template<
typename type>
bool Write(
const char* pFileName,
const type& pStream);
226 template<
typename type>
bool WriteBlock(
const char* pFileName,
const size_t& pElementSize,
const size_t& pElementCount, type& pStream);
228 template<
typename type>
bool Read(
const char* pFileName, type& pStream);
229 template<
typename type>
bool ReadBlock(
const char* pFileName,
const size_t pOffset,
const size_t& pElementSize,
const size_t& pElementCount, type& pStream);
231 inline void SwapBytes4(
char* ToSwap)
236 ToSwap[0] = ToSwap[3];
239 ToSwap[1] = ToSwap[2];
243 template<
typename type,
int count>
class Field
246 typedef type FieldType;
250 FieldType mField[eCount];
252 inline void Init(FieldType pValue) { memset(mField, (
int)pValue,
sizeof(FieldType)*eCount); }
254 template<
typename HIKFile>
255 inline bool Write(HIKFile pFile)
const;
257 template<
typename HIKFile>
258 inline bool Read(HIKFile pFile,
bool bSwap);
261 template<
typename type,
int count1,
int count2>
class Field2D
264 typedef type FieldType;
268 eCount = eCount1*eCount2,
270 FieldType mField[eCount1][eCount2];
272 inline void Init(FieldType pValue) { memset(mField, (
int)pValue,
sizeof(FieldType)*eCount); }
274 template<
typename HIKFile>
275 inline bool Write(HIKFile pFile)
const;
277 template<
typename HIKFile>
278 inline bool Read(HIKFile pFile,
bool bSwap);
281 class HIKCharacterStream
284 Field<int, LastNodeId> mNodeFlag;
285 Field2D<float, LastNodeId, 4> mTOffset;
286 Field2D<float, LastNodeId, 4> mQOffset;
287 Field2D<float, LastNodeId, 4> mSOffset;
288 Field2D<float, LastNodeId, 4> mParentTOffset;
289 Field2D<float, LastNodeId, 4> mParentQOffset;
290 Field2D<float, LastNodeId, 4> mParentSOffset;
291 Header HIKCharHeader;
295 HIKCharHeader.Init(HIKCHARACTER_HEADER);
301 mParentTOffset.Init(0.0f);
302 mParentQOffset.Init(0.0f);
303 mParentSOffset.Init(0.0f);
306 template<
typename HIKFile>
307 inline bool Write(HIKFile pFile)
const
311 lFlag = HIKCharHeader.Write(pFile);
312 lFlag = lFlag && mNodeFlag.Write(pFile);
313 lFlag = lFlag && mTOffset.Write(pFile);
314 lFlag = lFlag && mQOffset.Write(pFile);
315 lFlag = lFlag && mSOffset.Write(pFile);
316 lFlag = lFlag && mParentTOffset.Write(pFile);
317 lFlag = lFlag && mParentQOffset.Write(pFile);
318 lFlag = lFlag && mParentSOffset.Write(pFile);
323 template<
typename HIKFile>
324 inline bool Read(HIKFile pFile)
328 if(HIKCharHeader.Read(pFile))
330 lFlag = mNodeFlag.Read(pFile, HIKCharHeader.bSwap);
331 lFlag = lFlag && mTOffset.Read(pFile, HIKCharHeader.bSwap);
332 lFlag = lFlag && mQOffset.Read(pFile, HIKCharHeader.bSwap);
333 lFlag = lFlag && mSOffset.Read(pFile, HIKCharHeader.bSwap);
334 lFlag = lFlag && mParentTOffset.Read(pFile, HIKCharHeader.bSwap);
335 lFlag = lFlag && mParentQOffset.Read(pFile, HIKCharHeader.bSwap);
336 lFlag = lFlag && mParentSOffset.Read(pFile, HIKCharHeader.bSwap);
347 HIKCharacterStream lStream;
352 if(Read(pFileName, lStream))
354 memcpy(pDef.
mUsedNodes, lStream.mNodeFlag.mField,
sizeof(
int)*lStream.mNodeFlag.eCount);
361 const char* pValidationString,
366 HIKCharacterStream lStream;
372 if(Read(pFileName, lStream))
376 memcpy(lDef.
mUsedNodes, lStream.mNodeFlag.mField,
sizeof(
int)*lStream.mNodeFlag.eCount);
391 HIKSetParentOffsetfv(lCharacter, i, &lStream.mParentTOffset.mField[i][0], &lStream.mParentQOffset.mField[i][0], &lStream.mParentSOffset.mField[i][0]);
404 HIKCharacterStream lStream;
418 HIKGetParentOffsetfv(pCharacter, i, &lStream.mParentTOffset.mField[i][0], &lStream.mParentQOffset.mField[i][0], &lStream.mParentSOffset.mField[i][0]);
419 lStream.mParentTOffset.mField[i][0] *= pUnitScale;
420 lStream.mParentTOffset.mField[i][1] *= pUnitScale;
421 lStream.mParentTOffset.mField[i][2] *= pUnitScale;
432 HIKGetNodeStateTQSfv(pCharacter, lState, i, &lStream.mTOffset.mField[i][0], &lStream.mQOffset.mField[i][0], &lStream.mSOffset.mField[i][0]);
433 lStream.mTOffset.mField[i][0] *= pUnitScale;
434 lStream.mTOffset.mField[i][1] *= pUnitScale;
435 lStream.mTOffset.mField[i][2] *= pUnitScale;
441 return Write(pFileName, lStream);
444 class HIKCharacterStateStream
447 Field<int, 1> mTransformMode;
448 Field<int, LastNodeId> mNodeId;
449 attribute_align(16) Field2D<
float,
LastNodeId, 12> mTransformData;
450 Header HIKCharStateHeader;
454 mTransformMode.Init(0);
456 mTransformData.Init(0.0f);
457 HIKCharStateHeader.Init(HIKCHARACTERSTATE_HEADER);
460 template<
typename HIKFile>
461 inline bool Write(HIKFile pFile)
const
465 lFlag = HIKCharStateHeader.Write(pFile);
466 lFlag = lFlag && mTransformMode.Write(pFile);
467 lFlag = lFlag && mNodeId.Write(pFile);
468 lFlag = lFlag && mTransformData.Write(pFile);
473 template<
typename HIKFile>
474 inline bool Read(HIKFile pFile)
478 if(HIKCharStateHeader.Read(pFile))
480 lFlag = mTransformMode.Read(pFile, HIKCharStateHeader.bSwap);
481 lFlag = lFlag && mNodeId.Read(pFile, HIKCharStateHeader.bSwap);
482 lFlag = lFlag && mTransformData.Read(pFile, HIKCharStateHeader.bSwap);
492 HIKCharacterStateStream lStateStream;
497 if(Read(pFileName, lStateStream))
508 lDataDesc.
mHIKNodeId = &lStateStream.mNodeId.mField[0];
517 HIKCharacterStateStream lStateStream;
527 lDataDesc.
mHIKNodeId = &lStateStream.mNodeId.mField[0];
536 lStateStream.mNodeId.mField[lLastId++] = i;
540 lStateStream.mNodeId.mField[lLastId] =
HIKLastNode;
541 lStateStream.mTransformMode.mField[0] = pTransformMode;
548 lStateStream.mTransformData.mField[i][0] *= pUnitScale;
549 lStateStream.mTransformData.mField[i][1] *= pUnitScale;
550 lStateStream.mTransformData.mField[i][2] *= pUnitScale;
554 return Write(pFileName, lStateStream);
557 class HIKEffectorSetStateStream
560 Field<float, LastEffectorId> mReachT;
561 Field<float, LastEffectorId> mReachR;
562 Field<float, LastEffectorId> mResist;
563 Field<float, LastEffectorId> mPull;
564 Field<float, 2> mHandPullHips;
566 Field2D<float, LastEffectorId, 12> mTQS;
567 Field2D<float, HIKLastFloorId, 16> mFloorTQS;
568 Header HIKEffectorHeader;
576 mHandPullHips.Init(0.0f);
578 mFloorTQS.Init(0.0f);
579 HIKEffectorHeader.Init(HIKCHARACTEREFFECTOR_HEADER);
582 template<
typename HIKFile>
583 inline bool Write(HIKFile pFile)
const
587 lFlag = HIKEffectorHeader.Write(pFile);
588 lFlag = lFlag && mReachT.Write(pFile);
589 lFlag = lFlag && mReachR.Write(pFile);
590 lFlag = lFlag && mResist.Write(pFile);
591 lFlag = lFlag && mPull.Write(pFile);
592 lFlag = lFlag && mHandPullHips.Write(pFile);
593 lFlag = lFlag && mTQS.Write(pFile);
594 lFlag = lFlag && mFloorTQS.Write(pFile);
598 template<
typename HIKFile>
599 inline bool Read(HIKFile pFile)
603 if(HIKEffectorHeader.Read(pFile))
605 lFlag = mReachT.Read(pFile, HIKEffectorHeader.bSwap);
606 lFlag = lFlag && mReachR.Read(pFile, HIKEffectorHeader.bSwap);
607 lFlag = lFlag && mResist.Read(pFile, HIKEffectorHeader.bSwap);
608 lFlag = lFlag && mPull.Read(pFile, HIKEffectorHeader.bSwap);
609 lFlag = lFlag && mHandPullHips.Read(pFile, HIKEffectorHeader.bSwap);
610 lFlag = lFlag && mTQS.Read(pFile, HIKEffectorHeader.bSwap);
611 lFlag = lFlag && mFloorTQS.Read(pFile, HIKEffectorHeader.bSwap);
620 HIKEffectorSetStateStream lEffectorStream;
623 lEffectorStream.Init();
625 if(Read(pFileName, lEffectorStream))
634 HIKSetResist(lState, i, lEffectorStream.mResist.mField[i]);
635 HIKSetPull(lState, i, lEffectorStream.mPull.mField[i]);
636 HIKSetEffectorStateTQSfv(lState, i, &lEffectorStream.mTQS.mField[i][0],&lEffectorStream.mTQS.mField[i][4], &lEffectorStream.mTQS.mField[i][8]);
653 HIKEffectorSetStateStream lEffectorStream;
654 lEffectorStream.Init();
661 lEffectorStream.mResist.mField[i] =
HIKGetResist(pState, i);
662 lEffectorStream.mPull.mField[i] =
HIKGetPull(pState, i);
664 HIKGetEffectorStateTQSfv(pState, i, &lEffectorStream.mTQS.mField[i][0], &lEffectorStream.mTQS.mField[i][4], &lEffectorStream.mTQS.mField[i][8]);
665 lEffectorStream.mTQS.mField[i][0] *= pUnitScale;
666 lEffectorStream.mTQS.mField[i][1] *= pUnitScale;
667 lEffectorStream.mTQS.mField[i][2] *= pUnitScale;
676 lEffectorStream.mFloorTQS.mField[i][0] *= pUnitScale;
677 lEffectorStream.mFloorTQS.mField[i][1] *= pUnitScale;
678 lEffectorStream.mFloorTQS.mField[i][2] *= pUnitScale;
681 return Write(pFileName, lEffectorStream);
684 class HIKPropertySetStream
687 Field<int, HIKLastPropertyId> mMode;
688 Field<float, HIKLastPropertyId> mValue;
689 Header HIKPropertySetHeader;
695 HIKPropertySetHeader.Init(HIKCHARACTERPROPERTY_HEADER);
698 template<
typename HIKFile>
699 inline bool Write(HIKFile pFile)
const
703 lFlag = HIKPropertySetHeader.Write(pFile);
704 lFlag = lFlag && mMode.Write(pFile);
705 lFlag = lFlag && mValue.Write(pFile);
710 template<
typename HIKFile>
711 inline bool Read(HIKFile pFile)
715 if(HIKPropertySetHeader.Read(pFile))
717 lFlag = mMode.Read(pFile, HIKPropertySetHeader.bSwap);
718 lFlag = lFlag && mValue.Read(pFile, HIKPropertySetHeader.bSwap);
728 HIKPropertySetStream lStream;
733 if(Read(pFileName, lStream))
750 HIKPropertySetStream lStream;
788 lStream.mValue.mField[i] *= pUnitScale;
793 return Write(pFileName, lStream);
796 class HIKDataDescriptionStream
799 Field<int, 1> mTransformSpace;
800 Field<int, 1> mTOffset;
801 Field<int, 1> mQOffset;
802 Field<int, 1> mSOffset;
803 Field<int, 1> mStride;
804 Field<int, LastNodeId> mHIKNodeId;
805 Header HIKDataBlockHeader;
809 mTransformSpace.Init(0);
815 HIKDataBlockHeader.Init(HIKCHARACTERDATABLOCK_HEADER);
818 template<
typename HIKFile>
819 inline bool Write(HIKFile pFile)
const
823 lFlag = HIKDataBlockHeader.Write(pFile);
824 lFlag = lFlag && mTransformSpace.Write(pFile);
825 lFlag = lFlag && mTOffset.Write(pFile);
826 lFlag = lFlag && mQOffset.Write(pFile);
827 lFlag = lFlag && mSOffset.Write(pFile);
828 lFlag = lFlag && mStride.Write(pFile);
829 lFlag = lFlag && mHIKNodeId.Write(pFile);
834 template<
typename HIKFile>
835 inline bool Read(HIKFile pFile)
839 if(HIKDataBlockHeader.Read(pFile))
841 lFlag = mTransformSpace.Read(pFile, HIKDataBlockHeader.bSwap);
842 lFlag = lFlag && mTOffset.Read(pFile, HIKDataBlockHeader.bSwap);
843 lFlag = lFlag && mQOffset.Read(pFile, HIKDataBlockHeader.bSwap);
844 lFlag = lFlag && mSOffset.Read(pFile, HIKDataBlockHeader.bSwap);
845 lFlag = lFlag && mStride.Read(pFile, HIKDataBlockHeader.bSwap);
846 lFlag = lFlag && mHIKNodeId.Read(pFile, HIKDataBlockHeader.bSwap);
855 const size_t lPointerSize =
sizeof(
void*);
856 const size_t lRequestedSize = pSize + pAlignment - 1 + lPointerSize;
857 void* lRawPointer = (*pMalloc)(lRequestedSize);
858 void* lStart = (
char*)lRawPointer + lPointerSize;
859 void* lAligned = (
void*)(((
size_t)((
char*)lStart+pAlignment-1)) & ~(pAlignment-1));
860 *(
void**)((
char*)lAligned-lPointerSize) = lRawPointer;
866 void* lRawPointer = *(
void**)((
char*)pAligned-
sizeof(
void*));
867 (*pFree)(lRawPointer);
872 void *lDataBlock = NULL;
873 HIKDataDescriptionStream lStream;
876 if(Read(pFileName, lStream))
879 pDataDesc.
mTOffset = (size_t)lStream.mTOffset.mField[0];
880 pDataDesc.
mQOffset = (
size_t)lStream.mQOffset.mField[0];
881 pDataDesc.
mSOffset = (size_t)lStream.mSOffset.mField[0];
882 pDataDesc.
mStride = (
size_t)lStream.mStride.mField[0];
887 pDataDesc.
mHIKNodeId[i] = lStream.mHIKNodeId.mField[i];
889 while(lStream.mHIKNodeId.mField[i++] !=
HIKLastNode);
892 const size_t align = 16;
894 ReadBlock(pFileName,
sizeof(HIKDataDescriptionStream), (
size_t)pDataDesc.
mStride, (
size_t)(i-1), lDataBlock);
901 HIKDataDescriptionStream lStream;
905 lStream.mTOffset.mField[0] = (int)pDataDesc.
mTOffset;
906 lStream.mQOffset.mField[0] = (
int)pDataDesc.
mQOffset;
907 lStream.mSOffset.mField[0] = (int)pDataDesc.
mSOffset;
908 lStream.mStride.mField[0] = (
int)pDataDesc.
mStride;
913 lStream.mHIKNodeId.mField[i] = pDataDesc.
mHIKNodeId[i];
918 if(Write(pFileName, lStream))
921 WriteBlock(pFileName, (
size_t)pDataDesc.
mStride, (
size_t)(i-1), pDataBlock);
926 #if !defined(__ghs__) && ( defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__ICL) || defined(__GNUC__) || defined(__SNC__) )
927 #include "hikdump_std.inl"
void HIKCharacterStateDestroy(HIKCharacterState *pCharacterState, HIKFree pFree)
Destroy HIKCharacterState pCharacterState.
float HIKGetRotationActive(const HIKEffectorSetState *pEffectorSetState, int pEffectorIndex)
Retrieve the Reach Rotation constraint for Effector pEffectorIndex.
HIKEffectorSetState * HIKLoadEffectorState(const char *pFileName, HIKMalloc pMalloc)
Load file pFileName, and create an HIKEffectorSetState object from its contents.
Definition: hikdump.h:618
Definition: humanik.h:482
bool HIKSaveCharacter(const char *pFileName, HIKCharacter *pCharacter, HIKMalloc pMalloc, HIKFree pFree, float pUnitScale=1.0f)
Save HIKCharacter pCharacter to file pFileName.
Definition: hikdump.h:400
Defines the distance from the wrist to the outside edge of the model's hand (the side with the pinky)...
Definition: hikproperty.h:159
void HIKSetParentOffsetfv(HIKCharacter *pCharacter, int pNodeId, const float pParentTOffset[4], const float pParentQOffset[4], const float pParentSOffset[4])
Set the parent offset for Node pNodeId.
int HIKGetPropertyMode(HIKPropertySetState *pState, int pPropertyId)
Retrieves the current mode set for property pPropertyId in HIKPropertySetState pState.
void HIKGetDefaultState(const HIKCharacter *pCharacter, HIKCharacterState *pCharacterState)
Retrieve the default T-stance for character pCharacter, storing it in HIKCharacterState pCharacterSta...
Defines the distance from the wrist to the bottom of the model's hand.
Definition: hikproperty.h:154
float HIKGetHandPullHips(const HIKEffectorSetState *pEffectorSetState, int pLeft)
Retrieve the amount of pull the left or right hand can exert on the hips.
void *(* HIKMalloc)(size_t)
Definition: humanik.h:388
The Hips and Chest Offset properties offset the translation of the character's hips and chest along e...
Definition: hikproperty.h:276
float HIKGetTranslationActive(const HIKEffectorSetState *pEffectorSetState, int pEffectorIndex)
Retrieve the Reach Translation constraint for Effector pEffectorIndex.
Definition: hikproperty.h:87
Definition: humanik.h:315
Definition: humanik.h:1616
void HIKSetResist(HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, float pValue)
Set the Resist constraint for Effector pEffectorIndex.
void HIKGetEffectorStateTQSfv(const HIKEffectorSetState *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 pEf...
float HIKGetPropertyValue(HIKPropertySetState *pState, int pPropertyId)
Retrieves the current value set for property pPropertyId in HIKPropertySetState pState.
HIKPropertySetState * HIKPropertySetStateCreate(HIKMalloc pMalloc)
Create a new HIKPropertySetState.
HIKCharacterState * HIKCharacterStateCreate(const HIKCharacter *pCharacter, HIKMalloc pMalloc)
Create a new HIKCharacterState.
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...
void * HIKDefaultAlignedMalloc(size_t pSize, size_t pAlignment, HIKMalloc pMalloc)
Allocates a data block aligned to the pAlignment pointer boundary.
Definition: hikdump.h:853
size_t mQOffset
Definition: humanik.h:1620
Defines the distance from the wrist to the middle of the model's hand (its knuckles, or finger base).
Definition: hikproperty.h:156
void HIKSetCharacterizeNodeStateTQSfv(HIKCharacter *pCharacter, 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 t...
Main header file for HumanIK.
A description of a data set that contains separate translation, quaternion rotation, and scaling values for multiple different Nodes in an HIKCharacterState.
Definition: humanik.h:1610
The Hips and Chest Offset properties offset the translation of the character's hips and chest along e...
Definition: hikproperty.h:279
int HIKGetNodeUse(const HIKCharacter *pCharacter, int pNodeId)
Retrieve the characterization flag set for Node pNodeId in HIKCharacter pCharacter.
The Hips and Chest Offset properties offset the translation of the character's hips and chest along e...
Definition: hikproperty.h:280
Defines an HIKEffectorSetState.
Definition: humanik.h:418
Definition: humanik.h:1593
Header file for character properties.
HIKCharacter * HIKCharacterCreate(const HIKCharacterDefinition *pCharacterDefinition, HIKMalloc pMalloc, const char *pValidationString)
Create a new HIKCharacter.
void(* HIKFree)(void *)
Definition: humanik.h:393
Definition: hikproperty.h:77
float HIKGetPull(const HIKEffectorSetState *pEffectorSetState, int pEffectorIndex)
Retrieve the Pull constraint for Effector pEffectorIndex.
Defines the distance from the ankle to the outside edge of the model's foot.
Definition: hikproperty.h:152
void HIKSetPropertyValue(HIKPropertySetState *pState, int pPropertyId, float pValue)
Sets the current value for property pPropertyId in HIKPropertySetState pState.
size_t mTOffset
Definition: humanik.h:1619
int * mHIKNodeId
Definition: humanik.h:1624
Defines the distance from the ankle to the bottom of the model's foot.
Definition: hikproperty.h:147
void HIKSetEffectorStateTQSfv(HIKEffectorSetState *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 pEffecto...
bool HIKCharacterizeGeometry(HIKCharacter *pCharacter)
Set up and initialize character pCharacter for solving.
Defines the distance from the ankle to the back of the model's foot.
Definition: hikproperty.h:148
enum HIKDataDescription::@0 mTransformSpace
Defines a character's properties.
Definition: humanik.h:457
void HIKSetHandPullHips(HIKEffectorSetState *pEffectorSetState, int pLeft, float pValue)
Set the amount of pull the left or right hand can exert on the hips.
void HIKSetTranslationActive(HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, float pValue)
Set the Reach Translation constraint for Effector pEffectorIndex.
HIKCharacterState * HIKLoadCharacterState(const char *pFileName, HIKCharacter *pCharacter, HIKMalloc pMalloc)
Load file pFileName, and create an HIKCharacterState object from its contents.
Definition: hikdump.h:490
Defines the distance from the ankle to the inside edge of the model's foot (the instep).
Definition: hikproperty.h:151
The Hips and Chest Offset properties offset the translation of the character's hips and chest along e...
Definition: hikproperty.h:281
Defines the distance from the ankle to the front end of the model's toes.
Definition: hikproperty.h:150
Marks the end of the enumeration.
Definition: humanik.h:332
void HIKGetParentOffsetfv(const HIKCharacter *pCharacter, int pNodeId, float pParentTOffset[4], float pParentQOffset[4], float pParentSOffset[4])
Retrieve the parent offset set for Node pNodeId.
HIKCharacter * HIKLoadCharacter(const char *pFileName, const char *pValidationString, HIKMalloc pMalloc)
Load file pFileName, and create an HIKCharacter object from its contents.
Definition: hikdump.h:360
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 provid...
Definition: hikdump.h:870
Defines a pose for a character.
Definition: humanik.h:441
Definition: humanik.h:1615
float HIKGetResist(const HIKEffectorSetState *pEffectorSetState, int pEffectorIndex)
Retrieve the Resist constraint for Effector pEffectorIndex.
HIKEffectorSetState * HIKEffectorSetStateCreate(HIKMalloc pMalloc)
Create a new HIKEffectorSetState.
Definition: humanik.h:483
void HIKSetPull(HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, float pValue)
Set the Pull constraint for Effector pEffectorIndex.
Definition: hikproperty.h:82
Marks the end of the enumeration.
Definition: hikproperty.h:513
size_t mStride
Definition: humanik.h:1623
The Hips and Chest Offset properties offset the translation of the character's hips and chest along e...
Definition: hikproperty.h:277
Definition: humanik.h:481
void HIKSaveDataBlock(const char *pFileName, const HIKDataDescription &pDataDesc, const void *pDataBlock)
Save the data set located in memory at pDataBlock to file pFileName.
Definition: hikdump.h:899
void HIKSetPropertyMode(HIKPropertySetState *pState, int pPropertyId, int pMode)
Sets the current mode for property pPropertyId in HIKPropertySetState pState.
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 pDat...
void HIKDefaultAlignedFree(void *pAligned, HIKFree pFree)
Frees a data block allocated using HIKDefaultAlignedMalloc().
Definition: hikdump.h:864
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 HIKChara...
int mUsedNodes[LastNodeId]
Definition: humanik.h:503
size_t mSOffset
Definition: humanik.h:1621
Defines the distance from the ankle to the middle of the model's foot (its ball, or toe base)...
Definition: hikproperty.h:149
Defines which Nodes are to be used by an HIKCharacter.
Definition: humanik.h:497
Defines the distance from the wrist to the back of the model's hand.
Definition: hikproperty.h:155
Defines a character to be used with HumanIK.
Defines the distance from the wrist to the inside edge of the model's hand (the side of the thumb)...
Definition: hikproperty.h:158
void HIKSetRotationActive(HIKEffectorSetState *pEffectorSetState, int pEffectorIndex, float pValue)
Set the Reach Rotation constraint for Effector pEffectorIndex.
Marks the end of the enumeration.
Definition: humanik.h:257
bool HIKSaveCharacterState(const char *pFileName, HIKCharacter *pCharacter, HIKCharacterState *pState, int pTransformMode, float pUnitScale=1.0f)
Save HIKCharacterState pState to file pFileName.
Definition: hikdump.h:515
bool HIKSavePropertySetState(const char *pFileName, HIKPropertySetState *pState, float pUnitScale=1.0f)
Save HIKPropertySetState pState to file pFileName.
Definition: hikdump.h:748
Defines the distance from the wrist to the front end of the model's fingers.
Definition: hikproperty.h:157
The Hips and Chest Offset properties offset the translation of the character's hips and chest along e...
Definition: hikproperty.h:278
bool HIKSaveEffectorState(const char *pFileName, HIKEffectorSetState *pState, float pUnitScale=1.0f)
Save HIKEffectorSetState pState to file pFileName.
Definition: hikdump.h:651
HIKPropertySetState * HIKLoadPropertySetState(const char *pFileName, HIKMalloc pMalloc)
Load file pFileName, and create an HIKPropertySetState object from its contents.
Definition: hikdump.h:726