Public Member Functions | Protected Member Functions

KFbxAnimCurve Class Reference

This reference page is linked to from the following overview topics: FBX SDK 2012, FBX SDK 2011, Supported Scene Elements, Animation data structures, Migrating to the new data structures for animation, Animation classes and their interrelationships, List of Python FBX classes.


Search for all occurrences

Detailed Description

An animation curve, defined by a collection of keys (KFbxAnimCurveKey), and indicating how a value changes over time.

Since an animation curve is a function, on a given animation curve, only one key per time is allowed. The keys are sorted in time order. They can be accessed by their index on the curve, from 0 to KFbxAnimCurve::KeyGetCount-1. The time unit in FBX (KTime) is 1/46186158000 of one second.

Each key defines tangents and interpolation that modify the animation curve. Tangents control the way the animation curve enters and exits the keys. Interpolation indicates the animation curve's behavior between keys.

Interpolation modes are

Tangent modes are

Tangent modes can be overridden by more tangent options:

Tangent can be modified some more by adding weights and velocity. By default, the weights are 0.333 on either side of the key, and there is no velocity. Velocity settings speed up or slow down animation on either side of a key without changing the trajectory of the animation. Unlike Auto and Weight settings, Velocity changes the animation in time, but not in space.

Remarks:
KFbxAnimCurve is now the main animation animation curve object of the SDK. Users should always use this class to handle animation curve. This class, for the time being, encapsulates the legacy KFCurve structure. However, its implementation is subject to change.
Note:
When adding keys to an animation curve, use KFbxAnimCurve::KeyModifyBegin and KFbxAnimCurve::KeyModifyEnd. please refer to the following sample code:
 KTime lTime;
 int lKeyIndex = 0;

 // Create curve
 KFbxAnimCurve* lAnimCurve = KFbxAnimCurve::Create(pScene, "Cube Animation");

 // Add keys to the curve
 lAnimCurve->KeyModifyBegin();

 // First key: time 0, value 0
 lTime.SetSecondDouble(0.0);
 lKeyIndex = lAnimCurve->KeyAdd(lTime);
 lAnimCurve->KeySet(lKeyIndex, lTime, 0.0, KFbxAnimCurveDef::eINTERPOLATION_LINEAR);

 // Second key: time 20s, value -3600
 // Since this curve will describe rotation, each cube will rotate 10 times around itself during 20 seconds.
 lTime.SetSecondDouble(20.0);
 lKeyIndex = lAnimCurve->KeyAdd(lTime);
 lAnimCurve->KeySet(lKeyIndex, lTime, -3600, KFbxAnimCurveDef::eINTERPOLATION_LINEAR);

 // Done adding keys.
 lAnimCurve->KeyModifyEnd();
Examples:

Animation/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayAnimation.cxx, Instances/main.cxx, Pivot/main.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, UserProperties/main.cxx, ViewScene/DrawScene.cxx, and ViewScene/SetCamera.cxx.

Definition at line 800 of file kfbxanimcurve.h.

#include <kfbxanimcurve.h>

Inheritance diagram for KFbxAnimCurve:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool  Store (KFbx *pFileObject)=0
virtual bool  Retrieve (KFbx *pFileObject)=0

Protected Member Functions

  KFbxAnimCurve (KFbxSdkManager &pManager, char const *pName)
virtual void  Construct (const KFbxAnimCurveBase *pFrom)
virtual void  Destruct (bool pRecursive, bool pDependents)

Animation curve creation.

static KFbxAnimCurve Create (KFbxScene *pContainer, char const *pName)
  Create a KFbxAnimCurve.

Key management.

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

Key Manipulation

virtual 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)=0
  General function to set key properties.
virtual void  KeySetTCB (int pKeyIndex, KTime pTime, float pValue, float pData0=0.0f, float pData1=0.0f, float pData2=0.0f)=0
  Set a key with cubic interpolation, TCB tangent mode.
virtual
KFbxAnimCurveDef::EInterpolationType 
KeyGetInterpolation (int pKeyIndex) const =0
  Get key's interpolation type.
virtual void  KeySetInterpolation (int pKeyIndex, KFbxAnimCurveDef::EInterpolationType pInterpolation)=0
  Set key's interpolation type.
virtual
KFbxAnimCurveDef::EConstantMode 
KeyGetConstantMode (int pKeyIndex) const =0
  Get key's constant mode.
virtual
KFbxAnimCurveDef::ETangentMode 
KeyGetTangentMode (int pKeyIndex, bool pIncludeOverrides=false) const =0
  Get key's tangent mode.
virtual void  KeySetConstantMode (int pKeyIndex, KFbxAnimCurveDef::EConstantMode pMode)=0
  Set key's constant mode.
virtual void  KeySetTangentMode (int pKeyIndex, KFbxAnimCurveDef::ETangentMode pTangent)=0
  Set key's tangent mode.
virtual KFbxAnimCurveKey  KeyGet (int pIndex) const =0
  Get key at given index.
virtual float  KeyGetValue (int pKeyIndex) const =0
  Get key value.
virtual void  KeySetValue (int pKeyIndex, float pValue)=0
  Set key value.
virtual void  KeyIncValue (int pKeyIndex, float pValue)=0
  Increment key value.
virtual void  KeyMultValue (int pKeyIndex, float pValue)=0
  Multiply key value.
virtual void  KeyMultTangent (int pKeyIndex, float pValue)=0
  Multiply key tangents.
virtual KTime  KeyGetTime (int pKeyIndex) const =0
  Get key time.
virtual void  KeySetTime (int pKeyIndex, KTime pTime)=0
  Set key time.
virtual void  KeySetBreak (int pKeyIndex, bool pVal)=0
  Set or unset the tangent break.
virtual bool  KeyGetBreak (int pKeyIndex) const =0
  Get if the tangent has a break.

Key Tangent Management

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

Evaluation and Analysis

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

Utility functions.

virtual bool  GetTimeInterval (KTime &pStart, KTime &pStop)=0
  Find out start and end time of the animation animation curve.
virtual bool  GetTimeInterval (KTimeSpan &pTimeInterval)=0
  Find out start and end time of the animation animation curve.
virtual KFCurve GetKFCurve ()=0
  Get the pointer to KFCurve.
virtual void  CopyFrom (KFbxAnimCurve &pSource, bool pWithKeys=true)=0
  Copy animation curve content into current animation curve.

Constructor & Destructor Documentation

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

Member Function Documentation

static KFbxAnimCurve* Create ( KFbxScene pContainer,
char const *  pName 
) [static]

Create a KFbxAnimCurve.

Parameters:
pContainer Scene to which the created animation curve belongs.
pName Name of the animation curve.
Returns:
Newly created animation curve
Examples:
Animation/main.cxx, and Instances/main.cxx.
virtual void ResizeKeyBuffer ( int  pKeyCount ) [pure virtual]

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

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

Implemented in KFbxAnimCurveKFCurve.

Examples:
UserProperties/main.cxx.
virtual void KeyModifyBegin ( ) [pure virtual]
virtual void KeyModifyEnd ( ) [pure virtual]

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

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

Implemented in KFbxAnimCurveKFCurve.

Examples:
ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, Instances/main.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, and UserProperties/main.cxx.
virtual void KeyClear ( ) [pure virtual]

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

Implements KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

virtual int KeyGetCount ( ) const [pure virtual]

Get the number of keys.

Returns:
Key count.

Implements KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

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

Add a given key at given time.

The new key is appended after all the other animation curve's keys. Function KFbxAnimCurve::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 KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

Examples:
Animation/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, Instances/main.cxx, Pivot/main.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, and UserProperties/main.cxx.
virtual int KeyAdd ( KTime  pTime,
int *  pLast = NULL 
) [pure virtual]

Add a key at given time.

The new key is appended after all the other animation curve's keys. Function KFbxAnimCurve::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.

Implemented in KFbxAnimCurveKFCurve.

virtual bool KeySet ( int  pIndex,
KFbxAnimCurveKeyBase pKey 
) [pure 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 KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

Examples:
ExportScene04/main.cxx, Instances/main.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, and UserProperties/main.cxx.
virtual bool KeyRemove ( int  pIndex ) [pure 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 KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

virtual bool KeyRemove ( int  pStartIndex,
int  pEndIndex 
) [pure 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.

Implements KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

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

Insert a key at given time.

This function should be used instead of KFbxAnimCurve::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.

Implemented in KFbxAnimCurveKFCurve.

virtual double KeyFind ( KTime  pTime,
int *  pLast = NULL 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual bool KeyScaleValue ( float  pMultValue ) [pure virtual]

Scale value of all keys.

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

Implemented in KFbxAnimCurveKFCurve.

virtual bool KeyScaleValueAndTangent ( float  pMultValue ) [pure virtual]

Scale value and tangent of all keys.

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

Implemented in KFbxAnimCurveKFCurve.

virtual 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 
) [pure 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 KFbxAnimCurve::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.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetTCB ( int  pKeyIndex,
KTime  pTime,
float  pValue,
float  pData0 = 0.0f,
float  pData1 = 0.0f,
float  pData2 = 0.0f 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

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

Get key's interpolation type.

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

Implemented in KFbxAnimCurveKFCurve.

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

Set key's interpolation type.

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

Implemented in KFbxAnimCurveKFCurve.

Examples:
ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, and ExportScene04/main.cxx.
virtual KFbxAnimCurveDef::EConstantMode KeyGetConstantMode ( int  pKeyIndex ) const [pure virtual]

Get key's constant mode.

Note:
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 Index of the queried key.
Returns:
Key constant mode.

Implemented in KFbxAnimCurveKFCurve.

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

Get key's tangent mode.

Parameters:
pKeyIndex Index of the key.
pIncludeOverrides Include override flags: Break, Clamp, Time-Independent. This method is meaningful for cubic interpolation only. Using this method for non cubic interpolated key will return unpredictable value.
Returns:
Key tangent mode.

Implemented in KFbxAnimCurveKFCurve.

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

Set key's constant mode.

This method is meaningful for constant interpolation only.

Parameters:
pKeyIndex Index of the key.
pMode Key constant mode.

Implemented in KFbxAnimCurveKFCurve.

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

Set key's tangent mode.

This method is meaningful for cubic interpolation only.

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

Implemented in KFbxAnimCurveKFCurve.

virtual KFbxAnimCurveKey KeyGet ( int  pIndex ) const [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetValue ( int  pKeyIndex ) const [pure virtual]

Get key value.

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

Implemented in KFbxAnimCurveKFCurve.

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

Set key value.

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

Implemented in KFbxAnimCurveKFCurve.

Examples:
ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, and ExportScene04/main.cxx.
virtual void KeyIncValue ( int  pKeyIndex,
float  pValue 
) [pure virtual]

Increment key value.

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

Implemented in KFbxAnimCurveKFCurve.

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

Multiply key value.

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

Implemented in KFbxAnimCurveKFCurve.

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

Multiply key tangents.

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

Implemented in KFbxAnimCurveKFCurve.

virtual KTime KeyGetTime ( int  pKeyIndex ) const [pure virtual]

Get key time.

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

Reimplemented from KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetTime ( int  pKeyIndex,
KTime  pTime 
) [pure 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 KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetBreak ( int  pKeyIndex,
bool  pVal 
) [pure 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).

Implemented in KFbxAnimCurveKFCurve.

virtual bool KeyGetBreak ( int  pKeyIndex ) const [pure 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).

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetLeftDerivative ( int  pIndex ) [pure virtual]

Get the left derivative of a key.

Parameters:
pIndex Index of the queried 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.

Implemented in KFbxAnimCurveKFCurve.

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

Set the left derivative of a key.

Parameters:
pIndex Index of the 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetLeftAuto ( int  pIndex,
bool  pApplyOvershootProtection = false 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual KFCurveTangeantInfo KeyGetLeftDerivativeInfo ( int  pIndex ) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetLeftDerivativeInfo ( kFCurveIndex  pIndex,
KFCurveTangeantInfo  pValue,
bool  pForceDerivative = false 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetRightDerivative ( int  pIndex ) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetRightDerivative ( int  pIndex,
float  pValue 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetRightAuto ( int  pIndex,
bool  pApplyOvershootProtection = false 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual KFCurveTangeantInfo KeyGetRightDerivativeInfo ( int  pIndex ) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetRightDerivativeInfo ( kFCurveIndex  pIndex,
KFCurveTangeantInfo  pValue,
bool  pForceDerivative = false 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual bool KeyIsLeftTangentWeighted ( int  pIndex ) const [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual bool KeyIsRightTangentWeighted ( int  pIndex ) const [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetLeftTangentWeight ( int  pIndex ) const [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetRightTangentWeight ( int  pIndex ) const [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetLeftTangentWeight ( int  pIndex,
float  pWeight,
bool  pAdjustTan = false 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual void KeySetRightTangentWeight ( int  pIndex,
float  pWeight,
bool  pAdjustTan = false 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetLeftTangentVelocity ( int  pIndex ) const [pure 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.
Remarks:
This function is only relevant if key interpolation type is eINTERPOLATION_CUBIC

Implemented in KFbxAnimCurveKFCurve.

virtual float KeyGetRightTangentVelocity ( int  pIndex ) const [pure 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.
Remarks:
This function is only relevant if key interpolation type is eINTERPOLATION_CUBIC

Implemented in KFbxAnimCurveKFCurve.

virtual float Evaluate ( KTime  pTime,
int *  pLast = NULL 
) [pure 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 KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

Examples:
ViewScene/DrawScene.cxx, and ViewScene/SetCamera.cxx.
virtual float EvaluateIndex ( double  pIndex ) [pure virtual]

Evaluate animation curve value at a given key index.

Parameters:
pIndex Any value from 0 to KFbxAnimCurve::KeyGetCount() - 1.
Returns:
Animation curve value, or default value if animation curve has no key.
Remarks:
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. Result is undetermined if index is out of bounds.

Implements KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

virtual float EvaluateLeftDerivative ( KTime  pTime,
int *  pLast = NULL 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual float EvaluateRightDerivative ( KTime  pTime,
int *  pLast = NULL 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual bool GetTimeInterval ( KTime pStart,
KTime pStop 
) [pure 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.

Reimplemented from KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

virtual bool GetTimeInterval ( KTimeSpan pTimeInterval ) [pure 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 and end time.
Returns:
true on success, false otherwise.

Reimplemented from KFbxAnimCurveBase.

Implemented in KFbxAnimCurveKFCurve.

virtual KFCurve* GetKFCurve ( ) [pure virtual]

Get the pointer to KFCurve.

Returns:
Pointer to (internal) KFCurve.
Remarks:
Subject to be deprecated (2010)

Implemented in KFbxAnimCurveKFCurve.

Examples:
ImportScene/DisplayAnimation.cxx, and ViewScene/SetCamera.cxx.
virtual void CopyFrom ( KFbxAnimCurve pSource,
bool  pWithKeys = true 
) [pure 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.

Implemented in KFbxAnimCurveKFCurve.

virtual bool Store ( KFbx pFileObject ) [pure virtual]
virtual bool Retrieve ( KFbx pFileObject ) [pure virtual]
virtual void Construct ( const KFbxAnimCurveBase pFrom ) [protected, virtual]
virtual void Destruct ( bool  pRecursive,
bool  pDependents 
) [protected, virtual]

Reimplemented from KFbxObject.

Reimplemented in KFbxAnimCurveKFCurve.


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

KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve
KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve KFbxAnimCurve