1#ifndef __FBOBJECTPOSE_H__
2#define __FBOBJECTPOSE_H__
43#include <kaydaradef.h>
48 #define FBSDK_DLL K_DLLIMPORT
54#ifdef FBSDKUseNamespace
55 namespace FBSDKNamespace {
62 kFBPoseTransformInvalid = -1,
63 kFBPoseTransformLocal = 0,
64 kFBPoseTransformGlobal,
65 kFBPoseTransformLocalRef,
66 kFBPoseTransformTypeCount
72 kFBObjectPoseOptionsNoFlag = 0,
73 kFBObjectPoseOptionsTranslationX= 1,
74 kFBObjectPoseOptionsTranslationY= 1<<1,
75 kFBObjectPoseOptionsTranslationZ= 1<<2,
76 kFBObjectPoseOptionsRotation = 1<<3,
77 kFBObjectPoseOptionsScaling = 1<<4,
83 kFBObjectPoseMirrorOptionsNoFlag = 0,
84 kFBObjectPoseMirrorOptionsUpdateLocal = 1,
85 kFBObjectPoseMirrorOptionsUpdateLocalMirrorParent = 1<<1,
86 kFBObjectPoseMirrorOptionsUpdateLocalRef = 1<<2,
87 kFBObjectPoseMirrorOptionsUpdateLocalRefMirrorRef = 1<<3,
255 void SetPropertyValue(
const char* pObjectName,
const char* pPropertyName,
double* pValue,
int pSize );
263 void GetPropertyValue(
double* pValue,
int pSize,
const char* pObjectName,
const char* pPropertyName );
412 const char* pDstObjectName,
413 const char* pSrcObjectName
427 const char* pDstObjectName,
428 const char* pSrcObjectName
542#ifdef FBSDKUseNamespace
MotionBuilder SDK base class.
AnimationNodeNotify evaluation information.
Four x Four (double) Matrix.
void CopyFrom(FBObjectPose &pFromPose)
Copy everything from a given object.
void ClearPose()
Clear all the data of the pose.
void CopyPoseAllObjectsTransformFrom(FBObjectPose &pFromPose, FBPoseTransformType pPoseTransformType=kFBPoseTransformInvalid)
Copy all the transforms from a given pose.
void SetTransform(FBTVector &pT, FBMatrix &pRM, FBMatrix &pSM, const char *pObjectName, FBPoseTransformType pPoseTransformType)
Set the transform of an object in the pose.
FBStringList GetStoredObjectNames()
Get all the object names currently stored in this pose.
static void RetargetPose(FBObjectPose &pDstPose, FBObjectPose &pSrcPose, const char *pDstObjectName, const char *pSrcObjectName)
Retarget the non-transform properties from the SrcPose to the DstPose.
void AddStanceOffsetAllObjects(FBObjectPose &pStancePose, FBPoseTransformType pPoseTransformType=kFBPoseTransformInvalid)
Add the StanceOffset to all the objects in the pose.
FBObjectPose(const char *pName, HIObject pObject=NULL)
Public constructor.
void PastePropertyPose(const char *pObjectName, FBProperty &pProperty)
Paste the pose of a property of an object.
void MirrorPose(const char *pObjectName, FBObjectPoseMirrorOptions &pObjectPoseMirrorOptions)
Mirror the transform of an object in the pose.
void SetPropertyValue(const char *pObjectName, const char *pPropertyName, double *pValue, int pSize)
Set the value of a property in the pose.
void MultTransform(const char *pObjectName, FBMatrix &pGX, FBModelTransformationType pTransformAttribute, FBPoseTransformType pPoseTransformType)
Multiply the transform of an objects in the pose.
static void MirrorRetargetPoseAllObjects(FBObjectPose &pDstPose, FBObjectPose &pSrcPose, FBObjectPose &pDstStancePose, FBObjectPose &pSrcStancePose, FBVector4< double > &pMirrorPlaneEquation)
Mirror the transform of all objects in the SrcPose and retarget the result on the DstPose.
bool IsPropertyStored(const char *pObjectName, const char *pPropertyName)
Is the property stored in the pose?
void CopyObjectPose(const char *pObjectName, FBComponent &pObject)
Copy the pose of all the properties of an object.
void PasteTransform(const char *pObjectName, FBComponent &pObject, FBObjectPoseOptions &pObjectPoseOptions, FBEvaluateInfo *pEvaluateInfo=NULL)
Paste the transform of an object.
void CopyTransform(const char *pObjectName, FBComponent &pObject, FBObjectPoseOptions &pObjectPoseOptions)
Copy the transform of an object.
void MultTransformAllObjects(FBMatrix &pGX, FBModelTransformationType pTransformAttribute, FBPoseTransformType pPoseTransformType)
Multiply the transform of all objects in the pose.
void RemoveStanceOffset(const char *pObjectName, FBObjectPose &pStancePose, FBPoseTransformType pPoseTransformType=kFBPoseTransformInvalid)
Remove the StanceOffset from an object in the pose.
void AddStanceOffset(const char *pObjectName, FBObjectPose &pStancePose, FBPoseTransformType pPoseTransformType=kFBPoseTransformInvalid)
Add the StanceOffset to an object in the pose.
void GetPropertyValue(double *pValue, int pSize, const char *pObjectName, const char *pPropertyName)
Get the value of a property stored in the pose.
static void MirrorRetargetPose(FBObjectPose &pDstPose, FBObjectPose &pSrcPose, FBObjectPose &pDstStancePose, FBObjectPose &pSrcStancePose, FBVector4< double > &pMirrorPlaneEquation, const char *pDstObjectName, const char *pSrcObjectName)
Mirror the transform of an object in the SrcPose and retarget the result on the DstPose.
void CopyPropertyPose(const char *pObjectName, FBProperty &pProperty)
Copy the pose of a property of an object.
void RemoveStanceOffsetAllObjects(FBObjectPose &pStancePose, FBPoseTransformType pPoseTransformType=kFBPoseTransformInvalid)
Remove the StanceOffset from all the objects in the pose.
bool GetTransform(FBTVector &pT, FBMatrix &pRM, FBMatrix &pSM, const char *pObjectName, FBPoseTransformType pPoseTransformType)
Get the transform of an object in the pose.
void CopyPoseTransformFrom(FBObjectPose &pFromPose, const char *pObjectName, FBPoseTransformType pPoseTransformType=kFBPoseTransformInvalid)
Copy the transforms of an object from a given pose.
void CopyPoseDataFrom(FBObjectPose &pFromPose)
Copy all the pose data from a given pose.
bool IsTransformStored(const char *pObjectName, FBPoseTransformType pPoseTransformType=kFBPoseTransformInvalid)
Is the transform of this object stored in the specified TransformType?
void MirrorPoseAllObjects(FBObjectPoseMirrorOptions &pObjectPoseMirrorOptions)
Mirror the transform of all objects in the pose.
void PasteObjectPose(const char *pObjectName, FBComponent &pObject)
Paste the pose of all the properties of an object.
bool IsPropertyPoseable(FBProperty &pProperty)
Is the property poseable?
FBObjectPoseMirrorOptions class.
void ClearFlag()
Clear all flags.
FBVector4< double > mMirrorPlaneEquation
Equation of the mirror plane.
FBObjectPoseMirrorOptions()
Constructor.
bool GetFlag(FBObjectPoseMirrorOptionsFlag pFlag)
Get a flag value.
void SetFlag(FBObjectPoseMirrorOptionsFlag pFlag, bool pValue)
Set a flag value.
FBObjectPoseOptions class.
void ClearFlag()
Clear all flags.
FBTVector mReferenceGT
Global translation vector of reference object.
void SetFlag(FBObjectPoseOptionsFlag pFlag, bool pValue)
Set a flag value.
FBMatrix mReferenceGRM
Global rotation matrix of reference object.
bool GetFlag(FBObjectPoseOptionsFlag pFlag)
Get a flag value.
FBPoseTransformType mPoseTransformType
Transform type (Local, Global or LocalRef).
FBObjectPoseOptions()
Constructor.
FBMatrix mReferenceGSM
Global scaling matrix of reference object.
Property: Base property class.
PropertyList: Concrete class for PropertyList of component
PropertyList: ObjectPose.
FBObjectPose * operator[](int pIndex)
Get the object pose at pIndex.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBModelTransformationType
Types of transformation vector/matrices possible.
K_DLLIMPORT void MirrorTransformR(FBMatrix &pMirrorRM, const FBMatrix &pRM, const FBVector4< double > &pPlaneEquation)
Mirror a rotation using the specified mirror plane.
FBPoseTransformType
Transform mode of pose.
K_DLLIMPORT void NormalizePlaneEquation(FBVector4< double > &pNormalizedPlaneEquation, FBVector4< double > &pPlaneEquation)
Normalize a plane equation.
K_DLLIMPORT void GetPlaneRotation(FBMatrix &pPlaneRM, const FBVector4< double > &pPlaneEquation)
Get the plane rotation matrix from a plane equation.
FBObjectPoseMirrorOptionsFlag
ObjectPoseMirrorOptions flags.
K_DLLIMPORT void MirrorTransform(FBTVector &pMirrorT, FBMatrix &pMirrorRM, FBMatrix &pMirrorSM, const FBTVector &pT, const FBMatrix &pRM, const FBMatrix &pSM, const FBVector4< double > &pPlaneEquation)
Mirror a transformation using the specified mirror plane.
FBObjectPoseOptionsFlag
ObjectPoseOptions flags.
K_DLLIMPORT void GetPlaneEquation(FBVector4< double > &pPlaneEquation, const FBTVector &pPlaneNormalVector, const FBTVector &pPointOnPlane)
Get a plane equation from a normal vector and a point on the plane.
K_DLLIMPORT void MirrorTransformT(FBTVector &pMirrorT, const FBTVector &pT, const FBVector4< double > &pPlaneEquation)
Mirror a translation using the specified mirror plane.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.