FBX SDK Reference Guide: kfbxkfcurvefilters.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_KFBXKFCURVE_FILTERS_H_
00005 #define _FBXSDK_KFBXKFCURVE_FILTERS_H_
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2008 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kfbxplugins/kfbxobject.h>
00048 #include <klib/ktime.h>
00049 #include <klib/kerror.h>
00050 #include <kfbxmath/kfbxxmatrix.h>
00051 
00052 
00053 #include <fbxfilesdk_nsbegin.h>
00054 class KFCurve;
00055 class KFCurveNode;
00056 class KFCurveFilterConstantKeyReducer;
00057 class KFCurveFilterMatrixConverter;
00058 class KFCurveFilterResample;
00059 class KFCurveFilterUnroll;
00060 class KFCurveFilter;
00061 
00068 class KFBX_DLL KFbxKFCurveFilters : public KFbxObject
00069 {
00070     KFBXOBJECT_DECLARE(KFbxKFCurveFilters,KFbxObject);
00071 
00072 public:
00076     virtual const char* GetName() {return NULL;}
00077 
00081     virtual KTime& GetStartTime() {return mTime;}
00082 
00086     virtual void SetStartTime(KTime& pTime){return;}
00087 
00091     virtual KTime& GetStopTime(){return mTime;}
00092 
00096     virtual void SetStopTime(KTime& pTime){return ;}
00097 
00102     virtual int GetStartKey(KFCurve& pCurve){return 0;}
00103 
00108     virtual int GetStopKey(KFCurve& pCurve){return 0;}
00109 
00115     virtual bool NeedApply(KFCurveNode& pCurveNode, bool pRecursive = true){return false;}
00116 
00122     virtual bool NeedApply(KFCurve** pCurve, int pCount){return false;}
00123 
00128     virtual bool NeedApply(KFCurve& pCurve){return false;}
00129 
00135     virtual bool Apply(KFCurveNode& pCurveNode, bool pRecursive = true){return false;}
00136 
00142     virtual bool Apply(KFCurve** pCurve, int pCount){return false;}
00143 
00148     virtual bool Apply(KFCurve& pCurve){return false;}
00149 
00152     virtual void Reset(){return ;}
00153 
00157     virtual KError& GetError(){return GetError();}
00158 
00162     virtual int GetLastErrorID(){return -1;}
00163 
00167     virtual char* GetLastErrorString(){return NULL;}
00169 //
00170 //  WARNING!
00171 //
00172 //  Anything beyond these lines may not be documented accurately and is
00173 //  subject to change without notice.
00174 //
00176 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00177 
00178 protected:
00179     KFbxKFCurveFilters(KFbxSdkManager& pManager, char const* pName);
00180     virtual ~KFbxKFCurveFilters();
00181     virtual void Destruct(bool pRecursive, bool pDependents);
00182     KTime mTime;
00183 #endif
00184 };
00185 
00186 
00187 
00188 
00195 class KFBX_DLL KFbxKFCurveFilterConstantKeyReducer : public KFbxKFCurveFilters
00196 {
00197     KFBXOBJECT_DECLARE(KFbxKFCurveFilterConstantKeyReducer,KFbxKFCurveFilters);
00198 
00199 public:
00200 
00201 
00205     const char* GetName();
00206 
00210     KTime& GetStartTime();
00211 
00215     void SetStartTime(KTime& pTime);
00216 
00220     KTime& GetStopTime();
00221 
00225     void SetStopTime(KTime& pTime);
00226 
00231     int GetStartKey(KFCurve& pCurve);
00232 
00237     int GetStopKey(KFCurve& pCurve);
00238 
00244     bool NeedApply(KFCurveNode& pCurveNode, bool pRecursive = true);
00245 
00251     bool NeedApply(KFCurve** pCurve, int pCount);
00252 
00257     bool NeedApply(KFCurve& pCurve);
00258 
00262     KError& GetError();
00263 
00267     int GetLastErrorID() const;
00268 
00272     const char* GetLastErrorString() const;
00273 
00279     bool Apply(KFCurveNode& pCurveNode, bool pRecursive = true);
00280 
00286     bool Apply(KFCurve** pCurve, int pCount);
00287 
00292     bool Apply(KFCurve& pCurve);
00293 
00296     void Reset();
00297 
00301     double GetDerivativeTolerance();
00302 
00306     void SetDerivativeTolerance(double pValue);
00307 
00311     double GetValueTolerance();
00312 
00316     void SetValueTolerance(double pValue);
00317 
00321     bool GetKeepFirstAndLastKeys();
00322 
00326     void SetKeepFirstAndLastKeys( bool pKeepFirstAndLastKeys );
00327 
00331     bool GetKeepOneKey();
00332 
00336     void SetKeepOneKey( bool pKeepOneKey );
00337 
00339 //
00340 //  WARNING!
00341 //
00342 //  Anything beyond these lines may not be documented accurately and is
00343 //  subject to change without notice.
00344 //
00346 
00347 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00348     //
00349     //  If ValueTolerance is default, we use the thresholds here, otherwise
00350     //  it is the ValueTolerance that is used. (Mainly for backward compatibility)
00351     //
00352     void SetTranslationThreshold    ( double pTranslationThreshold );
00353     void SetRotationThreshold       ( double pRotationThreshold );
00354     void SetScalingThreshold        ( double pScalingThreshold );
00355     void SetDefaultThreshold        ( double pDefaultThreshold );
00356 protected:
00358     KFbxKFCurveFilterConstantKeyReducer(KFbxSdkManager& pManager, char const* pName);
00359     virtual ~KFbxKFCurveFilterConstantKeyReducer();
00360     KFCurveFilterConstantKeyReducer *mDataCurveFilter;
00361     virtual void Destruct(bool pRecursive, bool pDependents);
00362 
00363 #endif
00364 };
00365 
00366 
00367 
00368 
00372 class KFBX_DLL KFbxKFCurveFilterMatrixConverter : public KFbxKFCurveFilters
00373 {
00374     KFBXOBJECT_DECLARE(KFbxKFCurveFilterMatrixConverter,KFbxKFCurveFilters);
00375 
00376 public:
00377 
00381     const char* GetName();
00382 
00386     KTime& GetStartTime();
00387 
00391     void SetStartTime(KTime& pTime);
00392 
00396     KTime& GetStopTime();
00397 
00401     void SetStopTime(KTime& pTime);
00402 
00407     int GetStartKey(KFCurve& pCurve);
00408 
00413     int GetStopKey(KFCurve& pCurve);
00414 
00420     bool NeedApply(KFCurveNode& pCurveNode, bool pRecursive = true);
00421 
00427     bool NeedApply(KFCurve** pCurve, int pCount);
00428 
00433     bool NeedApply(KFCurve& pCurve);
00434 
00438     KError& GetError();
00439 
00443     int GetLastErrorID() const;
00444 
00448     const char* GetLastErrorString() const;
00449 
00455     bool Apply(KFCurveNode& pCurveNode, bool pRecursive = true);
00456 
00462     bool Apply(KFCurve** pCurve, int pCount);
00463 
00468     bool Apply(KFCurve& pCurve);
00469 
00472     void Reset();
00473 
00488     enum EMatrixID
00489     {
00490         ePreGlobal,
00491         ePreTranslate,
00492         ePostTranslate,
00493         ePreRotate,
00494         ePostRotate,
00495         ePreScale,
00496         ePostScale,
00497         ePostGlobal,
00498         eScaleOffset,
00499         eInactivePre,
00500         eInactivePost,
00501         eRotationPivot,
00502         eScalingPivot,
00503         eMatrixCount
00504     };
00505 
00510     void GetSourceMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix);
00511 
00516     void SetSourceMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix);
00517 
00522     void GetDestMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix);
00523 
00528     void SetDestMatrix(EMatrixID pIndex, KFbxXMatrix& pMatrix);
00529 
00533     KTime GetResamplingPeriod ();
00534 
00538     void SetResamplingPeriod (KTime& pResamplingPeriod);
00539 
00543     bool GetGenerateLastKeyExactlyAtEndTime();
00544 
00548     void SetGenerateLastKeyExactlyAtEndTime(bool pFlag);
00549 
00553     bool GetResamplingOnFrameRateMultiple();
00554 
00563     void SetResamplingOnFrameRateMultiple(bool pFlag);
00564 
00568     bool GetApplyUnroll();
00569 
00573     void SetApplyUnroll(bool pFlag);
00574 
00578     bool GetApplyConstantKeyReducer();
00579 
00583     void SetApplyConstantKeyReducer(bool pFlag);
00584 
00590     bool GetResampleTranslation();
00591 
00597     void SetResampleTranslation(bool pFlag);
00598 
00602     void SetSrcRotateOrder(int pOrder);
00603 
00607     void SetDestRotateOrder(int pOrder);
00608 
00612     void SetForceApply(bool pVal);
00613 
00617     bool GetForceApply();
00619 //
00620 //  WARNING!
00621 //
00622 //  Anything beyond these lines may not be documented accurately and is
00623 //  subject to change without notice.
00624 //
00626 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00627 protected:
00629     KFbxKFCurveFilterMatrixConverter(KFbxSdkManager& pManager, char const* pName);
00630     virtual ~KFbxKFCurveFilterMatrixConverter();
00631     KFCurveFilterMatrixConverter *mDataCurveFilter;
00632     virtual void Destruct(bool pRecursive, bool pDependents);
00633 #endif
00634 };
00635 
00636 
00637 
00638 
00642 class KFBX_DLL KFbxKFCurveFilterResample : public KFbxKFCurveFilters
00643 {
00644     KFBXOBJECT_DECLARE(KFbxKFCurveFilterResample,KFbxKFCurveFilters);
00645 
00646 public:
00650     const char* GetName();
00651 
00655     KTime& GetStartTime();
00656 
00660     void SetStartTime(KTime& pTime);
00661 
00665     KTime& GetStopTime();
00666 
00670     void SetStopTime(KTime& pTime);
00671 
00676     int GetStartKey(KFCurve& pCurve);
00677 
00682     int GetStopKey(KFCurve& pCurve);
00683 
00689     bool NeedApply(KFCurveNode& pCurveNode, bool pRecursive = true);
00690 
00696     bool NeedApply(KFCurve** pCurve, int pCount);
00697 
00702     bool NeedApply(KFCurve& pCurve);
00703 
00707     KError& GetError();
00708 
00712     int GetLastErrorID() const;
00713 
00717     const char* GetLastErrorString() const;
00718 
00724     bool Apply(KFCurveNode& pCurveNode, bool pRecursive = true);
00725 
00731     bool Apply(KFCurve** pCurve, int pCount);
00732 
00737     bool Apply(KFCurve& pCurve);
00738 
00741     void Reset();
00742 
00746     void SetKeysOnFrame(bool pKeysOnFrame);
00747 
00751     bool GetKeysOnFrame();
00752 
00756     KTime GetPeriodTime();
00757 
00761     void SetPeriodTime(KTime &pPeriod);
00762 
00763 
00767     bool  GetIntelligentMode();
00768 
00772     void  SetIntelligentMode( bool pIntelligent );
00773 
00775 //
00776 //  WARNING!
00777 //
00778 //  Anything beyond these lines may not be documented accurately and is
00779 //  subject to change without notice.
00780 //
00782 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00783 protected:
00785     KFbxKFCurveFilterResample(KFbxSdkManager& pManager, char const* pName);
00786     virtual ~KFbxKFCurveFilterResample();
00787     KFCurveFilterResample *mDataCurveFilter;
00788     virtual void Destruct(bool pRecursive, bool pDependents);
00789 #endif
00790 
00791 };
00792 
00796 class KFBX_DLL KFbxKFCurveFilterUnroll : public KFbxKFCurveFilters
00797 {
00798     KFBXOBJECT_DECLARE(KFbxKFCurveFilterUnroll,KFbxKFCurveFilters);
00799 
00800 public:
00801 
00805     const char* GetName();
00806 
00810     KTime& GetStartTime();
00814     void SetStartTime(KTime& pTime);
00818     KTime& GetStopTime();
00819 
00823     void SetStopTime(KTime& pTime);
00824 
00829     int GetStartKey(KFCurve& pCurve);
00834     int GetStopKey(KFCurve& pCurve);
00835 
00841     bool NeedApply(KFCurveNode& pCurveNode, bool pRecursive = true);
00842 
00848     bool NeedApply(KFCurve** pCurve, int pCount);
00849 
00854     bool NeedApply(KFCurve& pCurve);
00855 
00859     KError& GetError();
00863     int GetLastErrorID() const;
00867     const char* GetLastErrorString() const;
00868 
00874     bool Apply(KFCurveNode& pCurveNode, bool pRecursive = true);
00875 
00881     bool Apply(KFCurve** pCurve, int pCount);
00882 
00887     bool Apply(KFCurve& pCurve);
00888 
00891     void Reset();
00892 
00896     double GetQualityTolerance();
00897 
00901     void SetQualityTolerance(double pQualityTolerance);
00902 
00906     bool GetTestForPath();
00907 
00911     void SetTestForPath(bool pTestForPath);
00912 
00914 //
00915 //  WARNING!
00916 //
00917 //  Anything beyond these lines may not be documented accurately and is
00918 //  subject to change without notice.
00919 //
00921 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00922 protected:
00924     KFbxKFCurveFilterUnroll(KFbxSdkManager& pManager, char const* pName);
00925     virtual ~KFbxKFCurveFilterUnroll();
00926     KFCurveFilterUnroll *mDataCurveFilter;
00927     virtual void Destruct(bool pRecursive, bool pDependents);
00928 #endif
00929 };
00930 
00931 #include <fbxfilesdk_nsend.h>
00932 
00933 #endif // #ifndef _FBXSDK_KFXKFCURVE_FILTERS_H_