- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxanimcurvebase.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2013 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_SCENE_ANIMATION_CURVE_BASE_H_
    00014 #define _FBXSDK_SCENE_ANIMATION_CURVE_BASE_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/core/fbxobject.h>
    00019
    00020 #include <fbxsdk/fbxsdk_nsbegin.h>
    00021
    00022 class FbxIO;
    00023
    00029 class FBXSDK_DLL FbxAnimCurveKeyBase
    00030 {
    00031 public:
    00034     FbxTime mTime;
    00035
    00038     FbxAnimCurveKeyBase()
    00039     {
    00040         mTime = FBXSDK_TIME_ZERO;
    00041     }
    00042
    00045     virtual ~FbxAnimCurveKeyBase() {};
    00046
    00050     virtual FbxTime GetTime() const
    00051     {
    00052         return mTime;
    00053     }
    00054
    00058     virtual void  SetTime(const FbxTime& pTime) {
    00059         mTime = pTime;
    00060     }
    00061 };
    00062
    00070 class FBXSDK_DLL FbxAnimCurveBase : public FbxObject
    00071 {
    00072     FBXSDK_ABSTRACT_OBJECT_DECLARE(FbxAnimCurveBase, FbxObject);
    00073
    00074 public:
    00080
    00081         virtual void KeyClear () = 0;
    00082
    00084         virtual int KeyGetCount () const = 0;
    00085
    00095         virtual int KeyAdd (FbxTime pTime, FbxAnimCurveKeyBase& pKey, int* pLast = NULL) = 0;
    00096
    00105         virtual bool KeySet(int pIndex, FbxAnimCurveKeyBase& pKey) = 0;
    00106
    00111         virtual bool KeyRemove(int pIndex) = 0;
    00112
    00118         virtual bool KeyRemove(int pStartIndex, int pEndIndex) = 0;
    00119
    00121
    00130         virtual FbxTime KeyGetTime(int /*pKeyIndex*/) const { return FBXSDK_TIME_INFINITE; }
    00131
    00136         virtual void KeySetTime(int pKeyIndex, FbxTime pTime) = 0;
    00137
    00139
    00151         enum EExtrapolationType
    00152         {
    00153             eConstant = 1,
    00154             eRepetition = 2,
    00155             eMirrorRepetition = 3,
    00156             eKeepSlope = 4
    00157         } ;
    00158
    00162         void SetPreExtrapolation(EExtrapolationType pExtrapolation) { mPreExtrapolation = pExtrapolation; }
    00163
    00167         EExtrapolationType GetPreExtrapolation() const { return mPreExtrapolation; }
    00168
    00173         void SetPreExtrapolationCount(unsigned long pCount) { mPreExtrapolationCount = pCount; }
    00174
    00179         unsigned long GetPreExtrapolationCount() const { return mPreExtrapolationCount; }
    00180
    00184         void SetPostExtrapolation(EExtrapolationType pExtrapolation) { mPostExtrapolation = pExtrapolation; }
    00185
    00189         EExtrapolationType GetPostExtrapolation() const { return mPostExtrapolation; }
    00190
    00195         void SetPostExtrapolationCount(unsigned long pCount) { mPostExtrapolationCount = pCount; }
    00196
    00201         unsigned long GetPostExtrapolationCount() const { return mPostExtrapolationCount; }
    00203
    00216           virtual float Evaluate (FbxTime pTime, int* pLast = NULL) = 0;
    00217
    00224         virtual float EvaluateIndex( double pIndex) = 0;
    00226
    00237         virtual bool GetTimeInterval(FbxTimeSpan& pTimeInterval);
    00239
    00240 /*****************************************************************************************************************************
    00241 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00242 *****************************************************************************************************************************/
    00243 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00244     virtual FbxObject& Copy(const FbxObject& pObject);
    00245     virtual bool Store(FbxIO* pFileObject, bool pLegacyVersion=false) = 0;
    00246     virtual bool Retrieve(FbxIO* pFileObject) = 0;
    00247
    00248 protected:
    00249     virtual void Construct(const FbxAnimCurveBase* pFrom);
    00250
    00251 private:
    00252     EExtrapolationType mPreExtrapolation;
    00253     unsigned long      mPreExtrapolationCount;
    00254     EExtrapolationType mPostExtrapolation;
    00255     unsigned long      mPostExtrapolationCount;
    00256 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
    00257 };
    00258
    00259 #include <fbxsdk/fbxsdk_nsend.h>
    00260
    00261 #endif // FBXFILESDK_KFBXPLUGINS_KFBXANIMCURVEBASE_H