- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxanimcurvebase.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 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 protected:
    00241     FbxAnimCurveBase(FbxManager& pManager, char const* pName);
    00242
    00243 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00244
    00245     //  WARNING!
    00246     //    Anything beyond these lines may not be documented accurately and is
    00247     //     subject to change without notice.
    00249 public:
    00250     virtual bool Store(FbxIO* pFileObject, bool pLegacyVersion=false) = 0;
    00251     virtual bool Retrieve(FbxIO* pFileObject) = 0;
    00252
    00253 private:
    00254     EExtrapolationType mPreExtrapolation;
    00255     unsigned long      mPreExtrapolationCount;
    00256     EExtrapolationType mPostExtrapolation;
    00257     unsigned long      mPostExtrapolationCount;
    00258
    00259     friend class FbxObject;
    00260 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00261 };
    00262
    00263 #include <fbxsdk/fbxsdk_nsend.h>
    00264
    00265 #endif // FBXFILESDK_KFBXPLUGINS_KFBXANIMCURVEBASE_H