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.
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.
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();
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>
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. |
KFbxAnimCurve | ( | KFbxSdkManager & | pManager, |
char const * | pName | ||
) | [protected] |
static KFbxAnimCurve* Create | ( | KFbxScene * | pContainer, |
char const * | pName | ||
) | [static] |
Create a KFbxAnimCurve.
pContainer | Scene to which the created animation curve belongs. |
pName | Name of the animation curve. |
virtual void ResizeKeyBuffer | ( | int | pKeyCount | ) | [pure virtual] |
Resize animation curve buffer to hold a certain number of keys.
pKeyCount | Number of keys the animation curve will eventually hold. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeyModifyBegin | ( | ) | [pure virtual] |
Call this function prior to adding, removing or editing keys of an animation curve.
Call function KFbxAnimCurve::KeyModifyEnd() after modification.
Implemented in KFbxAnimCurveKFCurve.
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.
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.
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.
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. |
Implements KFbxAnimCurveBase.
Implemented in KFbxAnimCurveKFCurve.
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.
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. |
Implemented in KFbxAnimCurveKFCurve.
virtual bool KeySet | ( | int | pIndex, |
KFbxAnimCurveKeyBase & | pKey | ||
) | [pure virtual] |
Set (or replace) key at given index with given key.
pIndex | Index of the key to be set or replaced. |
pKey | New key at this index. |
true
if key time is superior to previous key time
and inferior to next key time, false
otherwise.Implements KFbxAnimCurveBase.
Implemented in KFbxAnimCurveKFCurve.
virtual bool KeyRemove | ( | int | pIndex | ) | [pure virtual] |
Remove key at given index.
Other key indices are updated automatically.
pIndex | Index of key to remove. |
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.
pStartIndex | Index of the first key to remove (inclusive). |
pEndIndex | Index of the last key to remove (inclusive). |
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.
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. |
Implemented in KFbxAnimCurveKFCurve.
virtual double KeyFind | ( | KTime | pTime, |
int * | pLast = NULL |
||
) | [pure virtual] |
Find key index for a given time.
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. |
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.
pMultValue | Scale applied on key values. |
true
on success, false
otherwise.Implemented in KFbxAnimCurveKFCurve.
virtual bool KeyScaleValueAndTangent | ( | float | pMultValue | ) | [pure virtual] |
Scale value and tangent of all keys.
pMultValue | Scale applied on key values and tangents. |
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.
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.
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.
pKeyIndex | Index of the queried key. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeySetInterpolation | ( | int | pKeyIndex, |
KFbxAnimCurveDef::EInterpolationType | pInterpolation | ||
) | [pure virtual] |
Set key's interpolation type.
pKeyIndex | Index of the key. |
pInterpolation | Key interpolation type. |
Implemented in KFbxAnimCurveKFCurve.
virtual KFbxAnimCurveDef::EConstantMode KeyGetConstantMode | ( | int | pKeyIndex | ) | const [pure virtual] |
Get key's constant mode.
pKeyIndex | Index of the queried key. |
Implemented in KFbxAnimCurveKFCurve.
virtual KFbxAnimCurveDef::ETangentMode KeyGetTangentMode | ( | int | pKeyIndex, |
bool | pIncludeOverrides =
false |
||
) | const [pure virtual] |
Get key's tangent mode.
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. |
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.
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.
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.
pIndex | Index of the key on the animation curve. |
Implemented in KFbxAnimCurveKFCurve.
virtual float KeyGetValue | ( | int | pKeyIndex | ) | const [pure virtual] |
Get key value.
pKeyIndex | Index of the queried key. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeySetValue | ( | int | pKeyIndex, |
float | pValue | ||
) | [pure virtual] |
Set key value.
pKeyIndex | Index of the key. |
pValue | The value to set. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeyIncValue | ( | int | pKeyIndex, |
float | pValue | ||
) | [pure virtual] |
Increment key value.
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.
pKeyIndex | Index of the key. |
pValue | Factor multiplying the key value. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeyMultTangent | ( | int | pKeyIndex, |
float | pValue | ||
) | [pure virtual] |
Multiply key tangents.
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.
pKeyIndex | Index of the queried key. |
Reimplemented from KFbxAnimCurveBase.
Implemented in KFbxAnimCurveKFCurve.
virtual void KeySetTime | ( | int | pKeyIndex, |
KTime | pTime | ||
) | [pure virtual] |
Set key time.
pKeyIndex | Index of the key. |
pTime | Key time (time at which this key is occurring). |
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.
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.
pKeyIndex | Index of the queried key. |
true
or false
).Implemented in KFbxAnimCurveKFCurve.
virtual float KeyGetLeftDerivative | ( | int | pIndex | ) | [pure virtual] |
Get the left derivative of a key.
pIndex | Index of the queried key. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeySetLeftDerivative | ( | int | pIndex, |
float | pValue | ||
) | [pure virtual] |
Set the left derivative of a key.
pIndex | Index of the key. |
pValue | Left derivative. |
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.
pIndex | Index of the key. |
pApplyOvershootProtection | Clamp flag (eGENERIC_CLAMP) is taken into account. |
Implemented in KFbxAnimCurveKFCurve.
virtual KFCurveTangeantInfo KeyGetLeftDerivativeInfo | ( | int | pIndex | ) | [pure virtual] |
Get the left derivative info (of type KFCurveTangeantInfo) of a key.
pIndex | Index of the queried key. |
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.
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. |
Implemented in KFbxAnimCurveKFCurve.
virtual float KeyGetRightDerivative | ( | int | pIndex | ) | [pure virtual] |
Get the right derivative of a key.
pIndex | Index of the key. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeySetRightDerivative | ( | int | pIndex, |
float | pValue | ||
) | [pure virtual] |
Set the right derivative of a key.
pIndex | Index of the key. |
pValue | Right derivative. |
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.
pIndex | Index of the key. |
pApplyOvershootProtection | Clamp flag (eGENERIC_CLAMP) is taken into account. |
Implemented in KFbxAnimCurveKFCurve.
virtual KFCurveTangeantInfo KeyGetRightDerivativeInfo | ( | int | pIndex | ) | [pure virtual] |
Get the right derivative info (of type KFCurveTangeantInfo) of a key.
pIndex | Index of the queried key. |
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.
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. |
Implemented in KFbxAnimCurveKFCurve.
virtual bool KeyIsLeftTangentWeighted | ( | int | pIndex | ) | const [pure virtual] |
Get the left tangent weight mode of a key.
pIndex | Index of queried key. |
true
if the key is left weighted (Weight mode is
eWEIGHT_WEIGHTED_RIGHT or eWEIGHTED_ALL). false
otherwise.Implemented in KFbxAnimCurveKFCurve.
virtual bool KeyIsRightTangentWeighted | ( | int | pIndex | ) | const [pure virtual] |
Get the right tangent weight mode of a key.
pIndex | Index of queried key. |
true
if the key is right weighted (Weight mode is
eWEIGHTED_RIGHT or eWEIGHTED_ALL). false
otherwise.Implemented in KFbxAnimCurveKFCurve.
virtual float KeyGetLeftTangentWeight | ( | int | pIndex | ) | const [pure virtual] |
Get the weight value component of the left tangent of a key.
pIndex | Index of the key. |
Implemented in KFbxAnimCurveKFCurve.
virtual float KeyGetRightTangentWeight | ( | int | pIndex | ) | const [pure virtual] |
Get the weight value component of the right tangent of a key.
pIndex | Index of the key. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeySetLeftTangentWeight | ( | int | pIndex, |
float | pWeight, | ||
bool | pAdjustTan =
false |
||
) | [pure virtual] |
Set the left tangent weight of a key.
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. |
Implemented in KFbxAnimCurveKFCurve.
virtual void KeySetRightTangentWeight | ( | int | pIndex, |
float | pWeight, | ||
bool | pAdjustTan =
false |
||
) | [pure virtual] |
Set the right tangent weight of a key.
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. |
Implemented in KFbxAnimCurveKFCurve.
virtual float KeyGetLeftTangentVelocity | ( | int | pIndex | ) | const [pure virtual] |
Get the velocity value component of the left tangent of a key.
pIndex | Index of the key. |
Implemented in KFbxAnimCurveKFCurve.
virtual float KeyGetRightTangentVelocity | ( | int | pIndex | ) | const [pure virtual] |
Get the velocity value component of the right tangent of a key.
pIndex | Index of the key. |
Implemented in KFbxAnimCurveKFCurve.
virtual float Evaluate | ( | KTime | pTime, |
int * | pLast = NULL |
||
) | [pure virtual] |
Evaluate animation curve value at a given time.
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. |
Implements KFbxAnimCurveBase.
Implemented in KFbxAnimCurveKFCurve.
virtual float EvaluateIndex | ( | double | pIndex | ) | [pure virtual] |
Evaluate animation curve value at a given key index.
pIndex | Any value from 0 to KFbxAnimCurve::KeyGetCount() - 1. |
Implements KFbxAnimCurveBase.
Implemented in KFbxAnimCurveKFCurve.
virtual float EvaluateLeftDerivative | ( | KTime | pTime, |
int * | pLast = NULL |
||
) | [pure virtual] |
Evaluate function left derivative at given time.
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. |
Implemented in KFbxAnimCurveKFCurve.
virtual float EvaluateRightDerivative | ( | KTime | pTime, |
int * | pLast = NULL |
||
) | [pure virtual] |
Evaluate function right derivative at given time.
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. |
Implemented in KFbxAnimCurveKFCurve.
Find out start and end time of the animation animation curve.
This function retrieves the animation curve's time span.
pStart | Reference to receive start time. |
pStop | Reference to receive end time. |
true
on success, false
otherwise.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.
pTimeInterval | Reference to receive start and end time. |
true
on success, false
otherwise.Reimplemented from KFbxAnimCurveBase.
Implemented in KFbxAnimCurveKFCurve.
virtual KFCurve* GetKFCurve | ( | ) | [pure virtual] |
Get the pointer to KFCurve.
Implemented in KFbxAnimCurveKFCurve.
virtual void CopyFrom | ( | KFbxAnimCurve & | pSource, |
bool | pWithKeys =
true |
||
) | [pure virtual] |
Copy animation curve content into current animation curve.
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] |