Go to the
documentation of this file.
00001
00004 #ifndef FBXFILESDK_COMPONENTS_KFCURVE_KFCURVEUTILS_H
00005 #define FBXFILESDK_COMPONENTS_KFCURVE_KFCURVEUTILS_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 #include <fbxfilesdk/fbxfilesdk_def.h>
00042
00043 #include <fbxfilesdk/components/kfcurve/kfcurve.h>
00044 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00045
00046 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00047
00048 class KFCurveNode;
00049
00064 class KFBX_DLL KFCurveUtils
00065 {
00066
00067 public:
00068
00074 static bool CompareCurve(KFCurve* pCurveA, KFCurve* pCurveB);
00075
00083 static bool GetGlobalInterpolation(kFCurveInterpolation& pGlobalInterpolation, KFCurve& pCurve);
00084
00092 static bool GetGlobalTangeant(kFCurveTangeantMode& pGlobalTangent, KFCurve& pCurve);
00093
00095 enum EInterpolationAndTangeant
00096 {
00097 eCONSTANT,
00098 eLINEAR,
00099 eCUBIC_AUTO,
00100 eCUBIC_AUTO_BREAK,
00101 eCUBIC_USER,
00102 eCUBIC_BREAK,
00103 eCUBIC_TCB,
00104 eINTERPOLATION_AND_TANGEANT_COUNT
00105 };
00106
00112 static bool GetInterpolationAndTangeantCount(KFCurve& pCurve, int pArray[eINTERPOLATION_AND_TANGEANT_COUNT]);
00113
00121 static KFCurveNode& ConvertCurveInterpolationRecursive
00122 (
00123 kFCurveInterpolation pTargetGlobalInterpolation,
00124 kFCurveTangeantMode pTargetGlobalTangent,
00125 KFCurveNode& pCurveNode
00126 );
00127
00138 static KFCurve& ConvertCurve
00139 (
00140 KFCurve& pSourceCurve,
00141 KFCurve& pTargetCurve,
00142 kFCurveInterpolation pTargetGlobalInterpolation,
00143 kFCurveTangeantMode pTargetGlobalTangent,
00144 KTime pFramePeriod
00145 );
00146
00160 static void Resample
00161 (
00162 KFCurve &pSourceCurve,
00163 KFCurve &pTargetCurve,
00164 KTime &pStart,
00165 KTime &pStop,
00166 KTime &pPeriod,
00167 kFCurveInterpolation pInterpolation,
00168 kFCurveTangeantMode pTangentMode,
00169 bool pAddStopKey = false
00170 );
00171
00184 static void Resample
00185 (
00186 KFCurve &pSourceCurve,
00187 KFCurve &pTargetCurve,
00188 KTime &pStart,
00189 KTime &pStop,
00190 KTime &pPeriod,
00191 bool pAddStopKey = false
00192 );
00193
00203 static void Resample
00204 (
00205 KFCurve &pCurve,
00206 KTime pPeriod,
00207 KTime pStart = KTIME_MINUS_INFINITE,
00208 KTime pStop = KTIME_INFINITE,
00209 bool pKeysOnFrame = false
00210 );
00211
00219 static void Merge(KFCurve &pCurveIn, KFCurve &pCurveMerge, KFCurve &pCurveOut);
00220
00226 static KTime FindTimeOffsetBefore(KFCurve pCurve, KTime& pTime);
00227
00233 static KTime FindTimeOffsetAfter(KFCurve pCurve, KTime& pTime);
00234
00239
00241 enum EError
00242 {
00243
00244 eNoKey,
00245 eMultiple,
00246
00247
00248 eMultipleKeyCount,
00249 eUnsyncedKeys,
00250
00251
00252 eLeftUnchanged,
00253
00254 eErrorCount
00255 };
00256
00258 static KError& GetError();
00259
00261 static EError GetLastErrorID();
00262
00264 static const char* GetLastErrorString();
00265
00267
00269
00270
00271
00272
00273
00274
00276
00277 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00278
00279 protected:
00280
00282 KFCurveUtils();
00283
00284 static KError smError;
00285
00286 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00287
00288 };
00289
00290 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00291
00292 #endif // FBXFILESDK_COMPONENTS_KFCURVE_KFCURVEUTILS_H
00293