fbxsdk/scene/animation/fbxanimevaluator.h Source File

fbxanimevaluator.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_SCENE_ANIMATION_EVALUATOR_H_
14 #define _FBXSDK_SCENE_ANIMATION_EVALUATOR_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/core/fbxobject.h>
21 
22 #include <fbxsdk/fbxsdk_nsbegin.h>
23 
62 {
64 
65 public:
73  FbxAMatrix& GetNodeGlobalTransform(FbxNode* pNode, const FbxTime& pTime=FBXSDK_TIME_INFINITE, FbxNode::EPivotSet pPivotSet=FbxNode::eSourcePivot, bool pApplyTarget=false, bool pForceEval=false);
74 
85  FbxAMatrix& GetNodeLocalTransform(FbxNode* pNode, const FbxTime& pTime=FBXSDK_TIME_INFINITE, FbxNode::EPivotSet pPivotSet=FbxNode::eSourcePivot, bool pApplyTarget=false, bool pForceEval=false);
86 
95  FbxVector4& GetNodeLocalTranslation(FbxNode* pNode, const FbxTime& pTime=FBXSDK_TIME_INFINITE, FbxNode::EPivotSet pPivotSet=FbxNode::eSourcePivot, bool pApplyTarget=false, bool pForceEval=false);
96 
105  FbxVector4& GetNodeLocalRotation(FbxNode* pNode, const FbxTime& pTime=FBXSDK_TIME_INFINITE, FbxNode::EPivotSet pPivotSet=FbxNode::eSourcePivot, bool pApplyTarget=false, bool pForceEval=false);
106 
115  FbxVector4& GetNodeLocalScaling(FbxNode* pNode, const FbxTime& pTime=FBXSDK_TIME_INFINITE, FbxNode::EPivotSet pPivotSet=FbxNode::eSourcePivot, bool pApplyTarget=false, bool pForceEval=false);
116 
123 #if defined(__GNUC__) && (__GNUC__ < 4)
124  template <class T> inline T GetPropertyValue(FbxProperty& pProperty, const FbxTime& pTime, bool pForceEval=false){ FbxPropertyEvalState* s = GetPropertyEvalState(pProperty, pTime, pForceEval); return s->Get<T>(); }
125 #else
126  template <class T> inline T GetPropertyValue(FbxProperty& pProperty, const FbxTime& pTime, bool pForceEval=false){ return GetPropertyEvalState(pProperty, pTime, pForceEval)->Get<T>(); }
127 #endif
128 
134  FbxPropertyValue& GetPropertyValue(FbxProperty& pProperty, const FbxTime& pTime, bool pForceEval=false);
135 
140  FbxAnimCurveNode* GetPropertyCurveNode(FbxProperty& pProperty, FbxAnimLayer* pAnimLayer);
141 
146  FbxTime ValidateTime(const FbxTime& pTime);
147 
149  void Reset();
150 
153  void Flush(FbxNode* pNode);
154 
157  void Flush(FbxProperty& pProperty);
158 
169  void ComputeLocalTRSFromGlobal(FbxVector4& pRetLT, FbxVector4& pRetLR, FbxVector4& pRetLS, FbxNode* pNode, FbxAMatrix& pGX, const FbxTime& pTime=FBXSDK_TIME_INFINITE, FbxNode::EPivotSet pPivotSet=FbxNode::eSourcePivot, bool pApplyTarget=false, bool pForceEval=false);
170 
171 /*****************************************************************************************************************************
172 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
173 *****************************************************************************************************************************/
174 #ifndef DOXYGEN_SHOULD_SKIP_THIS
175 protected:
176  virtual void Construct(const FbxObject* pFrom);
177  virtual void Destruct(bool pRecursive);
178 
179  virtual void EvaluateNodeTransform(FbxNodeEvalState* pResult, FbxNode* pNode, const FbxTime& pTime, FbxNode::EPivotSet pPivotSet, bool pApplyTarget) = 0;
180  virtual void EvaluatePropertyValue(FbxPropertyEvalState* pResult, FbxProperty& pProperty, const FbxTime& pTime) = 0;
181 
182  FbxAnimEvalState* GetDefaultEvalState();
183  FbxAnimEvalState* GetEvalState(const FbxTime& pTime);
184  FbxNodeEvalState* GetNodeEvalState(FbxNode* pNode, const FbxTime& pTime, FbxNode::EPivotSet pPivotSet, bool pApplyTarget, bool pForceEval);
185  FbxPropertyEvalState* GetPropertyEvalState(FbxProperty& pProperty, const FbxTime& pTime, bool pForceEval);
186 
187 private:
188  FbxAnimEvalState* mEvalState;
189 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
190 };
191 
192 #include <fbxsdk/fbxsdk_nsend.h>
193 
194 #endif /* _FBXSDK_SCENE_ANIMATION_EVALUATOR_H_ */
The animation layer is a collection of animation curve nodes.
Definition: fbxanimlayer.h:30
This class hold results from animation evaluations.
FBX SDK environment definition.
This class hold results for node evaluation.
The source pivot context.
Definition: fbxnode.h:655
This class is an composite of animation curves and is called as animation curve node.
EPivotSet
Pivot context identifier.
Definition: fbxnode.h:653
#define FBXSDK_TIME_INFINITE
Definition: fbxtime.h:23
Class to encapsulate time units.
Definition: fbxtime.h:44
The base class of most FBX objects.
Definition: fbxobject.h:157
Represents an element in the scene graph.
Definition: fbxnode.h:72
This class hold results for property evaluation.
#define FBXSDK_ABSTRACT_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new abstract class derived from FbxObject.
Definition: fbxobject.h:68
virtual void Construct(const FbxObject *pFrom)
Optional constructor override, automatically called by default constructor.
The principal interface for animation evaluators.
Class to hold user properties.
Definition: fbxproperty.h:37
A four double mathematic vector class.
Definition: fbxvector4.h:25
FBX SDK affine matrix class.
T GetPropertyValue(FbxProperty &pProperty, const FbxTime &pTime, bool pForceEval=false)
Get a property's value at the specified time using the template type provided.
#define FBXSDK_DLL
Definition: fbxarch.h:173
virtual void Destruct(bool pRecursive)
Optional destructor override, automatically called by default destructor.