kfbxanimcurvefilters.h

Go to the documentation of this file.
00001 /****************************************************************************************
00002 
00003    Copyright (C) 2010 Autodesk, Inc.
00004    All rights reserved.
00005 
00006    This computer source code and related instructions and comments are the unpublished
00007    confidential and proprietary information of Autodesk, Inc. and are protected under
00008    applicable copyright and trade secret law.  They may not be disclosed to, copied or
00009    used by any third party without the prior written consent of Autodesk, Inc.
00010 
00011 ****************************************************************************************/
00012 
00013 
00014 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXANIMCURVEFILTERS_H
00015 #define FBXFILESDK_KFBXPLUGINS_KFBXANIMCURVEFILTERS_H
00016 
00017 
00018 #include <fbxfilesdk/fbxfilesdk_def.h>
00019 
00020 #include <fbxfilesdk/kfbxplugins/kfbxobject.h>
00021 #include <fbxfilesdk/kfbxplugins/kfbxanimcurve.h>
00022 
00023 #include <fbxfilesdk/components/kbaselib/klib/ktime.h>
00024 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00025 #include <fbxfilesdk/kfbxmath/kfbxxmatrix.h>
00026 
00027 #include <fbxfilesdk/kfbxio/kfbxiosettings.h>
00028 
00029 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00030 
00031 class KFbxAnimStack;
00032 class KFbxAnimCurve;
00033 class KFbxAnimCurveNode;
00034 class KMBRotationOrder;
00035 
00060 class KFBX_DLL KFbxAnimCurveFilter
00061 {
00062 public:
00064     KFbxAnimCurveFilter();
00065 
00067     virtual ~KFbxAnimCurveFilter() {};
00068 
00076     virtual const char* GetName() const {return NULL;}
00077 
00082     KTime& GetStartTime() {return mStart;}
00083 
00088     void SetStartTime(KTime& pTime) { mStart = pTime; }
00089 
00094     KTime& GetStopTime() {return mStop;}
00095 
00100     void SetStopTime(KTime& pTime) { mStop = pTime; }
00101 
00107     int GetStartKey(KFbxAnimCurve& pCurve) const;
00108 
00114     int GetStopKey(KFbxAnimCurve& pCurve) const;
00115 
00120     virtual bool NeedApply(KFbxAnimStack* pAnimStack);
00121 
00127     virtual bool NeedApply(KFbxObject* pObj, KFbxAnimStack* pAnimStack);
00128 
00135     virtual bool NeedApply(KFbxAnimCurveNode& pCurveNode);
00136 
00142     virtual bool NeedApply(KFbxAnimCurve** pCurve, int pCount);
00143 
00148     virtual bool NeedApply(KFbxAnimCurve& pCurve);
00149 
00154     virtual bool Apply(KFbxAnimStack* pAnimStack);
00155 
00161     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack);
00162 
00169     virtual bool Apply(KFbxAnimCurveNode& pCurveNode);
00170 
00176     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount);
00177 
00182     virtual bool Apply(KFbxAnimCurve& pCurve) = 0;
00183 
00186     virtual void Reset() 
00187     { 
00188         mStart= KTIME_MINUS_INFINITE;
00189         mStop = KTIME_INFINITE;    
00190     }
00191 
00195     KError* GetError() { return &mError; }
00196 
00200     int GetLastErrorID() { return mError.GetLastErrorID(); }
00201 
00205     const char* GetLastErrorString() const { return mError.GetLastErrorString(); }
00207 
00208     static bool GetContinuousOffset(KMBRotationOrder& pOrder, double pOffset[3], double pNew[3], double pOld[3]);
00209 
00211 //
00212 //  WARNING!
00213 //
00214 //  Anything beyond these lines may not be documented accurately and is
00215 //  subject to change without notice.
00216 //
00218 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00219 
00220 protected:
00221     void GetKFCurvesFromAnimCurve(KFbxAnimCurve** pSrc, int pSrcCount, KFCurve** pDst, int& pDstCount);
00222 
00223     // Called for progress bar update, indicating what portion of work is done.
00224     virtual void UpdateProgressInformation(KTime pStart, KTime pStop) {};
00225 
00226     void FillError(const char* pErrorStringArray [], int pErrorCount)
00227     {
00228         mError.Reset(pErrorStringArray, pErrorCount);
00229     };
00230 
00231     // Time span for applying the filter.
00232     KTime mStart, mStop;
00233 
00234     // Error handling.
00235     KError mError;
00236 #endif
00237 };
00238 
00239 
00246 class KFBX_DLL KFbxAnimCurveFilterConstantKeyReducer : public KFbxAnimCurveFilter
00247 {
00248 public:
00250     KFbxAnimCurveFilterConstantKeyReducer();
00251 
00253     virtual ~KFbxAnimCurveFilterConstantKeyReducer() {};
00254 
00258     virtual const char* GetName() const;
00259 
00264     virtual bool Apply(KFbxAnimStack* pAnimStack)                   { return KFbxAnimCurveFilter::Apply(pAnimStack); }
00265     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return KFbxAnimCurveFilter::Apply(pObj, pAnimStack); }
00266     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount)          { return KFbxAnimCurveFilter::Apply(pCurve, pCount); }
00268 
00275     virtual bool Apply(KFbxAnimCurveNode& pCurveNode);
00276 
00281     virtual bool Apply(KFbxAnimCurve& pCurve);
00282 
00285     virtual void Reset();
00286 
00290     double GetDerivativeTolerance() const;
00291 
00295     void SetDerivativeTolerance(double pValue);
00296 
00300     double GetValueTolerance() const;
00301 
00305     void SetValueTolerance(double pValue);
00306 
00310     bool GetKeepFirstAndLastKeys() const;
00311 
00315     void SetKeepFirstAndLastKeys( bool pKeepFirstAndLastKeys );
00316 
00320     bool GetKeepOneKey() const;
00321 
00325     void SetKeepOneKey( bool pKeepOneKey );
00326 
00330     void SetKeepNotPureAutoKeys(bool pKeep);
00331 
00333 //
00334 //  WARNING!
00335 //
00336 //  Anything beyond these lines may not be documented accurately and is
00337 //  subject to change without notice.
00338 //
00340 
00341 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00342     //
00343     //  If ValueTolerance is default, we use the thresholds here, otherwise
00344     //  it is the ValueTolerance that is used. (Mainly for backward compatibility)
00345     //
00346     void SetTranslationThreshold    ( double pTranslationThreshold );
00347     void SetRotationThreshold       ( double pRotationThreshold );
00348     void SetScalingThreshold        ( double pScalingThreshold );
00349     void SetDefaultThreshold        ( double pDefaultThreshold );
00350 
00351     void SetModes(bool pExporting, KFbxIOSettings& pIOS);
00352 
00353 private:
00354     double  mDerTol;
00355     double  mValTol;
00356 
00357     double  mTranslationThreshold;
00358     double  mRotationThreshold;
00359     double  mScalingThreshold;
00360     double  mDefaultThreshold;
00361 
00362     bool   mKeepFirstAndLastKeys;
00363     bool   mKeepOneKey;
00364     bool   mKeepNotPureAutoKeys;
00365 
00366     bool IsKeyConstant(KFbxAnimCurve& pCurve, int pIndex, int pFirstIndex, int pLastIndex, 
00367                        double pMinValue, double pMaxValue, bool pOnlyCheckAutoKeys);
00368 #endif
00369 };
00370 
00375 class KFBX_DLL KFCurveFilterScaleCompensate : public KFbxAnimCurveFilter
00376 {
00377 public:
00379     enum EError
00380     {
00381         eNo2Curves, 
00382         eErrorCount 
00383     };
00384 
00386     KFCurveFilterScaleCompensate();
00388     virtual const char* GetName() const;
00389 
00398     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount, KFbxIOSettings& pIOS);
00400     virtual bool Apply(KFbxAnimCurve& pCurve);
00401 };
00402 
00410 class KFBX_DLL KFbxAnimCurveFilterGimbleKiller : public KFbxAnimCurveFilter
00411 {
00412 public:
00414     KFbxAnimCurveFilterGimbleKiller();
00415 
00417     virtual ~KFbxAnimCurveFilterGimbleKiller();
00418 
00422     virtual const char* GetName() const;
00423 
00429     virtual bool NeedApply(KFbxAnimStack* pAnimStack) { return false; }
00430 
00437     virtual bool NeedApply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return false; }
00438 
00447     virtual bool NeedApply(KFbxAnimCurveNode& pCurveNode);
00448 
00457     virtual bool NeedApply(KFbxAnimCurve** pCurve, int pCount);
00458 
00462     virtual bool NeedApply(KFbxAnimCurve& pCurve) { return false; }
00463     
00469     virtual bool Apply(KFbxAnimStack* pAnimStack) { return false; }
00470 
00477     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return false; }
00478 
00485     virtual bool Apply(KFbxAnimCurveNode& pCurveNode);
00486 
00495     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount);
00496 
00500     virtual bool Apply(KFbxAnimCurve& pCurve) { return false; }
00501 
00504     virtual void Reset();
00505 
00507     bool GetApplyKeySyncFilter() const;
00508 
00512     void SetApplyKeySyncFilter(bool pFlag);
00513 
00515 //
00516 //  WARNING!
00517 //
00518 //  Anything beyond these lines may not be documented accurately and is
00519 //  subject to change without notice.
00520 //
00522 
00523 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00524 private:
00525     KMBRotationOrder*   mRotationOrder;
00526     bool                mApplyKeySyncFilter;
00527     int                 mRotationLayerType;
00528 #endif
00529 };
00530 
00537 class KFBX_DLL KFbxAnimCurveFilterKeyReducer : public KFbxAnimCurveFilter
00538 {
00539 public:
00541     KFbxAnimCurveFilterKeyReducer();
00542 
00544     virtual ~KFbxAnimCurveFilterKeyReducer() {};
00545 
00549     virtual const char* GetName() const;
00550 
00555     virtual bool Apply(KFbxAnimStack* pAnimStack)                   { return KFbxAnimCurveFilter::Apply(pAnimStack); }
00556     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return KFbxAnimCurveFilter::Apply(pObj, pAnimStack); }
00557     virtual bool Apply(KFbxAnimCurveNode& pCurveNode)               { return KFbxAnimCurveFilter::Apply(pCurveNode); }
00559 
00565     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount);
00566 
00571     virtual bool Apply(KFbxAnimCurve& pCurve);
00572 
00575     virtual void Reset();
00576 
00578     double GetPrecision() const;
00579 
00583     void SetPrecision(double pPrecision);
00584 
00586     bool GetKeySync() const;
00587 
00591     void SetKeySync(bool pKeySync);
00592 
00594 //
00595 //  WARNING!
00596 //
00597 //  Anything beyond these lines may not be documented accurately and is
00598 //  subject to change without notice.
00599 //
00601 
00602 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00603 private:
00604     bool  KeyReducer(KFbxAnimCurve& pSCurve, KFbxAnimCurve& pTCurve, KTime pStart, KTime pStop);
00605     bool  Subdivise(KFbxAnimCurve& pSCurve, KFbxAnimCurve& pTCurve, int pLeft, int pRight);
00606     double FindMaxError(KFbxAnimCurve& pSCurve, KFbxAnimCurve& pTCurve, int pLeft, int pRight, int& pSplit);
00607         
00608     // User parameters.
00609     double  mPrecision;
00610     int    mProgressCurrentRecurseLevel;
00611     bool   mKeySync;
00612 #endif
00613 };
00614 
00615 
00620 class KFBX_DLL KFbxAnimCurveFilterKeySync : public KFbxAnimCurveFilter
00621 {
00622 public:
00624     KFbxAnimCurveFilterKeySync();
00625 
00627     virtual ~KFbxAnimCurveFilterKeySync() {};
00628 
00632     virtual const char* GetName() const;
00633 
00638     virtual bool NeedApply(KFbxAnimStack* pAnimStack)                   { return KFbxAnimCurveFilter::NeedApply(pAnimStack); }
00639     virtual bool NeedApply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return KFbxAnimCurveFilter::NeedApply(pObj, pAnimStack); }
00640     virtual bool NeedApply(KFbxAnimCurveNode& pCurveNode)               { return KFbxAnimCurveFilter::NeedApply(pCurveNode); }
00641     virtual bool Apply(KFbxAnimStack* pAnimStack)                       { return KFbxAnimCurveFilter::Apply(pAnimStack); }
00642     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack)     { return KFbxAnimCurveFilter::Apply(pObj, pAnimStack); }
00643     virtual bool Apply(KFbxAnimCurveNode& pCurveNode)                   { return KFbxAnimCurveFilter::Apply(pCurveNode); }
00645 
00651     virtual bool NeedApply(KFbxAnimCurve** pCurve, int pCount);
00652 
00657     virtual bool NeedApply(KFbxAnimCurve& pCurve) { return false; }
00658 
00664     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount);
00665 
00671     virtual bool Apply(KFbxAnimCurve& pCurve) { return true; }
00672 
00674 //
00675 //  WARNING!
00676 //
00677 //  Anything beyond these lines may not be documented accurately and is
00678 //  subject to change without notice.
00679 //
00681 
00682 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00683 #endif
00684 };
00685 
00686 
00691 class KFBX_DLL KFbxAnimCurveFilterResample : public KFbxAnimCurveFilter
00692 {
00693 public:
00695     KFbxAnimCurveFilterResample();
00696 
00698     virtual ~KFbxAnimCurveFilterResample() {};
00699 
00703     virtual const char* GetName() const;
00704 
00709     virtual bool Apply(KFbxAnimStack* pAnimStack)                       { return KFbxAnimCurveFilter::Apply(pAnimStack); }
00710     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack)     { return KFbxAnimCurveFilter::Apply(pObj, pAnimStack); }
00711     virtual bool Apply(KFbxAnimCurveNode& pCurveNode)                   { return KFbxAnimCurveFilter::Apply(pCurveNode); }
00712     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount)              { return KFbxAnimCurveFilter::Apply(pCurve, pCount); }
00714 
00719     virtual bool Apply(KFbxAnimCurve& pCurve);
00720 
00723     virtual void Reset();
00724 
00728     void SetKeysOnFrame(bool pKeysOnFrame);
00729 
00733     bool GetKeysOnFrame() const;
00734 
00738     KTime GetPeriodTime() const;
00739 
00743     void SetPeriodTime(KTime &pPeriod);
00744 
00745 
00749     bool  GetIntelligentMode() const;
00750 
00754     void  SetIntelligentMode( bool pIntelligent );
00755 
00757 //
00758 //  WARNING!
00759 //
00760 //  Anything beyond these lines may not be documented accurately and is
00761 //  subject to change without notice.
00762 //
00764 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00765 private:
00766     bool    mKeysOnFrame;
00767     KTime   mPeriod;
00768     bool    mIntelligent;
00769 #endif
00770 
00771 };
00772 
00773 
00778 class KFBX_DLL KFbxAnimCurveFilterScale : public KFbxAnimCurveFilter
00779 {
00780 public:
00782     KFbxAnimCurveFilterScale();
00783 
00785     virtual ~KFbxAnimCurveFilterScale() {};
00786 
00790     virtual const char* GetName() const;
00791 
00796     virtual bool Apply(KFbxAnimStack* pAnimStack)                       { return KFbxAnimCurveFilter::Apply(pAnimStack); }
00797     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack)     { return KFbxAnimCurveFilter::Apply(pObj, pAnimStack); }
00798     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount)              { return KFbxAnimCurveFilter::Apply(pCurve, pCount); }
00800 
00807     virtual bool Apply(KFbxAnimCurveNode& pCurveNode);
00808 
00813     virtual bool Apply(KFbxAnimCurve& pCurve);
00814 
00817     virtual void Reset();
00818 
00822     double GetScale() const;
00823 
00828     void SetScale(double pScale);
00829 
00831 //
00832 //  WARNING!
00833 //
00834 //  Anything beyond these lines may not be documented accurately and is
00835 //  subject to change without notice.
00836 //
00838 
00839 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00840 private:
00841     double mScale;
00842 #endif
00843 };
00844 
00845 
00850 class KFBX_DLL KFbxAnimCurveFilterTSS : public KFbxAnimCurveFilter
00851 {
00852 public:
00854     KFbxAnimCurveFilterTSS();
00855 
00857     virtual ~KFbxAnimCurveFilterTSS() {};
00858 
00862     virtual const char* GetName() const;
00863 
00868     virtual bool Apply(KFbxAnimStack* pAnimStack)                       { return KFbxAnimCurveFilter::Apply(pAnimStack); }
00869     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack)     { return KFbxAnimCurveFilter::Apply(pObj, pAnimStack); }
00870     virtual bool Apply(KFbxAnimCurveNode& pCurveNode)                   { return KFbxAnimCurveFilter::Apply(pCurveNode); }
00871     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount)              { return KFbxAnimCurveFilter::Apply(pCurve, pCount); }
00873 
00878     virtual bool Apply(KFbxAnimCurve& pCurve);
00879 
00882     virtual void Reset();
00883 
00887     KTime GetShift() const;
00888 
00892     void SetShift(KTime& pShift);
00893 
00897     double GetScale() const;
00898 
00902     void SetScale(double pScale);
00903 
00905 //
00906 //  WARNING!
00907 //
00908 //  Anything beyond these lines may not be documented accurately and is
00909 //  subject to change without notice.
00910 //
00912 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00913 private:
00914     KTime  mShift;
00915     double  mScale;
00916 #endif
00917 };
00918 
00934 class KFBX_DLL KFbxAnimCurveFilterUnroll : public KFbxAnimCurveFilter
00935 {
00936 public:
00938     KFbxAnimCurveFilterUnroll();
00939 
00941     virtual ~KFbxAnimCurveFilterUnroll() {};
00942    
00946     virtual const char* GetName() const;
00947 
00953     virtual bool NeedApply(KFbxAnimStack* pAnimStack) { return false; };
00954 
00961     virtual bool NeedApply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return false; }
00962 
00971     virtual bool NeedApply(KFbxAnimCurveNode& pCurveNode);
00972 
00981     virtual bool NeedApply(KFbxAnimCurve** pCurve, int pCount);
00982 
00986     virtual bool NeedApply(KFbxAnimCurve& pCurve) { return false; };
00987 
00993     virtual bool Apply(KFbxAnimStack* pAnimStack) { return false; };
00994 
01001     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return false; }
01002 
01008     virtual bool Apply(KFbxAnimCurveNode& pCurveNode);
01009 
01018     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount);
01019 
01023     virtual bool Apply(KFbxAnimCurve& pCurve) { return false; }
01024 
01027     virtual void Reset();
01028 
01032     double GetQualityTolerance() const;
01033 
01037     void SetQualityTolerance(double pQualityTolerance);
01038 
01042     bool GetTestForPath() const;
01043 
01047     void SetTestForPath(bool pTestForPath);
01048 
01055     bool GetForceAutoTangents() const;
01056 
01063     void SetForceAutoTangents(bool pForceAutoTangents);
01064 
01066 //
01067 //  WARNING!
01068 //
01069 //  Anything beyond these lines may not be documented accurately and is
01070 //  subject to change without notice.
01071 //
01073     void SetRotationOrder(int pOrder);
01074 
01075 #ifndef DOXYGEN_SHOULD_SKIP_THIS
01076 private:
01077     double  InterpolationQualityFactor(KFbxVector4& lV1, KFbxVector4& lV2);
01078 
01079     double          mQualityTolerance;
01080     bool            mTestForPath;
01081     bool            mForceAutoTangents;
01082     int             mRotationOrder;
01083     int             mRotationLayerType;
01084 #endif
01085 };
01086 
01094 class KFBX_DLL KFbxAnimCurveFilterMatrixConverter : public KFbxAnimCurveFilter
01095 {
01096 public:
01098     KFbxAnimCurveFilterMatrixConverter();
01099 
01101     virtual ~KFbxAnimCurveFilterMatrixConverter();
01102 
01106     virtual const char* GetName() const;
01107 
01112     virtual bool NeedApply(KFbxAnimCurve** pCurve, int pCount)          { return KFbxAnimCurveFilter::NeedApply(pCurve, pCount); }
01114 
01120     virtual bool NeedApply(KFbxAnimStack* pAnimStack) { return false; }
01121 
01128     virtual bool NeedApply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return false; }
01129 
01138     virtual bool NeedApply(KFbxAnimCurveNode* pCurveNode[3]);
01139 
01143     virtual bool NeedApply(KFbxAnimCurve& pCurve) { return false; }
01144 
01150     virtual bool Apply(KFbxAnimStack* pAnimStack) { return false; }
01151 
01158     virtual bool Apply(KFbxObject* pObj, KFbxAnimStack* pAnimStack) { return false; }
01159 
01167     virtual bool Apply(KFbxAnimCurveNode* pCurveNode[3]);
01168 
01181     virtual bool Apply(KFbxAnimCurve** pCurve, int pCount);
01182 
01193     bool Apply(KFbxAnimCurve** pCurve, double* pVals);
01194 
01198     virtual bool Apply(KFbxAnimCurve& pCurve) { return false; };
01199 
01202     virtual void Reset();
01203 
01218     enum EMatrixID
01219     {
01220         ePreGlobal,
01221         ePreTranslate,
01222         ePostTranslate,
01223         ePreRotate,
01224         ePostRotate,
01225         ePreScale,
01226         ePostScale,
01227         ePostGlobal,
01228         eScaleOffset,
01229         eInactivePre,
01230         eInactivePost,
01231         eRotationPivot,
01232         eScalingPivot,
01233         eMatrixCount
01234     };
01235 
01240     void GetSourceMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix) const;
01241 
01246     void SetSourceMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix);
01247     void SetSourceMatrix(EMatrixID pIndex, KgeAMatrix& pMatrix);
01248 
01253     void GetDestMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix) const;
01254 
01259     void SetDestMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix);
01260     void SetDestMatrix(EMatrixID pIndex, KgeAMatrix& pMatrix);
01261 
01265     KTime GetResamplingPeriod () const;
01266 
01270     void SetResamplingPeriod (KTime& pResamplingPeriod);
01271 
01275     bool GetGenerateLastKeyExactlyAtEndTime() const;
01276 
01280     void SetGenerateLastKeyExactlyAtEndTime(bool pFlag);
01281 
01285     bool GetResamplingOnFrameRateMultiple() const;
01286 
01295     void SetResamplingOnFrameRateMultiple(bool pFlag);
01296 
01300     bool GetApplyUnroll() const;
01301 
01306     void SetApplyUnroll(bool pFlag);
01307 
01311     bool GetApplyConstantKeyReducer() const;
01312 
01316     void SetApplyConstantKeyReducer(bool pFlag);
01317 
01323     bool GetResampleTranslation() const;
01324 
01330     void SetResampleTranslation(bool pFlag);
01331 
01335     void SetSrcRotateOrder(int pOrder);
01336 
01340     void SetDestRotateOrder(int pOrder);
01341 
01345     void SetForceApply(bool pVal);
01346 
01350     bool GetForceApply() const;
01352 //
01353 //  WARNING!
01354 //
01355 //  Anything beyond these lines may not be documented accurately and is
01356 //  subject to change without notice.
01357 //
01359 #ifndef DOXYGEN_SHOULD_SKIP_THIS
01360 private:
01361     // Nicer than refering to 0, 1, 2...
01362     enum
01363     {
01364         eX,
01365         eY,
01366         eZ,
01367         eDimCount
01368     };
01369         
01370     // Convert parameter cell.
01371     class Cell;
01372     
01373     bool MatricesEquivalence(KFbxXMatrix pMatArrayA [eMatrixCount], 
01374                              KFbxXMatrix pMatArrayB [eMatrixCount]) const;
01375 
01376     bool DoConvert(KFbxAnimCurve** pCurve, 
01377                     double pT[eDimCount], 
01378                     double pR[eDimCount], 
01379                     double pS[eDimCount]);
01380 
01381     void FindTimeInterval
01382     (
01383         KTime& pStart, 
01384         KTime& pEnd,
01385         KFbxAnimCurve* pTFCurve [eDimCount], 
01386         KFbxAnimCurve* pRFCurve [eDimCount], 
01387         KFbxAnimCurve* pSFCurve [eDimCount]
01388     );
01389 
01390     void ComputeTotalMatrix
01391     (
01392         KFbxXMatrix& pGlobal, 
01393         Cell& pCell,
01394         KFbxXMatrix& pTranslate,
01395         KFbxXMatrix& pRotate,
01396         KFbxXMatrix& pScale
01397     );
01398 
01399     void ExtractTransforms
01400     (
01401         KFbxVector4& pScaleVector,
01402         KFbxVector4& pRotateVector,
01403         KFbxVector4& pTranslateVector,
01404         KFbxXMatrix& pGlobal,
01405         Cell& pDest
01406     );
01407 
01408     void SetDestFCurve(KFbxAnimCurve* pCurve [eDimCount], 
01409                        int pIndex, 
01410                        KTime pTime, 
01411                        KFbxVector4 pVector,
01412                        KFbxAnimCurveDef::EInterpolationType pInterpMode[eDimCount], 
01413                        KFbxAnimCurveDef::ETangentMode pTangentMode[eDimCount]);
01414 
01415     void FillInterpAndTangeant(KTime& pTime, 
01416                                KFbxAnimCurve* pSourceCurve[eDimCount], 
01417                                KFbxAnimCurveDef::EInterpolationType* pInterp, 
01418                                KFbxAnimCurveDef::ETangentMode* pTangeant);
01419 
01420     void SetDestFCurveTangeant(KFbxAnimCurve* pCurve [eDimCount], 
01421                                int pIndex, 
01422                                KFbxAnimCurveDef::ETangentMode pTangentMode[eDimCount], 
01423                                KFbxVector4 pKeyValue, 
01424                                KFbxVector4 pNextKeyValue);
01425 
01426     Cell* mSource;
01427     Cell* mDest;
01428 
01429     KTime mResamplingPeriod;
01430     bool mResamplingOnFrameRateMultiple;
01431 
01432     bool mApplyUnroll;
01433     bool mApplyConstantKeyReducer;
01434 
01435     // PP : So that the concatenation of matrices takes into account the rotation order
01436     KMBRotationOrder* mSrcRotationOrder;
01437     KMBRotationOrder* mDestRotationOrder;
01438 
01439     // Set last key exactly at end time or a frame period later.    
01440     bool mGenerateLastKeyExactlyAtEndTime;
01441 
01442     // Translation resampling flag.
01443     bool mResampleTranslation;
01444 
01445     // Force Apply
01446     bool mForceApply;
01447 
01448     // internal usage
01449     KFbxAnimCurveNode* mRotationCurveNode;
01450 #endif
01451 };
01452 
01453 
01454 #include <fbxfilesdk/fbxfilesdk_nsend.h>
01455 
01456 #endif // FBXFILESDK_KFBXPLUGINS_KFBXANIMCURVEFILTER_H
01457 
01458 
01459