Public Member Functions | Protected Member Functions | Protected Attributes | Friends

KFbxAnimCurveKFCurve Class Reference

Search for all occurrences

Detailed Description

This class is an implementation for the FBX animation curves interface KFbxAnimCurve.

Remarks:
Users should not use this class directly, but always use KFbxAnimCurve. This class encapsulates the legacy KFCurve structure for backward compatibility.

Definition at line 406 of file kfbxanimcurvekfcurve.h.

#include <kfbxanimcurvekfcurve.h>

Inheritance diagram for KFbxAnimCurveKFCurve:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int  KeyAdd (KTime pTime, KFbxAnimCurveKFCurveKey &pKey, int *pLast=0)
virtual bool  KeySet (int pIndex, KFbxAnimCurveKFCurveKey &pKey)
virtual bool  Store (KFbx *pFileObject)
bool  LegacyStore (KFbx *pFileObject)
virtual bool  Retrieve (KFbx *pFileObject)

Protected Member Functions

  KFbxAnimCurveKFCurve (KFbxSdkManager &pManager, char const *pName)
virtual void  Construct (const KFbxAnimCurve *pFrom)
virtual void  Destruct (bool pRecursive, bool pDependents)
void  SetKFCurve (KFCurve *lKFCurve)

Protected Attributes

KFCurve mFCurve

Friends

void  CollectAnimFromCurveNode (KFCurve **lSrc, KFCurveNode *fcn, unsigned int nbCrvs, KFbxAnimCurveNode *cn, KSet *pNickToAnimCurveTimeWarpsSet, KSet &pNickToKFCurveNodeWarpSet)
void  TransferTimeWarp (int lNickNumber, KFCurveNode *lTimeWarp, KSet &mNickToKFCurveNodeTimeWarpsSet, KSet &pTimeWarpSet, KFbxScene &pScene)

Key management.

void  ResizeKeyBuffer (int pKeyCount)
  Resize animation curve buffer to hold a certain number of keys.
void  KeyModifyBegin ()
  Call this function prior to adding, removing or editing keys of an animation curve.
void  KeyModifyEnd ()
  Call this function after adding, removing or editing keys of an animation curve.
void  KeyShrink ()
  Minimize use of buffer memory.
virtual void  KeyClear ()
  Remove all the keys of the animation curve and free buffer memory.
virtual int  KeyGetCount () const
  Get the number of keys.
int  KeyAdd (KTime pTime, KFbxAnimCurveKeyBase &pKey, int *pLast=NULL)
  Add a given key at given time.
int  KeyAdd (KTime pTime, int *pLast=NULL)
  Add a key at given time.
bool  KeySet (int pIndex, KFbxAnimCurveKeyBase &pKey)
  Set (or replace) key at given index with given key.
bool  KeyRemove (int pIndex)
  Remove key at given index.
bool  KeyRemove (int pStartIndex, int pEndIndex)
  Remove all the keys in the given range.
int  KeyInsert (KTime pTime, int *pLast=NULL)
  Insert a key at given time.
double  KeyFind (KTime pTime, int *pLast=NULL)
  Find key index for a given time.
bool  KeyScaleValue (float pMultValue)
  Scale value of all keys.
bool  KeyScaleValueAndTangent (float pMultValue)
  Scale value and tangent of all keys.

Key Manipulation

void  KeySet (int pKeyIndex, KTime pTime, float pValue, KFbxAnimCurveDef::EInterpolationType pInterpolation=KFbxAnimCurveDef::eINTERPOLATION_CUBIC, KFbxAnimCurveDef::ETangentMode pTangentMode=KFbxAnimCurveDef::eTANGENT_AUTO, float pData0=0.0, float pData1=0.0, KFbxAnimCurveDef::EWeightedMode pTangentWeightMode=KFbxAnimCurveDef::eWEIGHTED_NONE, float pWeight0=KFbxAnimCurveDef::sDEFAULT_WEIGHT, float pWeight1=KFbxAnimCurveDef::sDEFAULT_WEIGHT, float pVelocity0=KFbxAnimCurveDef::sDEFAULT_VELOCITY, float pVelocity1=KFbxAnimCurveDef::sDEFAULT_VELOCITY)
  General function to set key properties.
void  KeySetTCB (int pKeyIndex, KTime pTime, float pValue, float pData0=0.0f, float pData1=0.0f, float pData2=0.0f)
  Set a key with cubic interpolation, TCB tangent mode.
KFbxAnimCurveDef::EInterpolationType  KeyGetInterpolation (int pKeyIndex) const
  Get key's interpolation type.
void  KeySetInterpolation (int pKeyIndex, KFbxAnimCurveDef::EInterpolationType pInterpolation)
  Set key's interpolation type.
KFbxAnimCurveDef::EConstantMode  KeyGetConstantMode (int pKeyIndex) const
  Get key's constant mode.
KFbxAnimCurveDef::ETangentMode  KeyGetTangentMode (int pKeyIndex, bool pIncludeOverrides=false) const
  Get key's tangent mode.
void  KeySetConstantMode (int pKeyIndex, KFbxAnimCurveDef::EConstantMode pMode)
  Set key's constant mode.
void  KeySetTangentMode (int pKeyIndex, KFbxAnimCurveDef::ETangentMode pTangent)
  Set key's tangent mode.
KFbxAnimCurveKey  KeyGet (int pIndex) const
  Get key at given index.
float  KeyGetValue (int pKeyIndex) const
  Get key value.
void  KeySetValue (int pKeyIndex, float pValue)
  Set key value.
void  KeyIncValue (int pKeyIndex, float pValue)
  Increment key value.
void  KeyMultValue (int pKeyIndex, float pValue)
  Multiply key value.
void  KeyMultTangent (int pKeyIndex, float pValue)
  Multiply key tangents.
virtual KTime  KeyGetTime (int pKeyIndex) const
  Get key time.
virtual void  KeySetTime (int pKeyIndex, KTime pTime)
  Set key time.
void  KeySetBreak (int pKeyIndex, bool pVal)
  Set or unset the tangent break.
bool  KeyGetBreak (int pKeyIndex) const
  Get if the tangent has a break.

Key Tangent Management

float  KeyGetLeftDerivative (int pIndex)
  Get the left derivative of a key.
void  KeySetLeftDerivative (int pIndex, float pValue)
  Set the left derivative of a key.
float  KeyGetLeftAuto (int pIndex, bool pApplyOvershootProtection=false)
  Get the left auto parametric of a key.
KFCurveTangeantInfo  KeyGetLeftDerivativeInfo (kFCurveIndex pIndex)
  Get the left derivative info (of type KFCurveTangeantInfo) of a key.
void  KeySetLeftDerivativeInfo (kFCurveIndex pIndex, KFCurveTangeantInfo pValue, bool pForceDerivative=false)
  Set the left derivative info (of type KFCurveTangeantInfo) of a key.
float  KeyGetRightDerivative (int pIndex)
  Get the right derivative of a key.
void  KeySetRightDerivative (int pIndex, float pValue)
  Set the right derivative of a key.
float  KeyGetRightAuto (int pIndex, bool pApplyOvershootProtection=false)
  Get the right auto parametric of a key.
KFCurveTangeantInfo  KeyGetRightDerivativeInfo (kFCurveIndex pIndex)
  Get the right derivative info (of type KFCurveTangeantInfo) of a key.
void  KeySetRightDerivativeInfo (kFCurveIndex pIndex, KFCurveTangeantInfo pValue, bool pForceDerivative=false)
  Set the right derivative info (of type KFCurveTangeantInfo) of a key.
bool  KeyIsLeftTangentWeighted (int pIndex) const
  Get the left tangent weight mode of a key.
bool  KeyIsRightTangentWeighted (int pIndex) const
  Get the right tangent weight mode of a key.
float  KeyGetLeftTangentWeight (int pIndex) const
  Get the weight value component of the left tangent of a key.
float  KeyGetRightTangentWeight (int pIndex) const
  Get the weight value component of the right tangent of a key.
void  KeySetLeftTangentWeight (int pIndex, float pWeight, bool pAdjustTan=false)
  Set the left tangent weight of a key.
void  KeySetRightTangentWeight (int pIndex, float pWeight, bool pAdjustTan=false)
  Set the right tangent weight of a key.
float  KeyGetLeftTangentVelocity (int pIndex) const
  Get the velocity value component of the left tangent of a key.
float  KeyGetRightTangentVelocity (int pIndex) const
  Get the velocity value component of the right tangent of a key.

Evaluation and Analysis

virtual float  Evaluate (KTime pTime, int *pLast=NULL)
  Evaluate animation curve value at a given time.
virtual float  EvaluateIndex (double pIndex)
  Evaluate animation curve value at a given key index.
float  EvaluateLeftDerivative (KTime pTime, int *pLast=NULL)
  Evaluate function left derivative at given time.
float  EvaluateRightDerivative (KTime pTime, int *pLast=NULL)
  Evaluate function right derivative at given time.

Utility functions.

float  GetValue () const
  Get the animation curve's default value.
virtual K_DEPRECATED bool  GetTimeInterval (KTime &pStart, KTime &pStop)
  Find out start and end time of the animation animation curve.
virtual bool  GetTimeInterval (KTimeSpan &pTimeInterval)
  Find out start and end time of the animation animation curve.
void  SetColor (float *pColor)
  Set the display color of the animation curve.
float *  GetColor ()
  Get the display color of the animation curve.
KFCurve GetKFCurve ()
  Returns the pointer to internal KFCurve.
void  CopyFrom (KFbxAnimCurve &pSource, bool pWithKeys=true)
  Copy animation curve content into current animation curve.

Constructor & Destructor Documentation

KFbxAnimCurveKFCurve ( KFbxSdkManager pManager,
char const *  pName 
) [protected]

Member Function Documentation

void ResizeKeyBuffer ( int  pKeyCount ) [virtual]

Resize animation curve buffer to hold a certain number of keys.

Parameters:
pKeyCount Number of keys the animation curve will eventually hold.

Implements KFbxAnimCurve.

void KeyModifyBegin ( ) [virtual]

Call this function prior to adding, removing or editing keys of an animation curve.

Call function KbxAnimCurveKFCurve::KeyModifyEnd() after modification.

Implements KFbxAnimCurve.

void KeyModifyEnd ( ) [virtual]

Call this function after adding, removing or editing keys of an animation curve.

Function KbxAnimCurveKFCurve::KeyModifyBegin() must have been called prior to modify the keys.

Implements KFbxAnimCurve.

void KeyShrink ( )

Minimize use of buffer memory.

Use this method after a lot of changes have been made to keys, on an animation curve with a lot of keys.

virtual void KeyClear ( ) [virtual]

Remove all the keys of the animation curve and free buffer memory.

Implements KFbxAnimCurve.

virtual int KeyGetCount ( ) const [virtual]

Get the number of keys.

Returns:
Key count.

Implements KFbxAnimCurve.

int KeyAdd ( KTime  pTime,
KFbxAnimCurveKeyBase pKey,
int *  pLast = NULL 
) [virtual]

Add a given key at given time.

The new key is appended after all the other animation curve's keys. Function KFbxAnimCurveKFCurve::KeyInsert() should be used instead if the key is to be added in the curve and not at the end. This function does not respect the interpolation type and tangents of the neighboring keys. If there is already a key at the given time, the key is modified and no new key is added.

Parameters:
pTime Time of the new key.
pKey Key to add.
pLast Index of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns:
Index of the key at given time, no matter if it was added or already present.
Remarks:
Key value, interpolation type and tangent mode must be set explicitly afterwards.

Implements KFbxAnimCurve.

int KeyAdd ( KTime  pTime,
int *  pLast = NULL 
) [inline, virtual]

Add a key at given time.

The new key is appended after all the other animation curve's keys. Function KFbxAnimCurveKFCurve::KeyInsert() should be used instead if the key is to be added in the curve and not at the end. This function does not respect of the interpolation type and tangents of the neighboring keys. If there is already a key a the given time, no key is added.

Parameters:
pTime Time of the new key.
pLast Index of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns:
Index of the key at given time, no matter if it was added or already present.
Remarks:
Key value, interpolation type and tangent mode must be set explicitly afterwards.

Implements KFbxAnimCurve.

Definition at line 475 of file kfbxanimcurvekfcurve.h.

        {   
            KFbxAnimCurveKFCurveKey key(pTime);
            return KeyAdd(pTime, key, pLast); 
        }
bool KeySet ( int  pIndex,
KFbxAnimCurveKeyBase pKey 
) [virtual]

Set (or replace) key at given index with given key.

Parameters:
pIndex Index of the key to be set or replaced.
pKey New key at this index.
Returns:
true if key time is superior to previous key time and inferior to next key time, false otherwise.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

bool KeyRemove ( int  pIndex ) [virtual]

Remove key at given index.

Other key indices are updated automatically.

Parameters:
pIndex Index of key to remove.
Returns:
true on success, false otherwise.

Implements KFbxAnimCurve.

bool KeyRemove ( int  pStartIndex,
int  pEndIndex 
) [virtual]

Remove all the keys in the given range.

Parameters:
pStartIndex Index of the first key to remove (inclusive).
pEndIndex Index of the last key to remove (inclusive).
Returns:
true on success, false otherwise.

Implements KFbxAnimCurve.

int KeyInsert ( KTime  pTime,
int *  pLast = NULL 
) [virtual]

Insert a key at given time.

This function should be used instead of KFbxAnimCurveKFCurve::KeyAdd() if the key is to be added in the curve and not at the end. It inserts the key in respect to the interpolation type and tangents of the neighboring keys. If there is already a key a the given time, the key is modified and no new key is added.

Parameters:
pTime Time of the new key.
pLast Index of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns:
Index of the key at given time, no matter if it was inserted or already present.
Remarks:
Key value must be set explicitly afterwards. The interpolation type and tangent mode are copied from the previous key.

Implements KFbxAnimCurve.

double KeyFind ( KTime  pTime,
int *  pLast = NULL 
) [virtual]

Find key index for a given time.

Parameters:
pTime Time of the key looked for.
pLast Index of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns:
Key index. The integer part of the key index gives the index of the closest key with a smaller time. The decimals give the relative position of given time compared to previous and next key times. Returns -1 if animation curve has no key.

For example (using seconds for clarity), if there is a key at time 10s with index 5, and a key at time 11s with index 6, KeyFind(10.3s) would return 5.3.

Implements KFbxAnimCurve.

bool KeyScaleValue ( float  pMultValue ) [virtual]

Scale value of all keys.

Parameters:
pMultValue Scale applied on key values.
Returns:
true on success, false otherwise.

Implements KFbxAnimCurve.

bool KeyScaleValueAndTangent ( float  pMultValue ) [virtual]

Scale value and tangent of all keys.

Parameters:
pMultValue Scale applied on key values and tangents.
Returns:
true on success, false otherwise.

Implements KFbxAnimCurve.

void KeySet ( int  pKeyIndex,
KTime  pTime,
float  pValue,
KFbxAnimCurveDef::EInterpolationType  pInterpolation = KFbxAnimCurveDef::eINTERPOLATION_CUBIC,
KFbxAnimCurveDef::ETangentMode  pTangentMode = KFbxAnimCurveDef::eTANGENT_AUTO,
float  pData0 = 0.0,
float  pData1 = 0.0,
KFbxAnimCurveDef::EWeightedMode  pTangentWeightMode = KFbxAnimCurveDef::eWEIGHTED_NONE,
float  pWeight0 = KFbxAnimCurveDef::sDEFAULT_WEIGHT,
float  pWeight1 = KFbxAnimCurveDef::sDEFAULT_WEIGHT,
float  pVelocity0 = KFbxAnimCurveDef::sDEFAULT_VELOCITY,
float  pVelocity1 = KFbxAnimCurveDef::sDEFAULT_VELOCITY 
) [virtual]

General function to set key properties.

The key at index pKeyIndex is retrieved and modified according to the other parameters. The key must have been previously created, for example using KeyAdd. Use KFbxAnimCurveKFCurve::SetTCB() in the specific case of setting a key with cubic interpolation and TCB tangent mode.

Parameters:
pKeyIndex Index of the key.
pTime Key time.
pValue Key value.
pInterpolation Key interpolation type.
pTangentMode Key tangent mode (meaningful for cubic interpolation only).
pData0 Value of right slope.
pData1 Value of next left slope.
pTangentWeightMode Weight mode, if used.
pWeight0 Weight for right slope, if tangent weight mode is eWEIGHTED_RIGHT or eWEIGHTED_ALL.
pWeight1 Weight for next left slope, if tangent weight mode is eWEIGHTED_NEXT_LEFT or eWEIGHTED_ALL.
pVelocity0 Velocity for right slope, if tangent velocity mode is eVELOCITY_RIGHT or eVELOCITY_ALL.
pVelocity1 Velocity for next left slope, if tangent velocity mode is eVELOCITY_NEXT_LEFT or eVELOCITY_ALL.

Implements KFbxAnimCurve.

void KeySetTCB ( int  pKeyIndex,
KTime  pTime,
float  pValue,
float  pData0 = 0.0f,
float  pData1 = 0.0f,
float  pData2 = 0.0f 
) [virtual]

Set a key with cubic interpolation, TCB tangent mode.

The key at index pKeyIndex is retrieved and modified according to the other parameters. The TCB mode controls the tension, continuity, and bias of the curve.

Parameters:
pKeyIndex Index of the key.
pTime Key time.
pValue Key value.
pData0 Tension. Controls the amount of curvature in the animation curve. The higher the tension is, the more linear the curve looks. When the tension is low, the curve looks rounder or wider.
pData1 Continuity. Controls the smoothness or singularity of the curve on the key.
pData2 Bias. Controls if the effect of tension and continuity affect the curve before or after the key.

Implements KFbxAnimCurve.

KFbxAnimCurveDef::EInterpolationType KeyGetInterpolation ( int  pKeyIndex ) const [virtual]

Get key's interpolation type.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Interpolation type of the queried key.

Implements KFbxAnimCurve.

void KeySetInterpolation ( int  pKeyIndex,
KFbxAnimCurveDef::EInterpolationType  pInterpolation 
) [virtual]

Set key's interpolation type.

Parameters:
pKeyIndex Index of the key.
pInterpolation Key interpolation type.

Implements KFbxAnimCurve.

KFbxAnimCurveDef::EConstantMode KeyGetConstantMode ( int  pKeyIndex ) const [virtual]

Get key's constant mode.

This method is only relevant if the key's interpolation type is constant (eINTERPOLATION_CONSTANT). Using this method on a key with an other interpolation type will return unpredictable value.

Parameters:
pKeyIndex Key index
Returns:
Key constant mode.

Implements KFbxAnimCurve.

KFbxAnimCurveDef::ETangentMode KeyGetTangentMode ( int  pKeyIndex,
bool  pIncludeOverrides = false 
) const [virtual]

Get key's tangent mode.

This method is meaningful for cubic interpolation only. Using this method for non cubic interpolated key will return unpredictable value.

Parameters:
pKeyIndex Index of the key.
pIncludeOverrides Include override flags: Break, Clamp, Time-Independent.
Returns:
Key tangent mode.

Implements KFbxAnimCurve.

void KeySetConstantMode ( int  pKeyIndex,
KFbxAnimCurveDef::EConstantMode  pMode 
) [virtual]

Set key's constant mode.

This method is meaningful for constant interpolation only.

Parameters:
pKeyIndex Key index
pMode Key constant mode.

Implements KFbxAnimCurve.

void KeySetTangentMode ( int  pKeyIndex,
KFbxAnimCurveDef::ETangentMode  pTangent 
) [virtual]

Set key's tangent mode.

This method is meaningful for cubic interpolation only.

Parameters:
pKeyIndex Index of the key.
pTangent Key tangent mode.

Implements KFbxAnimCurve.

KFbxAnimCurveKey KeyGet ( int  pIndex ) const [virtual]

Get key at given index.

Parameters:
pIndex Index of the key on the animation curve.
Returns:
The key at the given index.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

float KeyGetValue ( int  pKeyIndex ) const [virtual]

Get key value.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Key value.

Implements KFbxAnimCurve.

void KeySetValue ( int  pKeyIndex,
float  pValue 
) [virtual]

Set key value.

Parameters:
pKeyIndex Index of the key.
pValue The value to set.

Implements KFbxAnimCurve.

void KeyIncValue ( int  pKeyIndex,
float  pValue 
) [virtual]

Increment key value.

Parameters:
pKeyIndex Index of the key.
pValue Term added to the key value.

Implements KFbxAnimCurve.

void KeyMultValue ( int  pKeyIndex,
float  pValue 
) [virtual]

Multiply key value.

Parameters:
pKeyIndex Index of the key.
pValue Factor multiplying the key value.
See also:
KFbxAnimCurve::KeyMultTangent.

Implements KFbxAnimCurve.

void KeyMultTangent ( int  pKeyIndex,
float  pValue 
) [virtual]

Multiply key tangents.

Parameters:
pKeyIndex Index of the key.
pValue Factor multiplying the key tangents.
Remarks:
When multiplying a key value, tangents must be multiplied to conserve the same topology.

Implements KFbxAnimCurve.

virtual KTime KeyGetTime ( int  pKeyIndex ) const [virtual]

Get key time.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Key time (time at which this key is occurring).

Implements KFbxAnimCurve.

virtual void KeySetTime ( int  pKeyIndex,
KTime  pTime 
) [virtual]

Set key time.

Parameters:
pKeyIndex Index of the key.
pTime Key time (time at which this key is occurring).
Remarks:
The new key time might modify the key index.

Implements KFbxAnimCurve.

void KeySetBreak ( int  pKeyIndex,
bool  pVal 
) [virtual]

Set or unset the tangent break.

When this flag is set (KFbxAnimCurveDef::eTANGENT_BREAK), the key's left and right slopes are independent. When this flag is off, the key's left and right slope are equal. This method is relevant for User (KFbxAnimCurveDef::eTANGENT_USER) and Auto (KFbxAnimCurveDef::eTANGENT_AUTO) tangent modes only.

Parameters:
pKeyIndex Index of the key.
pVal Break flag (true or false).

Implements KFbxAnimCurve.

bool KeyGetBreak ( int  pKeyIndex ) const [virtual]

Get if the tangent has a break.

When this flag is set (KFbxAnimCurveDef::eTANGENT_BREAK), the key's left and right slopes are independent. When this flag is off, the key's left and right slope are equal. This method is relevant for User (KFbxAnimCurveDef::eTANGENT_USER) and Auto (KFbxAnimCurveDef::eTANGENT_AUTO) tangent modes only.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Break flag (true or false).

Implements KFbxAnimCurve.

float KeyGetLeftDerivative ( int  pIndex ) [virtual]

Get the left derivative of a key.

Parameters:
pIndex Index of key.
Returns:
Left derivative (Value over time (s)).
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

void KeySetLeftDerivative ( int  pIndex,
float  pValue 
) [virtual]

Set the left derivative of a key.

Parameters:
pIndex Index of key.
pValue Left derivative.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is eINTERPOLATION_CUBIC and tangent mode is KFbxAnimCurveDef::eTANGENT_USER, KFbxAnimCurveDef::eTANGENT_BREAK or KFbxAnimCurveDef::eTANGENT_AUTO.

Implements KFbxAnimCurve.

float KeyGetLeftAuto ( int  pIndex,
bool  pApplyOvershootProtection = false 
) [virtual]

Get the left auto parametric of a key.

This is used to compute the slope of Auto and User keys.

Parameters:
pIndex Index of the key.
pApplyOvershootProtection Clamp flag (eGENERIC_CLAMP) is taken into account.
Returns:
Left auto parametric.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

KFCurveTangeantInfo KeyGetLeftDerivativeInfo ( kFCurveIndex  pIndex ) [virtual]

Get the left derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
pIndex Index of the queried key.
Returns:
Left derivative info.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

void KeySetLeftDerivativeInfo ( kFCurveIndex  pIndex,
KFCurveTangeantInfo  pValue,
bool  pForceDerivative = false 
) [virtual]

Set the left derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
pIndex Index of the key.
pValue Left derivative info.
pForceDerivative If true, assign the tangent info's derivative value to the key derivative. If false, use the tangent info's auto parametric value to recompute the key derivative.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is eINTERPOLATION_CUBIC and tangent mode is KFbxAnimCurveDef::eTANGENT_USER or KFbxAnimCurveDef::eTANGENT_BREAK.

Implements KFbxAnimCurve.

float KeyGetRightDerivative ( int  pIndex ) [virtual]

Get the right derivative of a key.

Parameters:
pIndex Index of the key.
Returns:
Right derivative (Value over time (s)).
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

void KeySetRightDerivative ( int  pIndex,
float  pValue 
) [virtual]

Set the right derivative of a key.

Parameters:
pIndex Index of the key.
pValue Right derivative.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is eINTERPOLATION_CUBIC and tangent mode is KFbxAnimCurveDef::eTANGENT_USER, KFbxAnimCurveDef::eTANGENT_BREAK or KFbxAnimCurveDef::eTANGENT_AUTO.

Implements KFbxAnimCurve.

float KeyGetRightAuto ( int  pIndex,
bool  pApplyOvershootProtection = false 
) [virtual]

Get the right auto parametric of a key.

This is used to compute the slope of Auto and User keys.

Parameters:
pIndex Index of the key.
pApplyOvershootProtection Clamp flag (eGENERIC_CLAMP) is taken into account.
Returns:
Right auto parametric.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

KFCurveTangeantInfo KeyGetRightDerivativeInfo ( kFCurveIndex  pIndex ) [virtual]

Get the right derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
pIndex Index of the queried key.
Returns:
Right derivative info.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

void KeySetRightDerivativeInfo ( kFCurveIndex  pIndex,
KFCurveTangeantInfo  pValue,
bool  pForceDerivative = false 
) [virtual]

Set the right derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
pIndex Index of the key.
pValue Right derivative info.
pForceDerivative If true, assign the tangent info's derivative value to the key derivative. If false, use the tangent info's auto parametric value to recompute the key derivative.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is eINTERPOLATION_CUBIC and tangent mode is KFbxAnimCurveDef::eTANGENT_USER or KFbxAnimCurveDef::eTANGENT_BREAK.

Implements KFbxAnimCurve.

bool KeyIsLeftTangentWeighted ( int  pIndex ) const [virtual]

Get the left tangent weight mode of a key.

Parameters:
pIndex Index of queried key.
Returns:
true if the key is left weighted (Weight mode is eWEIGHT_WEIGHTED_RIGHT or eWEIGHTED_ALL). false otherwise.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

bool KeyIsRightTangentWeighted ( int  pIndex ) const [virtual]

Get the right tangent weight mode of a key.

Parameters:
pIndex Index of queried key.
Returns:
true if the key is right weighted (Weight mode is eWEIGHTED_RIGHT or eWEIGHTED_ALL). false otherwise.
Remarks:
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements KFbxAnimCurve.

float KeyGetLeftTangentWeight ( int  pIndex ) const [virtual]

Get the weight value component of the left tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Left tangent weight, or eDEFAULT_WEIGHT (0.333...) if left tangent is not weighted.
Remarks:
This function is only relevant if key interpolation type is eINTERPOLATION_CUBIC.

Implements KFbxAnimCurve.

float KeyGetRightTangentWeight ( int  pIndex ) const [virtual]

Get the weight value component of the right tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Right tangent weight, or eDEFAULT_WEIGHT (0.333...) if right tangent is not weighted.
Remarks:
This function is only relevant if key interpolation type is eINTERPOLATION_CUBIC.

Implements KFbxAnimCurve.

void KeySetLeftTangentWeight ( int  pIndex,
float  pWeight,
bool  pAdjustTan = false 
) [virtual]

Set the left tangent weight of a key.

Parameters:
pIndex Index of the key.
pWeight Weight to set on the left tangent.
pAdjustTan If true, recompute the tangent height to compensate for very small weights.
Remarks:
This function is only relevant if previous key interpolation type is eINTERPOLATION_CUBIC and tangent mode is KFbxAnimCurveDef::eTANGENT_USER or KFbxAnimCurveDef::eTANGENT_BREAK. The tangent is automatically set in weighted mode. The pAdjustTan option will only produce correct results provided that the tangent has already been set before calling this function.

Implements KFbxAnimCurve.

void KeySetRightTangentWeight ( int  pIndex,
float  pWeight,
bool  pAdjustTan = false 
) [virtual]

Set the right tangent weight of a key.

Parameters:
pIndex Index of the key.
pWeight Weight to set on the right tangent.
pAdjustTan If true, recompute the tangent height to compensate for very small weights.
Remarks:
This function is only relevant if key interpolation type is eINTERPOLATION_CUBIC and tangent mode is KFbxAnimCurveDef::eTANGENT_USER or KFbxAnimCurveDef::eTANGENT_BREAK. The tangent is automatically set in weighted mode. The pAdjustTan option will only produce correct results provided that the tangent has already been set before calling this function.

Implements KFbxAnimCurve.

float KeyGetLeftTangentVelocity ( int  pIndex ) const [virtual]

Get the velocity value component of the left tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Tangent velocity of the left tangent. This function is only relevant if key interpolation type is eINTERPOLATION_CUBIC.

Implements KFbxAnimCurve.

float KeyGetRightTangentVelocity ( int  pIndex ) const [virtual]

Get the velocity value component of the right tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Tangent velocity of the right tangent. This function is only relevant if key interpolation type is eINTERPOLATION_CUBIC.

Implements KFbxAnimCurve.

virtual float Evaluate ( KTime  pTime,
int *  pLast = NULL 
) [virtual]

Evaluate animation curve value at a given time.

Parameters:
pTime Time of evaluation. If time falls between two keys, animation curve value is interpolated according to previous key interpolation type and tangent mode if relevant.
pLast Index of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns:
Animation curve value on given time, or animation curve's default value if animation curve has no key.
Remarks:
This function takes extrapolation into account.

Implements KFbxAnimCurve.

virtual float EvaluateIndex ( double  pIndex ) [virtual]

Evaluate animation curve value at a given key index.

Parameters:
pIndex Any value between 0 and KFbxAnimCurve::KeyGetCount() - 1. If key index is not an integer value, animation curve value is interpolated according to previous key interpolation type and tangent mode, if relevant. This function does not take extrapolation into account.
Returns:
Animation curve value, or default value if animation curve has no key.
Remarks:
Result is undetermined if index is out of bounds.

Implements KFbxAnimCurve.

float EvaluateLeftDerivative ( KTime  pTime,
int *  pLast = NULL 
) [virtual]

Evaluate function left derivative at given time.

Parameters:
pTime Time of evaluation.
pLast Index of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns:
Left derivative at given time.
Remarks:
This function does not take extrapolation into account. Result is undetermined if index is out of bounds.

Implements KFbxAnimCurve.

float EvaluateRightDerivative ( KTime  pTime,
int *  pLast = NULL 
) [virtual]

Evaluate function right derivative at given time.

Parameters:
pTime Time of evaluation.
pLast Index of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns:
Right derivative at given time.
Remarks:
This function does not take extrapolation into account. Result is undetermined if index is out of bounds.

Implements KFbxAnimCurve.

float GetValue ( ) const

Get the animation curve's default value.

Default value is the value that will be used when there is no key in the animation curve.

Returns:
Default value of the animation curve.
virtual K_DEPRECATED bool GetTimeInterval ( KTime pStart,
KTime pStop 
) [virtual]

Find out start and end time of the animation animation curve.

This function retrieves the animation curve's time span.

Parameters:
pStart Reference to receive start time.
pStop Reference to receive end time.
Returns:
true on success, false otherwise.
Remarks:
This function is deprecated, please use GetTimeInterval(KTimeSpan&) instead.

Implements KFbxAnimCurve.

virtual bool GetTimeInterval ( KTimeSpan pTimeInterval ) [virtual]

Find out start and end time of the animation animation curve.

This function retrieves the animation curve's time span.

Parameters:
pTimeInterval Reference to receive start time and end time.
Returns:
true on success, false otherwise.

Implements KFbxAnimCurve.

void SetColor ( float *  pColor )

Set the display color of the animation curve.

Parameters:
pColor The desired color (3 values 0 to 1).
float* GetColor ( )

Get the display color of the animation curve.

Returns:
Array of 3 floats (color) or NULL.
KFCurve* GetKFCurve ( ) [virtual]

Returns the pointer to internal KFCurve.

Returns:
Pointer to KFCurve.

Implements KFbxAnimCurve.

void CopyFrom ( KFbxAnimCurve pSource,
bool  pWithKeys = true 
) [virtual]

Copy animation curve content into current animation curve.

Parameters:
pSource Animation curve to be copied (which will not be modified).
pWithKeys If true, clear keys in current animation curve and copy keys from source animation curve. If false, keys in current animation curve are left as is.

Implements KFbxAnimCurve.

virtual int KeyAdd ( KTime  pTime,
KFbxAnimCurveKFCurveKey pKey,
int *  pLast = 0 
) [virtual]
virtual bool KeySet ( int  pIndex,
KFbxAnimCurveKFCurveKey pKey 
) [virtual]
virtual void Construct ( const KFbxAnimCurve pFrom ) [protected, virtual]
virtual void Destruct ( bool  pRecursive,
bool  pDependents 
) [protected, virtual]
void SetKFCurve ( KFCurve lKFCurve ) [protected]
virtual bool Store ( KFbx pFileObject ) [virtual]
bool LegacyStore ( KFbx pFileObject )
virtual bool Retrieve ( KFbx pFileObject ) [virtual]

Friends And Related Function Documentation

void CollectAnimFromCurveNode ( KFCurve **  lSrc,
KFCurveNode fcn,
unsigned int  nbCrvs,
KFbxAnimCurveNode cn,
KSet pNickToAnimCurveTimeWarpsSet,
KSet pNickToKFCurveNodeWarpSet 
) [friend]
void TransferTimeWarp ( int  lNickNumber,
KFCurveNode lTimeWarp,
KSet mNickToKFCurveNodeTimeWarpsSet,
KSet pTimeWarpSet,
KFbxScene pScene 
) [friend]

Member Data Documentation

KFCurve* mFCurve [protected]

The documentation for this class was generated from the following file:

KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve
KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve KFbxAnimCurveKFCurve