00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXANIMEVALUATOR_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXANIMEVALUATOR_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <fbxfilesdk/kfbxplugins/kfbxobject.h>
00042 #include <fbxfilesdk/kfbxplugins/kfbxanimevalstate.h>
00043 #include <fbxfilesdk/kfbxplugins/kfbxanimstack.h>
00044
00045 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00046
00047 struct KFbxAnimEvaluator_prv;
00048
00093 class KFBX_DLL KFbxAnimEvaluator : public KFbxObject
00094 {
00095 KFBXOBJECT_DECLARE_ABSTRACT(KFbxAnimEvaluator, KFbxObject);
00096
00097 public:
00105 void SetContext(KFbxAnimStack* pAnimStack);
00106
00112 KFbxAnimStack* GetContext();
00113
00122 KFbxXMatrix& GetNodeGlobalTransform(KFbxNode* pNode, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00123
00135 KFbxXMatrix& GetNodeLocalTransform(KFbxNode* pNode, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00136
00146 KFbxVector4& GetNodeLocalTranslation(KFbxNode* pNode, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00147
00157 KFbxVector4& GetNodeLocalRotation(KFbxNode* pNode, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00158
00168 KFbxVector4& GetNodeLocalScaling(KFbxNode* pNode, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00169
00170
00177 KFbxAnimCurveNode& GetPropertyValue(KFbxProperty& pProperty, KTime pTime, bool pForceEval=false);
00178
00184 KTime ValidateTime(KTime pTime);
00185
00199 KFbxXMatrix& GetNodeGlobalTransformFast(KFbxNode* pNode, int& pDirectIndex, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00200
00218 KFbxXMatrix& GetNodeLocalTransformFast(KFbxNode* pNode, int& pDirectIndex, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00219
00220
00234 KFbxVector4& GetNodeLocalTranslationFast(KFbxNode* pNode, int& pDirectIndex, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00235
00250 KFbxVector4& GetNodeLocalRotationFast(KFbxNode* pNode, int& pDirectIndex, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00251
00266 KFbxVector4& GetNodeLocalScalingFast(KFbxNode* pNode, int& pDirectIndex, KTime pTime=KTIME_INFINITE, KFbxNode::EPivotSet pPivotSet=KFbxNode::eSOURCE_SET, bool pApplyTarget=false, bool pForceEval=false);
00267
00268
00279 KFbxAnimCurveNode& GetPropertyValueFast(KFbxProperty& pProperty, int& pDirectIndex, KTime pTime=KTIME_INFINITE, bool pForceEval=false);
00280
00284 void ResetEvaluationState();
00285
00289 void InvalidateNode(KFbxNode* pNode);
00290
00294 void InvalidateProperty(KFbxProperty& pProperty);
00295
00297
00298
00299
00300
00301
00302
00304 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00305 protected:
00306 virtual void EvaluateNodeTransform(KFbxNodeEvalState* pResult, KFbxNode* pNode, KTime pTime, KFbxAnimStack* pStack, KFbxNode::EPivotSet pPivotSet, bool pApplyTarget) = 0;
00307 virtual void EvaluatePropertyValue(KFbxAnimCurveNode* pResult, KFbxProperty& pProperty, KTime pTime, KFbxAnimStack* pStack) = 0;
00308
00309 KFbxAnimEvaluator(KFbxSdkManager& pManager, char const* pName);
00310 virtual void Destruct(bool pRecursive, bool pDependents);
00311
00312 KFbxAnimEvalState* GetEvalState(KTime pTime);
00313 KFbxNodeEvalState* GetNodeEvalState(KFbxNode* pNode, int& pDirectIndex, KTime pTime, KFbxNode::EPivotSet pPivotSet, bool pApplyTarget, bool pForceEval);
00314
00315 private:
00316 KFbxAnimEvaluator_prv* mData;
00317
00318 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00319 };
00320
00321 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00322
00323 #endif