fbxsdk/scene/animation/fbxanimcurvebase.h Source File

fbxanimcurvebase.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_CURVE_BASE_H_
14 #define _FBXSDK_SCENE_ANIMATION_CURVE_BASE_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/core/fbxobject.h>
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
22 class FbxIO;
23 
30 {
31 public:
35 
39  {
40  mTime = FBXSDK_TIME_ZERO;
41  }
42 
45  virtual ~FbxAnimCurveKeyBase() {};
46 
50  virtual FbxTime GetTime() const
51  {
52  return mTime;
53  }
54 
58  virtual void SetTime(const FbxTime& pTime) {
59  mTime = pTime;
60  }
61 };
62 
71 {
73 
74 public:
80  virtual void KeyClear () = 0;
82 
84  virtual int KeyGetCount () const = 0;
85 
95  virtual int KeyAdd (FbxTime pTime, FbxAnimCurveKeyBase& pKey, int* pLast = NULL) = 0;
96 
105  virtual bool KeySet(int pIndex, FbxAnimCurveKeyBase& pKey) = 0;
106 
111  virtual bool KeyRemove(int pIndex) = 0;
112 
118  virtual bool KeyRemove(int pStartIndex, int pEndIndex) = 0;
119 
121 
130  virtual FbxTime KeyGetTime(int /*pKeyIndex*/) const { return FBXSDK_TIME_INFINITE; }
131 
136  virtual void KeySetTime(int pKeyIndex, FbxTime pTime) = 0;
137 
139 
152  {
153  eConstant = 1,
154  eRepetition = 2,
155  eMirrorRepetition = 3,
156  eKeepSlope = 4
157  } ;
158 
162  void SetPreExtrapolation(EExtrapolationType pExtrapolation);
163 
167  EExtrapolationType GetPreExtrapolation() const { return mPreExtrapolation; }
168 
173  void SetPreExtrapolationCount(unsigned long pCount);
174 
179  unsigned long GetPreExtrapolationCount() const { return mPreExtrapolationCount; }
180 
184  void SetPostExtrapolation(EExtrapolationType pExtrapolation);
185 
189  EExtrapolationType GetPostExtrapolation() const { return mPostExtrapolation; }
190 
195  void SetPostExtrapolationCount(unsigned long pCount);
196 
201  unsigned long GetPostExtrapolationCount() const { return mPostExtrapolationCount; }
203 
216  virtual float Evaluate (FbxTime pTime, int* pLast = NULL) = 0;
217 
224  virtual float EvaluateIndex( double pIndex) = 0;
226 
237  virtual bool GetTimeInterval(FbxTimeSpan& pTimeInterval);
239 
240 /*****************************************************************************************************************************
241 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
242 *****************************************************************************************************************************/
243 #ifndef DOXYGEN_SHOULD_SKIP_THIS
244  virtual FbxObject& Copy(const FbxObject& pObject);
245  virtual bool Store(FbxIO* pFileObject, bool pLegacyVersion=false) = 0;
246  virtual bool Retrieve(FbxIO* pFileObject) = 0;
247  virtual void ExtrapolationSyncCallback() = 0;
248 
249 protected:
250  virtual void Construct(const FbxObject* pFrom);
251 
252 private:
253  EExtrapolationType mPreExtrapolation;
254  unsigned long mPreExtrapolationCount;
255  EExtrapolationType mPostExtrapolation;
256  unsigned long mPostExtrapolationCount;
257 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
258 };
259 
260 #include <fbxsdk/fbxsdk_nsend.h>
261 
262 #endif // FBXFILESDK_KFBXPLUGINS_KFBXANIMCURVEBASE_H
FBX SDK environment definition.
This is the base class interface for the FBX animation curve keys.
unsigned long GetPreExtrapolationCount() const
Get pre-extrapolation count.
This is the base class for implementing animation curves.
#define NULL
Definition: fbxarch.h:210
virtual FbxObject & Copy(const FbxObject &pObject)
Copy an object content into this object.
EExtrapolationType GetPostExtrapolation() const
Get post-extrapolation mode.
#define FBXSDK_TIME_ZERO
Definition: fbxtime.h:25
FbxTime mTime
Data member representing time value.
virtual FbxTime GetTime() const
Get time value.
FbxAnimCurveKeyBase()
Constructor.
unsigned long GetPostExtrapolationCount() const
Get post-extrapolation count.
#define FBXSDK_TIME_INFINITE
Definition: fbxtime.h:23
Class to encapsulate time units.
Definition: fbxtime.h:44
EExtrapolationType GetPreExtrapolation() const
Get pre-extrapolation mode.
The base class of most FBX objects.
Definition: fbxobject.h:157
#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.
virtual ~FbxAnimCurveKeyBase()
Destructor.
virtual FbxTime KeyGetTime(int) const
Get key time.
FbxIO represents an FBX file.
Definition: fbxio.h:324
#define FBXSDK_DLL
Definition: fbxarch.h:173
Class to encapsulate time intervals.
Definition: fbxtime.h:508
virtual void SetTime(const FbxTime &pTime)
Set time value.