00001
00004 #ifndef FBXFILESDK_COMPONENTS_KFCURVE_KFCURVEGLOBAL_H
00005 #define FBXFILESDK_COMPONENTS_KFCURVE_KFCURVEGLOBAL_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include <fbxfilesdk/components/kfcurve/kfcurve_h.h>
00043
00044 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00045
00046 #include <fbxfilesdk/components/kbaselib/klib/karrayul.h>
00047 #include <fbxfilesdk/components/kbaselib/klib/ktime.h>
00048
00049 #include <fbxfilesdk/components/kfcurve/kfcurve_forward.h>
00050
00051 #include <fbxfilesdk/components/kfcurve/kfcurve.h>
00052
00053
00054
00055 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00056 KFBX_FORWARD_HI(KFCurve);
00057 KFBX_FORWARD_HI(KFCurveNode);
00058
00059 #define KFCURVE_INTEPOLATION_INFINITE 1000
00060 #define KFCURVE_OVERSHOOT_INTERPOLATION 500.0
00061
00064 KFBX_FORWARD(KSmartPlotOptions)
00065
00066 class KFBX_DLL KSmartPlotOptions
00067 {
00068
00069 public:
00070
00072 bool mUseSmartPlot;
00073
00075 bool mUseBreakTangent;
00076 double mBreakTangentThreshold;
00077 KTime mEpsilonTime;
00078
00080 bool mUseIncreaseFidelity;
00081 double mFidelityTolerance;
00082 bool mFidelityUseBreakTangent;
00083 int mFidelitySegmentCount;
00084 bool mFidelitySyncAddedKeys;
00085
00087 bool mShowReferenceCurve;
00088
00090 KSmartPlotOptions();
00091 };
00092
00095 KFBX_FORWARD(KMergeLayerOptions)
00096
00097 class KFBX_DLL KMergeLayerOptions
00098 {
00099
00100 public:
00101
00103 KTime mStart;
00104
00106 KTime mStop;
00107
00109 KTime mPlotPeriod;
00110
00112 KSmartPlotOptions mSmartPlotOptions;
00113
00115 KMergeLayerOptions();
00116 };
00117
00118
00119
00121 KFBX_DLL void KFCurve_SetTWSet (KSet* pSet);
00122
00124 KFBX_DLL HKFCurveNode KFCurve_FindTWFromNickNumber (int pNickNumber);
00125
00127 KFBX_DLL bool KFCurve_FindNickNumberFromTW (int& pNickNumber, HKFCurveNode pTWNode);
00128
00129
00130
00131 enum
00132 {
00133
00134 eKFCURVE_PLOT_SourceCurvesDestroy = 1<<1 ,
00135 eKFCURVE_PLOT_SourceCurvesZeroDuringPlotTime = 1<<2 ,
00136 eKFCURVE_PLOT_DestinationCurveMergeWithResult = 1<<3 ,
00137 eKFCURVE_PLOT_DestinationCurveReplaceByResult = 1<<4 ,
00138 eKFCURVE_PLOT_ForCache = 1<<5 ,
00139 };
00140
00158 KFBX_DLL void KFCurve_PlotInLayers
00159 (
00160 HKFCurveNode pParentNode,
00161 KArrayTemplate<int> *pSourceLayers,
00162 int pDestLayer,
00163 kUInt pOptions,
00164 KTime pStart,
00165 KTime pStop,
00166 KTime pPlotPeriod,
00167 HKFCurveNode pDestinationNode,
00168 HKFCurveNode pTotalNode,
00169 bool pUseTimeWarp,
00170 HKSmartPlotOptions pSmartPlotOptions = NULL
00171 );
00172
00173
00174
00175
00176
00177
00178
00179
00180
00188 KFBX_DLL bool AxisAlignmentInEulerAngle(double pAB[3], double pA[3], double pB[3], double pAngles[3]);
00189
00190
00191 KFBX_DLL KTime KFCURVE_GetPlotPeriod();
00192 KFBX_DLL void KFCURVE_SetPlotPeriod(KTime pPlotPeriod);
00193
00194
00195
00196
00197 KFBX_DLL bool KFCURVE_GetPlotOnFrame();
00198 KFBX_DLL void KFCURVE_SetPlotOnFrame( bool pPlotOnFrame );
00199
00200
00201
00202
00203 enum { KFCurveApplyNone = 0, KFCurveApplyGimbleKiller, KFCurveApplyUnroll };
00204
00205 KFBX_DLL int KFCURVE_GetRotationFilterToApply();
00206 KFBX_DLL void KFCURVE_SetRotationFilterToApply(int pRotationFilterToApply);
00207 KFBX_DLL void KFCURVE_ApplyRotationFilter( HKFCurveNode pCurveNode, KTime pStart = KTIME_MINUS_INFINITE, KTime pStop = KTIME_INFINITE );
00208
00209 KFBX_DLL double KFCURVE_GetRotationFilterUnrollQuality();
00210 KFBX_DLL void KFCURVE_SetRotationFilterUnrollQuality( double pQuality );
00211
00212 KFBX_DLL bool KFCURVE_GetRotationFilterUnrollTestForPath();
00213 KFBX_DLL void KFCURVE_SetRotationFilterUnrollTestForPath( bool pTestForPath );
00214
00215 KFBX_DLL double KFCURVE_GetButterworthFilterInternalRate();
00216 KFBX_DLL void KFCURVE_SetButterworthFilterInternalRate( double pButterworthFilterInternalRate );
00217
00218
00219
00220
00221 KFBX_DLL bool KFCURVE_GetUseConstantKeyReducer();
00222 KFBX_DLL void KFCURVE_SetUseConstantKeyReducer( bool pUseConstantKeyReducer );
00223
00224
00225
00226
00227 KFBX_DLL bool KFCURVE_GetConstantKeyReducerKeepOneKey();
00228 KFBX_DLL void KFCURVE_SetConstantKeyReducerKeepOneKey( bool pConstantKeyReducerKeepOneKey );
00229
00230
00231
00232
00233 KFBX_DLL bool KFCURVE_GetUseConstantKeyReducerOnDevices();
00234 KFBX_DLL void KFCURVE_SetUseConstantKeyReducerOnDevices( bool pUseConstantKeyReducerOnDevices );
00235
00236
00237 KFBX_DLL double KFCURVE_GetUseConstantKeyReducerTranslationThreshold();
00238 KFBX_DLL void KFCURVE_SetUseConstantKeyReducerTranslationThreshold( double pConstantKeyReducerTranslationThreshold );
00239
00240
00241 KFBX_DLL double KFCURVE_GetUseConstantKeyReducerRotationThreshold();
00242 KFBX_DLL void KFCURVE_SetUseConstantKeyReducerRotationThreshold( double pConstantKeyReducerRotationThreshold );
00243
00244
00245 KFBX_DLL double KFCURVE_GetUseConstantKeyReducerScalingThreshold();
00246 KFBX_DLL void KFCURVE_SetUseConstantKeyReducerScalingThreshold( double pConstantKeyReducerScalingThreshold );
00247
00248
00249 KFBX_DLL double KFCURVE_GetUseConstantKeyReducerDefaultThreshold();
00250 KFBX_DLL void KFCURVE_SetUseConstantKeyReducerDefaultThreshold( double pConstantKeyReducerDefaultThreshold );
00251
00252
00253
00254
00255 KFBX_DLL bool KFCURVE_GetPlotTranslationOnRootOnly();
00256 KFBX_DLL void KFCURVE_SetPlotTranslationOnRootOnly( bool pPlotTranslationOnRootOnly );
00257
00258
00259 KFBX_DLL bool KFCURVE_GetPreciseTimeDiscontinuities();
00260 KFBX_DLL void KFCURVE_SetPreciseTimeDiscontinuities( bool pPreciseTimeDiscontinuities );
00261
00262
00263 KFBX_DLL bool KFCURVE_GetTCB4051EvalMode();
00264 KFBX_DLL void KFCURVE_SetTCB4051EvalMode( bool pTCB4051EvalMode );
00265
00266
00267 KFBX_DLL void KFCURVE_ComputeAutoFromBezier(double &pLeftParam, double &pRightParam, double &pLeftTan, double &pRightTan, double &pToLeftKey, double &pToRightKey);
00268 KFBX_DLL void KFCURVE_ComputeBezierFromAuto(double &pLeftTan, double &pRightTan, double &pLeftParam, double &pRightParam, double &pToLeftKey, double &pToRightKey);
00269
00270 KFBX_DLL void KFCURVE_ComputeLeftAutoFromBezier(double &pLeftParam, double &pLeftTan, double &pToLeftKey, double &pToRightKey);
00271 KFBX_DLL void KFCURVE_ComputeLeftBezierFromAuto(double &pLeftTan, double &pLeftParam, double &pToLeftKey, double &pToRightKey);
00272
00273 KFBX_DLL void KFCURVE_ComputeRightAutoFromBezier(double &pRightParam, double &pRightTan, double &pToLeftKey, double &pToRightKey);
00274 KFBX_DLL void KFCURVE_ComputeRightBezierFromAuto(double &pRightTan, double &pRightParam, double &pToLeftKey, double &pToRightKey);
00275
00276 KFBX_DLL void KFCURVE_ComputeAutoFromBezierForKey(double &pLeftParam, double &pRightParam, double &pLeftTan, double &pRightTan, HKFCurve pCurve, int pIndex);
00277 KFBX_DLL void KFCURVE_ComputeBezierFromAutoForKey(double &pLeftTan, double &pRightTan , double &pLeftParam, double &pRightParam, HKFCurve pCurve, int pIndex);
00278
00279 KFBX_DLL void KFCURVE_ComputeLeftAutoFromBezierForKey(double &pLeftParam, double &pLeftTan, HKFCurve pCurve, int pIndex);
00280 KFBX_DLL void KFCURVE_ComputeLeftBezierFromAutoForKey(double &pLeftTan, double &pLeftParam, HKFCurve pCurve, int pIndex);
00281
00282 KFBX_DLL void KFCURVE_ComputeRightAutoFromBezierForKey(double &pRightParam, double &pRightTan, HKFCurve pCurve, int pIndex);
00283 KFBX_DLL void KFCURVE_ComputeRightBezierFromAutoForKey(double &pRightTan , double &pRightParam, HKFCurve pCurve, int pIndex);
00284
00285 KFBX_DLL void KFCURVE_ComputeToLeftAndToRight(double &pToLeft, double &pToRight, HKFCurve pCurve , int pIndex);
00286
00293 KFBX_DLL void KFCURVE_BreakTangents( HKFCurveNode pFCurveNode, HKFCurveNode pReferenceFCurveNode, KTime pEpsilonTime, double pTangentThreshold );
00294
00295 KFBX_DLL void KFCURVE_ComputeTCBFromBezierForKey( double &pT, double &pC ,double &pB , double pLTan, double pRTan, HKFCurve pCurve, int pIndex );
00296
00309 KFBX_DLL void KFCURVE_IncreaseFidelity( HKFCurveNode pFCurveNode, HKFCurveNode pReferenceFCurveNode, double pFidelityThreshold, int pSegmentCount, bool pBreakTangents, KTime pEpsilonTime, double pTangentThreshold, bool pSyncAddedKeys = false, KArrayTemplate<HKFCurve>* pSyncWithFCurves = NULL, KArrayTemplate<HKFCurve>* pSyncWithReferenceFCurves = NULL );
00310
00311
00318 KFBX_DLL bool KFCURVE_IsAllSameInterpolation( HKFCurveNode pFCurveNode, kFCurveInterpolation pInterpolation, bool pAllLayer);
00319
00327 KFBX_DLL void KFCURVE_ConstantCurveMerge(HKFCurveNode pDstNode,HKFCurveNode pSrcNode, KTime pStart, KTime pStop);
00328
00329 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00330
00331 #endif // FBXFILESDK_COMPONENTS_KFCURVE_KFCURVEGLOBAL_H
00332