#include<kfcurveutils.h>
This class groups methods allowing to test and convert aKFCurveinto anotherKFCurvedata set. Easier to use for some applications.
Definition at line65of filekfcurveutils.h.
Error Management | |
enum | EError |
Status codes.More... | |
staticKError& | GetError() |
Retrieve error object. | |
staticEError | GetLastErrorID() |
Get last error code. | |
static const char * | GetLastErrorString() |
Get last error code. | |
Public Types | |
enum | EInterpolationAndTangeant |
Enum useful for methodKFCurveUtils::GetInterpolationAndTangeantCount().More... | |
Static Public Member Functions | |
static bool | CompareCurve(KFCurve*pCurveA,KFCurve*pCurveB) |
Compare two curves. | |
static bool | GetGlobalInterpolation(kFCurveInterpolation&pGlobalInterpolation,KFCurve&pCurve) |
Check if all keys of a curve are of the same interpolation type. | |
static bool | GetGlobalTangeant(kFCurveTangeantMode&pGlobalTangent,KFCurve&pCurve) |
Check if all keys of a curve are of the same tangent mode. | |
static bool | GetInterpolationAndTangeantCount(KFCurve&pCurve, int pArray[eINTERPOLATION_AND_TANGEANT_COUNT]) |
Get the number of keys in each category of interpolation type and tangent mode. | |
staticKFCurveNode& | ConvertCurveInterpolationRecursive(kFCurveInterpolation pTargetGlobalInterpolation, kFCurveTangeantMode pTargetGlobalTangent,KFCurveNode&pCurveNode) |
Convert all curve keys contained in the currentKFCurveNodeand its children to the tangent mode and interpolation specified. | |
staticKFCurve& | ConvertCurve(KFCurve&pSourceCurve,KFCurve&pTargetCurve, kFCurveInterpolation pTargetGlobalInterpolation, kFCurveTangeantMode pTargetGlobalTangent,KTimepFramePeriod) |
Convert curve keys so they are of a single interpolation type and a single tangent mode. | |
static void | Resample(KFCurve&pSourceCurve,KFCurve&pTargetCurve,KTime&pStart,KTime&pStop,KTime&pPeriod, kFCurveInterpolation pInterpolation, kFCurveTangeantMode pTangentMode, bool pAddStopKey=false) |
Resample a curve. | |
static void | Resample(KFCurve&pSourceCurve,KFCurve&pTargetCurve,KTime&pStart,KTime&pStop,KTime&pPeriod, bool pAddStopKey=false) |
Resample a curve. | |
static void | Resample(KFCurve&pCurve,KTimepPeriod,KTimepStart=KTIME_MINUS_INFINITE,KTimepStop=KTIME_INFINITE, bool pKeysOnFrame=false) |
Resample a curve. | |
static void | Merge(KFCurve&pCurveIn,KFCurve&pCurveMerge,KFCurve&pCurveOut) |
MergepCurveIn andpCurveMerge intopCurveOut . | |
staticKTime | FindTimeOffsetBefore(KFCurvepCurve,KTime&pTime) |
Compute time difference between the first key of a curve and a given time. | |
staticKTime | FindTimeOffsetAfter(KFCurvepCurve,KTime&pTime) |
Compute time difference between the last key of a curve and a given time. |
Enum useful for methodKFCurveUtils::GetInterpolationAndTangeantCount().
Definition at line94of filekfcurveutils.h.
enumEError |
Status codes.
Definition at line228of filekfcurveutils.h.
Compare two curves.
true
if curves are equivalent.static bool GetGlobalInterpolation | ( | kFCurveInterpolation& | pGlobalInterpolation, | |
KFCurve& | pCurve | |||
) | [static] |
Check if all keys of a curve are of the same interpolation type.
pGlobalInterpolation | Receives interpolation type of all keys if function returnstrue , undetermined otherwise. | |
pCurve | Curve to scan. |
true
if there is at least one key and all keys are of the same interpolation type,false
otherwise.static bool GetGlobalTangeant | ( | kFCurveTangeantMode& | pGlobalTangent, | |
KFCurve& | pCurve | |||
) | [static] |
Check if all keys of a curve are of the same tangent mode.
pGlobalTangent | Receives tangent mode of all keys if function returnstrue , undetermined otherwise. | |
pCurve | Curve to scan. |
true
if there is at least one key and all keys are of the same interpolation type,false
otherwise.static bool GetInterpolationAndTangeantCount | ( | KFCurve& | pCurve, | |
int | pArray[eINTERPOLATION_AND_TANGEANT_COUNT] | |||
) | [static] |
Get the number of keys in each category of interpolation type and tangent mode.
staticKFCurveNode&ConvertCurveInterpolationRecursive | ( | kFCurveInterpolation | pTargetGlobalInterpolation, | |
kFCurveTangeantMode | pTargetGlobalTangent, | |||
KFCurveNode& | pCurveNode | |||
) | [static] |
Convert all curve keys contained in the currentKFCurveNodeand its children to the tangent mode and interpolation specified.
pTargetGlobalInterpolation | Interpolation type given to all keys. | |
pTargetGlobalTangent | Tangent mode given to all keys if interpolation type is cubic. | |
pCurveNode | Curve node to be modified. |
staticKFCurve&ConvertCurve | ( | KFCurve& | pSourceCurve, | |
KFCurve& | pTargetCurve, | |||
kFCurveInterpolation | pTargetGlobalInterpolation, | |||
kFCurveTangeantMode | pTargetGlobalTangent, | |||
KTime | pFramePeriod | |||
) | [static] |
Convert curve keys so they are of a single interpolation type and a single tangent mode.
As opposed to functionKFCurveUtils::ConvertCurve(), this function preserves the curve shape between the keys. Part of the curve is resampled if needed.
pSourceCurve | Source curve. | |
pTargetCurve | Curve to be modified. | |
pTargetGlobalInterpolation | Interpolation type given to all keys. | |
pTargetGlobalTangent | Tangent mode given to all keys if interpolation type is cubic. | |
pFramePeriod | Resampling period in segments to resample. |
static void Resample | ( | KFCurve& | pSourceCurve, | |
KFCurve& | pTargetCurve, | |||
KTime& | pStart, | |||
KTime& | pStop, | |||
KTime& | pPeriod, | |||
kFCurveInterpolation | pInterpolation, | |||
kFCurveTangeantMode | pTangentMode, | |||
bool | pAddStopKey=false | |||
) | [static] |
Resample a curve.
Interpolation type of each created curve key is set equal to parameterpInterpolation
. Tangent mode of each created curve key is set equal topTangentMode
.
pSourceCurve | Source curve. | |
pTargetCurve | Curve to be modified. | |
pStart | Start time of resampling. | |
pStop | Stop time of resampling. | |
pPeriod | Resampling period. | |
pInterpolation | Interpolation type given to all keys. | |
pTangentMode | Tangent mode given to all keys if interpolation type is cubic. | |
pAddStopKey | Set totrue to make sure a key is added exactly at time pStop. |
static void Resample | ( | KFCurve& | pSourceCurve, | |
KFCurve& | pTargetCurve, | |||
KTime& | pStart, | |||
KTime& | pStop, | |||
KTime& | pPeriod, | |||
bool | pAddStopKey=false | |||
) | [static] |
Resample a curve.
Interpolation type of each created curve key is set equal to the interpolation type of the closest curve key encountered. Tangent mode of each created curve key is set equal to the tangent mode of the closest curve key encountered.
pSourceCurve | Source curve. | |
pTargetCurve | Curve to be modified. | |
pStart | Start time of resampling. | |
pStop | Stop time of resampling. | |
pPeriod | Resampling period. | |
pAddStopKey | Set totrue to make sure a key is added exactly at time pStop. |
static void Resample | ( | KFCurve& | pCurve, | |
KTime | pPeriod, | |||
KTime | pStart=KTIME_MINUS_INFINITE , | |||
KTime | pStop=KTIME_INFINITE , | |||
bool | pKeysOnFrame=false | |||
) | [static] |
Resample a curve.
Interpolation type of each created curve key is set to KFCURVE_INTERPOLATION_CUBIC. Tangent mode of each created curve key is set to KFCURVE_TANGEANT_AUTO.
pCurve | Curve to be modified. | |
pPeriod | Resampling period. | |
pStart | Start time of resampling. Set to KTIME_MINUS_INFINITE for whole curve. | |
pStop | Stop time of resampling. Set to KTIME_INFINITE for whole curve. | |
pKeysOnFrame | Set totrue if keys are to be added on frames. |
MergepCurveIn
andpCurveMerge
intopCurveOut
.
CopypCurveIn
inpCurveOut
and then overwrite keys in the time span covered bypCurveMerge
.
pCurveIn | Source curve. | |
pCurveMerge | Curve containing keys to merge in source curve. | |
pCurveOut | Destination for source curve and keys to merge. |
Compute time difference between the first key of a curve and a given time.
Compute time difference between the last key of a curve and a given time.
staticKError&GetError | ( | ) | [static] |
Retrieve error object.
staticEErrorGetLastErrorID | ( | ) | [static] |
Get last error code.
static const char* GetLastErrorString | ( | ) | [static] |
Get last error code.