constraints/CharacterSolver/HIK2014Solver/hikhostmb.h

constraints/CharacterSolver/HIK2014Solver/hikhostmb.h
/***************************************************************************************
Autodesk(R) Open Reality(R) Samples
(C) 2012 Autodesk, Inc. and/or its licensors
All rights reserved.
AUTODESK SOFTWARE LICENSE AGREEMENT
Autodesk, Inc. licenses this Software to you only upon the condition that
you accept all of the terms contained in the Software License Agreement ("Agreement")
that is embedded in or that is delivered with this Software. By selecting
the "I ACCEPT" button at the end of the Agreement or by copying, installing,
uploading, accessing or using all or any portion of the Software you agree
to enter into the Agreement. A contract is then formed between Autodesk and
either you personally, if you acquire the Software for yourself, or the company
or other legal entity for which you are acquiring the software.
AUTODESK, INC., MAKES NO WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE REGARDING THESE MATERIALS, AND MAKES SUCH MATERIALS AVAILABLE SOLELY ON AN
"AS-IS" BASIS.
IN NO EVENT SHALL AUTODESK, INC., BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING OUT OF PURCHASE
OR USE OF THESE MATERIALS. THE SOLE AND EXCLUSIVE LIABILITY TO AUTODESK, INC.,
REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THE
MATERIALS DESCRIBED HEREIN.
Autodesk, Inc., reserves the right to revise and improve its products as it sees fit.
Autodesk and Open Reality are registered trademarks or trademarks of Autodesk, Inc.,
in the U.S.A. and/or other countries. All other brand names, product names, or
trademarks belong to their respective holders.
GOVERNMENT USE
Use, duplication, or disclosure by the U.S. Government is subject to restrictions as
set forth in FAR 12.212 (Commercial Computer Software-Restricted Rights) and
DFAR 227.7202 (Rights in Technical Data and Computer Software), as applicable.
Manufacturer is Autodesk, Inc., 10 Duke Street, Montreal, Quebec, Canada, H3C 2L7.
***************************************************************************************/
#ifndef __HIKHOSTMB__H_
#define __HIKHOSTMB__H_
#include <fbsdk/fbsdk.h>
#include "hikhost.h"
#define LEFT_EXTRA_COLLAR 0
#define RIGHT_EXTRA_COLLAR 1
K_STATIC_ASSERT( LastEffectorId + 1 < ( 1 << 10 ) );
K_STATIC_ASSERT( LastNodeId + 1 < ( 1 << 10 ) );
class AnimationNode_Id
{
int mId;
public:
AnimationNode_Id();
AnimationNode_Id(const AnimationNode_Id &pSource);
AnimationNode_Id(const int pSource);
AnimationNode_Id(HIKEffectorId pId);
AnimationNode_Id(HIKNodeId pId);
AnimationNode_Id GetIdWithType(FBModelTransformationType pConnectorType) const;
bool IsValid() const;
bool IsValidEffectorId() const;
bool IsValidNodeId() const;
bool IsValidType() const;
HIKEffectorId GetEffectorId() const;
HIKNodeId GetNodeId() const;
int GetType() const;
operator int() const;
private:
//designed only for double solve purpose
static HIKEffectorId HIKNodeIdToHIKEffectorId_LastInChain(HIKNodeId pNodeId);
};
inline AnimationNode_Id::operator int() const
{
return mId;
}
inline AnimationNode_Id AnimationNode_Id::GetIdWithType(FBModelTransformationType pConnectorType) const
{
if(IsValid())
{
return AnimationNode_Id((pConnectorType << 21) | mId);
}
else
{
return AnimationNode_Id();
}
}
inline bool AnimationNode_Id::IsValid() const
{
return ((mId & 0x1) != 0);
}
inline bool AnimationNode_Id::IsValidEffectorId() const
{
const int lId = GetEffectorId();
return ( lId >= 0 && lId < LastEffectorId);
}
inline bool AnimationNode_Id::IsValidNodeId() const
{
const int lId = GetNodeId();
return ( lId >= 0 && lId < LastNodeId);
}
inline bool AnimationNode_Id::IsValidType() const
{
const int lType = GetType();
return (lType == kModelTranslation || lType == kModelRotation || lType == kModelScaling);
}
inline HIKEffectorId AnimationNode_Id::GetEffectorId() const
{
if(IsValid())
{
return (HIKEffectorId)(((mId >> 11) & 0x3FF) /*(10 bits)*/ - 1);
}
return LastEffectorId;
}
inline HIKNodeId AnimationNode_Id::GetNodeId() const
{
if(IsValid())
{
return (HIKNodeId)(((mId >> 1) & 0x3FF) /*(10 bits)*/ - 1);
}
return LastNodeId;
}
inline int AnimationNode_Id::GetType() const
{
if(IsValid())
{
return (mId >> 21) & 0xF /*(4 bits)*/;
}
return -1;
}
//designed only for double solve purpose
inline HIKEffectorId AnimationNode_Id::HIKNodeIdToHIKEffectorId_LastInChain(HIKNodeId pNodeId)
{
HIKEffectorId lChildEffector;
switch (pNodeId)
{
case HipsNodeId: { lChildEffector = HipsEffectorId; } break;
case LeftKneeRollNodeId:
case LeftAnkleNodeId:
{
lChildEffector = LeftAnkleEffectorId;
} break;
case RightKneeRollNodeId:
case RightAnkleNodeId:
{
lChildEffector = RightAnkleEffectorId;
} break;
case LeftElbowRollNodeId:
case LeftWristNodeId:
{
lChildEffector = LeftWristEffectorId;
} break;
case RightElbowRollNodeId:
case RightWristNodeId:
{
lChildEffector = RightWristEffectorId;
} break;
case LeftHipRollNodeId:
case LeftKneeNodeId:
{
lChildEffector = LeftKneeEffectorId;
} break;
case RightHipRollNodeId:
case RightKneeNodeId:
{
lChildEffector = RightKneeEffectorId;
} break;
case LeftShoulderRollNodeId:
case LeftElbowNodeId:
{
lChildEffector = LeftElbowEffectorId;
} break;
case RightShoulderRollNodeId:
case RightElbowNodeId:
{
lChildEffector = RightElbowEffectorId;
} break;
case WaistNodeId: { lChildEffector = ChestOriginEffectorId; } break;
case Spine1NodeId:
case Spine2NodeId:
case Spine3NodeId:
case Spine4NodeId:
case Spine5NodeId:
case Spine6NodeId:
case Spine7NodeId:
case Spine8NodeId:
case Spine9NodeId:
{
lChildEffector = ChestEndEffectorId;
} break;
case LeftFootNodeId: { lChildEffector = LeftFootEffectorId; } break;
case RightFootNodeId: { lChildEffector = RightFootEffectorId; } break;
case LeftShoulderNodeId:
case LeftCollarNodeId:
case LeftCollarExtraNodeId:
{
lChildEffector = LeftShoulderEffectorId;
} break;
case RightShoulderNodeId:
case RightCollarNodeId:
case RightCollarExtraNodeId:
{
lChildEffector = RightShoulderEffectorId;
} break;
case NeckNodeId:
case Neck1NodeId:
case Neck2NodeId:
case Neck3NodeId:
case Neck4NodeId:
case Neck5NodeId:
case Neck6NodeId:
case Neck7NodeId:
case Neck8NodeId:
case Neck9NodeId:
case HeadNodeId: { lChildEffector = HeadEffectorId; } break;
case LeftHipNodeId: { lChildEffector = LeftHipEffectorId; } break;
case RightHipNodeId: { lChildEffector = RightHipEffectorId; } break;
case LeftHandNodeId: { lChildEffector = LeftHandEffectorId; } break;
case RightHandNodeId: { lChildEffector = RightHandEffectorId; } break;
case LeftThumbInNodeId:
case LeftThumbANodeId:
case LeftThumbBNodeId:
case LeftThumbCNodeId:
case LeftThumbDNodeId:
{
lChildEffector = LeftHandThumbEffectorId;
} break;
case LeftIndexInNodeId:
case LeftIndexANodeId:
case LeftIndexBNodeId:
case LeftIndexCNodeId:
case LeftIndexDNodeId:
{
lChildEffector = LeftHandIndexEffectorId;
} break;
case LeftMiddleInNodeId:
case LeftMiddleANodeId:
case LeftMiddleBNodeId:
case LeftMiddleCNodeId:
case LeftMiddleDNodeId:
{
lChildEffector = LeftHandMiddleEffectorId;
} break;
case LeftRingInNodeId:
case LeftRingANodeId:
case LeftRingBNodeId:
case LeftRingCNodeId:
case LeftRingDNodeId:
{
lChildEffector = LeftHandRingEffectorId;
} break;
case LeftPinkyInNodeId:
case LeftPinkyANodeId:
case LeftPinkyBNodeId:
case LeftPinkyCNodeId:
case LeftPinkyDNodeId:
{
lChildEffector = LeftHandPinkyEffectorId;
} break;
case LeftExtraFingerInNodeId:
case LeftExtraFingerANodeId:
case LeftExtraFingerBNodeId:
case LeftExtraFingerCNodeId:
case LeftExtraFingerDNodeId:
{
lChildEffector = LeftHandExtraFingerEffectorId;
} break;
case RightThumbInNodeId:
case RightThumbANodeId:
case RightThumbBNodeId:
case RightThumbCNodeId:
case RightThumbDNodeId:
{
lChildEffector = RightHandThumbEffectorId;
} break;
case RightIndexInNodeId:
case RightIndexANodeId:
case RightIndexBNodeId:
case RightIndexCNodeId:
case RightIndexDNodeId:
{
lChildEffector = RightHandIndexEffectorId;
} break;
case RightMiddleInNodeId:
case RightMiddleANodeId:
case RightMiddleBNodeId:
case RightMiddleCNodeId:
case RightMiddleDNodeId:
{
lChildEffector = RightHandMiddleEffectorId;
} break;
case RightRingInNodeId:
case RightRingANodeId:
case RightRingBNodeId:
case RightRingCNodeId:
case RightRingDNodeId:
{
lChildEffector = RightHandRingEffectorId;
} break;
case RightPinkyInNodeId:
case RightPinkyANodeId:
case RightPinkyBNodeId:
case RightPinkyCNodeId:
case RightPinkyDNodeId:
{
lChildEffector = RightHandPinkyEffectorId;
} break;
case RightExtraFingerInNodeId:
case RightExtraFingerANodeId:
case RightExtraFingerBNodeId:
case RightExtraFingerCNodeId:
case RightExtraFingerDNodeId:
{
lChildEffector = RightHandExtraFingerEffectorId;
} break;
case LeftFootThumbInNodeId:
case LeftFootThumbANodeId:
case LeftFootThumbBNodeId:
case LeftFootThumbCNodeId:
case LeftFootThumbDNodeId:
{
lChildEffector = LeftFootThumbEffectorId;
} break;
case LeftFootIndexInNodeId:
case LeftFootIndexANodeId:
case LeftFootIndexBNodeId:
case LeftFootIndexCNodeId:
case LeftFootIndexDNodeId:
{
lChildEffector = LeftFootIndexEffectorId;
} break;
case LeftFootMiddleInNodeId:
case LeftFootMiddleANodeId:
case LeftFootMiddleBNodeId:
case LeftFootMiddleCNodeId:
case LeftFootMiddleDNodeId:
{
lChildEffector = LeftFootMiddleEffectorId;
} break;
case LeftFootRingInNodeId:
case LeftFootRingANodeId:
case LeftFootRingBNodeId:
case LeftFootRingCNodeId:
case LeftFootRingDNodeId:
{
lChildEffector = LeftFootRingEffectorId;
} break;
case LeftFootPinkyInNodeId:
case LeftFootPinkyANodeId:
case LeftFootPinkyBNodeId:
case LeftFootPinkyCNodeId:
case LeftFootPinkyDNodeId:
{
lChildEffector = LeftFootPinkyEffectorId;
} break;
case LeftExtraFootFingerInNodeId:
case LeftExtraFootFingerANodeId:
case LeftExtraFootFingerBNodeId:
case LeftExtraFootFingerCNodeId:
case LeftExtraFootFingerDNodeId:
{
lChildEffector = LeftFootExtraFingerEffectorId;
} break;
case RightFootThumbInNodeId:
case RightFootThumbANodeId:
case RightFootThumbBNodeId:
case RightFootThumbCNodeId:
case RightFootThumbDNodeId:
{
lChildEffector = RightFootThumbEffectorId;
} break;
case RightFootIndexInNodeId:
case RightFootIndexANodeId:
case RightFootIndexBNodeId:
case RightFootIndexCNodeId:
case RightFootIndexDNodeId:
{
lChildEffector = RightFootIndexEffectorId;
} break;
case RightFootMiddleInNodeId:
case RightFootMiddleANodeId:
case RightFootMiddleBNodeId:
case RightFootMiddleCNodeId:
case RightFootMiddleDNodeId:
{
lChildEffector = RightFootMiddleEffectorId;
} break;
case RightFootRingInNodeId:
case RightFootRingANodeId:
case RightFootRingBNodeId:
case RightFootRingCNodeId:
case RightFootRingDNodeId:
{
lChildEffector = RightFootRingEffectorId;
} break;
case RightFootPinkyInNodeId:
case RightFootPinkyANodeId:
case RightFootPinkyBNodeId:
case RightFootPinkyCNodeId:
case RightFootPinkyDNodeId:
{
lChildEffector = RightFootPinkyEffectorId;
} break;
case RightExtraFootFingerInNodeId:
case RightExtraFootFingerANodeId:
case RightExtraFootFingerBNodeId:
case RightExtraFootFingerCNodeId:
case RightExtraFootFingerDNodeId:
{
lChildEffector = RightFootExtraFingerEffectorId;
} break;
default:
{
lChildEffector = LastEffectorId;
} break;
}
return lChildEffector;
}
class HIKHostNodeMB
{
public:
// Members
FBModel *mNode;
FBAnimationNode* mDestTConn;
FBAnimationNode* mDestRConn;
FBAnimationNode* mDestSConn;
FBProperty* mReachT;
FBProperty* mReachR;
// functions
HIKHostNodeMB();
virtual void SetNode(FBModel *pNode, FBConstraint *pConstraint, AnimationNode_Id pConnectorId=0);
virtual void Clear();
virtual bool IsDestinationConn(FBAnimationNode* pConnector);
};
class HIKHostPropertyMB
{
public:
int mDefaultMode;
double mDefaultValue;
FBProperty* mModeP;
FBProperty* mValueP;
int mValueIndex;
double mValueScale;
bool mIsEnum;
HIKHostPropertyMB();
void Init(FBProperty *pModeP, FBProperty *pValueP,int pValueIndex,double pValueScale,bool pIsEnum);
};
template <> bool HIKHostNode<HIKHostNodeMB>::Valid();
template <> void HIKHostNode<HIKHostNodeMB>::ReadXForm(double *pXForm, FBEvaluateInfo* pEvalInfo);
template <> void HIKHostNode<HIKHostNodeMB>::WriteXForm(double *pXForm, FBEvaluateInfo* pEvalInfo);
template <> void HIKHostNode<HIKHostNodeMB>::WriteXFormCandidate(double *pXForm, FBEvaluateInfo* pEvalInfo);
template <> void HIKHostNode<HIKHostNodeMB>::ReadTQS(FBTVector &pT, FBQuaternion &pQ, FBVector4d &pS, FBEvaluateInfo* pEvalInfo);
template <> void HIKHostNode<HIKHostNodeMB>::WriteTQS(FBTVector &pT, FBQuaternion &pQ, FBVector4d &pS, FBEvaluateInfo* pEvalInfo);
template <> void HIKHostNode<HIKHostNodeMB>::WriteTQSIfNotRecursive(FBTVector &pT, FBQuaternion &pQ, FBVector4d &pS, FBEvaluateInfo* pEvalInfo, int &pRecursivityInfo);
template <> void HIKHostNode<HIKHostNodeMB>::WriteCandidateTQS(const FBTVector &pT, const FBQuaternion &pQ, const FBVector4d &pS, FBEvaluateInfo* pEvalInfo);
template <> void HIKHostNode<HIKHostNodeMB>::SetCandidateTQS(FBTVector &pT, FBQuaternion &pQ, FBVector4d &pS, FBEvaluateInfo* pEvalInfo);
template <> int HIKHostNode<HIKHostNodeMB>::IsEvaluationRecursiveTQS(FBEvaluateInfo* pEvalInfo);
template <> double HIKHostNode<HIKHostNodeMB>::ReadReachT( FBEvaluateInfo* pEvalInfo );
template <> double HIKHostNode<HIKHostNodeMB>::ReadReachR( FBEvaluateInfo* pEvalInfo );
template <> void HIKHostNode<HIKHostNodeMB>::ReadIKPivot(double *pIKPivot, FBEvaluateInfo* pEvalInfo);
template <> bool HIKHostNode<HIKHostNodeMB>::GetIKSync();
template <> void HIKHostNode<HIKHostNodeMB>::GetVector(FBVector3d &retVector, FBModelTransformationType pWhat,bool pGlobalInfo, FBEvaluateInfo* pEvalInfo);
template <> bool HIKHostNode<HIKHostNodeMB>::GetUseRotationLimits();
template <> bool HIKHostNode<HIKHostNodeMB>::GetUseTranslationLimits();
template <> int HIKHostNode<HIKHostNodeMB>::GetRotationOrder();
template <> void HIKHostNode<HIKHostNodeMB>::GetPreQ(double *pPreQ);
template <> void HIKHostNode<HIKHostNodeMB>::GetPostQ(double *pPostQ);
template <> int HIKHostNode<HIKHostNodeMB>::GetRotationMinXYZ(double *pXYZ);
template <> int HIKHostNode<HIKHostNodeMB>::GetRotationMaxXYZ(double *pXYZ);
template <> int HIKHostProperty<HIKHostPropertyMB>::ReadMode( FBEvaluateInfo* pEvalInfo );
template <> double HIKHostProperty<HIKHostPropertyMB>::ReadValue( FBEvaluateInfo* pEvalInfo );
// helpers
HIKNodeId FBBodyNodeIdToHIKNodeId(FBBodyNodeId pBodyNode);
HIKNodeId ExtraIndexToHIKNodeId(int pExtraIndex);
int HIKNodeIdToExtraIndex(HIKNodeId pNodeId);
int FBEffectorIdToHIKId(FBEffectorId pEffector);
HIKFloorContact FBFloorContactIDToHIKLeftHandFloor(FBFloorContactID pFloorContact);
bool GetNodeIdOrEffectIdFromModel( FBCharacterSolver* pSolver, FBModel* pModel, int& pHIKNodeId, int& pHIKEffectorId, FBEffectorId& pEffectorId, FBEffectorSetID& pPivotIndex );
int GetSolvingStepBasedOnActivePart(int pIndex);
// host properties
void HIKHostPropertiesInit(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost);
void HIKHostPropertiesFromCharacter(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost, FBCharacter* pCharacter);
// host mapping and hierarchy
void HIKCharacterHostFromFBCharacter(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost, FBCharacter* pCharacter, bool pFloorContacts=false);
void HIKCharacterHostFromFBCharacterSolver(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost, FBCharacterSolver* pCharacterSolver, FBConstraint* pConstraint, bool pFloorContacts=false);
void HIKControlRigHostFromFBCharacterSolver(HIKControlRigHost<HIKHostNodeMB> &pHIKControlRigHost, FBCharacterSolver* pCharacterSolver, FBControlSet* pControlSet, FBConstraint* pConstraint);
void HIKCharacterHostFromFBCharacterPose(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost, FBCharacter* pPoseCharacter, FBCharacterPose* pPose);
// characterization - return valid HIK character
void HIKCharacterFromFBCharacter(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost,HIKCharacter*& pHIKCharacter,FBCharacter* pCharacter);
void HIKCharacterFromFBCharacterSolver(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost,HIKCharacter*& pHIKCharacter, FBCharacterSolver* pCharacterSolver);
void HIKCharacterFromFBActor(HIKCharacter*& pHIKActorCharacter, FBActor* pActor);
void HIKCharacterFromFBCharacterPose(HIKCharacterHost<HIKHostNodeMB,HIKHostPropertyMB> &pHIKCharacterHost,HIKCharacter*& pHIKCharacter,FBCharacter* pPoseCharacter, FBCharacterPose* pPose);
void UndoSetup(FBCharacter* pCharacter);
void ResetControRigModelTransformation( HIKCharacter *pHIKCharacter, HIKEvaluationState* pStanceState, HIKNodeId pNodeId, FBModel* pModel );
void SetNormalizedNodeStateForHierarchy( HIKCharacter *pHIKCharacter, HIKCharacterState *pState, KHIKNodeState pDataSet[LastNodeId], HIKNodeId pNodeId,
FBTVector *pT, FBQuaternion *pQ, FBVector4d *pS, bool pGlobal );
inline void CopyNormalizedState(KHIKNodeState pDstDataSet[LastNodeId], KHIKNodeState pSrcDataSet[LastNodeId], HIKNodeId pNodeId)
{
//kxl: optimize this, we can simply memcpy
pDstDataSet[pNodeId].mTfv[0] = pSrcDataSet[pNodeId].mTfv[0];
pDstDataSet[pNodeId].mTfv[1] = pSrcDataSet[pNodeId].mTfv[1];
pDstDataSet[pNodeId].mTfv[2] = pSrcDataSet[pNodeId].mTfv[2];
pDstDataSet[pNodeId].mTfv[3] = pSrcDataSet[pNodeId].mTfv[3];
pDstDataSet[pNodeId].mQfv[0] = pSrcDataSet[pNodeId].mQfv[0];
pDstDataSet[pNodeId].mQfv[1] = pSrcDataSet[pNodeId].mQfv[1];
pDstDataSet[pNodeId].mQfv[2] = pSrcDataSet[pNodeId].mQfv[2];
pDstDataSet[pNodeId].mQfv[3] = pSrcDataSet[pNodeId].mQfv[3];
pDstDataSet[pNodeId].mSfv[0] = pSrcDataSet[pNodeId].mSfv[0];
pDstDataSet[pNodeId].mSfv[1] = pSrcDataSet[pNodeId].mSfv[1];
pDstDataSet[pNodeId].mSfv[2] = pSrcDataSet[pNodeId].mSfv[2];
pDstDataSet[pNodeId].mSfv[3] = pSrcDataSet[pNodeId].mSfv[3];
}
inline void HIKFillCharacterDescription(HIKCharacter* pHIKCharacter, int* pNodeIdDesc)
{
for(int lNodeCounter = 0 ; lNodeCounter < LastNodeId ; lNodeCounter++)
{
if( HIKGetNodeUse(pHIKCharacter, lNodeCounter) )
{
pNodeIdDesc[lNodeCounter] = lNodeCounter;
}
else
{
pNodeIdDesc[lNodeCounter] = HIKNotUsed;
}
}
pNodeIdDesc[LastNodeId] = HIKLastNode;
}
inline void HIKEffectorStateCopy(HIKEffectorSetState* pDst, const HIKEffectorSetState* pSrc)
{
double lT[4];
double lQ[4];
double lS[4];
for(int lIter = HipsEffectorId; lIter < LastEffectorId; lIter++)
{
HIKGetEffectorStateTQSdv(pSrc, lIter, lT, lQ, lS );
HIKSetEffectorStateTQSdv(pDst, lIter, lT, lQ, lS );
}
}
inline void HIKEffectorStateWithOptionsCopy(HIKEffectorSetState* pDst, const HIKEffectorSetState* pSrc)
{
double lT[4];
double lQ[4];
double lS[4];
for(int lIter = HipsEffectorId; lIter < LastEffectorId; lIter++)
{
HIKSetRotationActive(pDst, lIter, HIKGetRotationActive(pSrc, lIter));
HIKSetTranslationActive(pDst, lIter, HIKGetTranslationActive(pSrc, lIter));
HIKSetPull(pDst, lIter, HIKGetPull(pSrc, lIter));
HIKSetResist(pDst, lIter, HIKGetResist(pSrc, lIter));
HIKGetEffectorStateTQSdv(pSrc, lIter, lT, lQ, lS );
HIKSetEffectorStateTQSdv(pDst, lIter, lT, lQ, lS );
}
for(int lFloorIter = 0; lFloorIter < HIKLastFloorId; lFloorIter++)
{
HIKGetEffectorFloorStateTQdv(pSrc,lFloorIter,lT, lQ);
HIKSetEffectorFloorStateTQdv(pDst,lFloorIter,lT, lQ);
}
HIKSetHandPullHips(pDst, true, HIKGetHandPullHips(pSrc, true));
HIKSetHandPullHips(pDst, false, HIKGetHandPullHips(pSrc, false));
HIKSetIKSolvingStep(pDst, HIKGetIKSolvingStep(pSrc));
}
#endif // __HIKHOSTMB__H_