This is the base class for implementing animation curves.
It is a pure virtual class that defines the general interface to animation key management and manipulation.
Definition at line 68 of file kfbxanimcurvebase.h.
#include <kfbxanimcurvebase.h>

Public Member Functions |
|
| virtual bool | Store (KFbx *pFileObject)=0 |
| virtual bool | Retrieve (KFbx *pFileObject)=0 |
Protected Member Functions |
|
| KFbxAnimCurveBase (KFbxSdkManager &pManager, char const *pName) | |
Friends |
|
| class | KFbxObject |
Key management. |
|
| virtual void | KeyClear ()=0 |
| Remove all the keys 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 key at given time. |
|
| virtual bool | KeySet (int pIndex, KFbxAnimCurveKeyBase &pKey)=0 |
| Set key at given index. |
|
| 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.
|
|
Key Time Manipulation |
|
| virtual KTime | KeyGetTime (int pKeyIndex) const |
| Get key time. |
|
| virtual void | KeySetTime (int pKeyIndex, KTime pTime)=0 |
| Set key time. |
|
Extrapolation |
|
Extrapolation defines
the function curve value before and after the
keys.Pre-extrapolation defines the function curve value before
first key. Post-extrapolation defines the function curve value
after last key.
|
|
| enum | EExtrapolationType { eCONSTANT = 1, eREPETITION = 2, eMIRROR_REPETITION = 3, eKEEP_SLOPE = 4 } |
| void | SetPreExtrapolation (EExtrapolationType pExtrapolation) |
| Set pre-extrapolation mode. |
|
| EExtrapolationType | GetPreExtrapolation () const |
| Get pre-extrapolation mode. |
|
| void | SetPreExtrapolationCount (unsigned long pCount) |
| Set pre-extrapolation count. |
|
| unsigned long | GetPreExtrapolationCount () const |
| Get pre-extrapolation count. |
|
| void | SetPostExtrapolation (EExtrapolationType pExtrapolation) |
| Set post-extrapolation mode. |
|
| EExtrapolationType | GetPostExtrapolation () const |
| Get post-extrapolation mode. |
|
| void | SetPostExtrapolationCount (unsigned long pCount) |
| Set post-extrapolation count. |
|
| unsigned long | GetPostExtrapolationCount () const |
| Get post-extrapolation count. |
|
Evaluation and Analysis |
|
| virtual float | Evaluate (KTime pTime, int *pLast=NULL)=0 |
| Evaluate curve value at a given time.
|
|
| virtual float | EvaluateIndex (double pIndex)=0 |
| Evaluate curve value at the given key index.
|
|
Utility functions. |
|
| virtual bool | GetTimeInterval (KTime &pStart, KTime &pStop) |
| Find out start and end time of the animation
curve. |
|
| virtual bool | GetTimeInterval (KTimeSpan &pTimeInterval) |
| Find out start and end time of the animation
curve. |
|
| enum EExtrapolationType |
Definition at line 149 of file kfbxanimcurvebase.h.
{
eCONSTANT = 1,
eREPETITION = 2,
eMIRROR_REPETITION = 3,
eKEEP_SLOPE = 4
} EExtrapolationType;
| KFbxAnimCurveBase | ( | KFbxSdkManager & | pManager, |
| char const * | pName | ||
| ) | [protected] |
| virtual void KeyClear | ( | ) | [pure virtual] |
Remove all the keys and free buffer memory.
Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual int KeyGetCount | ( | ) | const [pure virtual] |
Get the number of keys.
Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual int KeyAdd | ( | KTime | pTime, |
| KFbxAnimCurveKeyBase & | pKey, | ||
| int * | pLast = NULL |
||
| ) | [pure virtual] |
Add a key at given time.
| pTime | Time to add the 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. |
Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual bool KeySet | ( | int | pIndex, |
| KFbxAnimCurveKeyBase & | pKey | ||
| ) | [pure virtual] |
Set key at given index.
| pIndex | Index of where the key should be set. |
| pKey | The key to set. |
true if key time is superior to previous key and
inferior to next key, false otherwise.Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual bool KeyRemove | ( | int | pIndex | ) | [pure virtual] |
Remove key at given index.
| pIndex | Index of key to remove. |
true on success, false
otherwise.Implemented in KFbxAnimCurve, and 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). |
true on success, false
otherwise.Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual KTime KeyGetTime | ( | int | pKeyIndex | ) | const [inline, virtual] |
Get key time.
| pKeyIndex | Key index. |
Reimplemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
Definition at line 128 of file kfbxanimcurvebase.h.
{ return KTIME_INFINITE; }
| virtual void KeySetTime | ( | int | pKeyIndex, |
| KTime | pTime | ||
| ) | [pure virtual] |
Set key time.
| pKeyIndex | Key index. |
| pTime | Key time (time at which this key is occurring). |
Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| void SetPreExtrapolation | ( | EExtrapolationType | pExtrapolation | ) | [inline] |
Set pre-extrapolation mode.
| pExtrapolation | The pre-extrapolation mode to set. |
Definition at line 159 of file kfbxanimcurvebase.h.
{ mPreExtrapolation = pExtrapolation; }
| EExtrapolationType GetPreExtrapolation | ( | ) | const [inline] |
Get pre-extrapolation mode.
Definition at line 164 of file kfbxanimcurvebase.h.
{ return mPreExtrapolation; }
| void SetPreExtrapolationCount | ( | unsigned long | pCount | ) | [inline] |
Set pre-extrapolation count.
| pCount | Number of repetitions if pre-extrapolation mode is REPETITION or MIRROR_REPETITION. |
Definition at line 170 of file kfbxanimcurvebase.h.
{ mPreExtrapolationCount = pCount; }
| unsigned long GetPreExtrapolationCount | ( | ) | const [inline] |
Get pre-extrapolation count.
Definition at line 176 of file kfbxanimcurvebase.h.
{ return mPreExtrapolationCount; }
| void SetPostExtrapolation | ( | EExtrapolationType | pExtrapolation | ) | [inline] |
Set post-extrapolation mode.
| pExtrapolation | The post-extrapolation mode to set. |
Definition at line 181 of file kfbxanimcurvebase.h.
{ mPostExtrapolation = pExtrapolation; }
| EExtrapolationType GetPostExtrapolation | ( | ) | const [inline] |
Get post-extrapolation mode.
Definition at line 186 of file kfbxanimcurvebase.h.
{ return mPostExtrapolation; }
| void SetPostExtrapolationCount | ( | unsigned long | pCount | ) | [inline] |
Set post-extrapolation count.
| pCount | Number of repetitions if post-extrapolation mode is REPETITION or MIRROR_REPETITION. |
Definition at line 192 of file kfbxanimcurvebase.h.
{ mPostExtrapolationCount = pCount; }
| unsigned long GetPostExtrapolationCount | ( | ) | const [inline] |
Get post-extrapolation count.
Definition at line 198 of file kfbxanimcurvebase.h.
{ return mPostExtrapolationCount; }
| virtual float Evaluate | ( | KTime | pTime, |
| int * | pLast = NULL |
||
| ) | [pure virtual] |
Evaluate curve value at a 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 KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual float EvaluateIndex | ( | double | pIndex | ) | [pure virtual] |
Evaluate curve value at the given key index.
| pIndex | Any value from 0 to KFCurve::KeyGetCount() - 1. If this index falls between keys, the curve value will be interpolated based on the surrounding keys. |
Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
Find out start and end time of the animation curve.
This function retrieves the Curve's time span.
| pStart | Reference to receive start time. |
| pStop | Reference to receive end time. |
true on success, false
otherwise.Reimplemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual bool GetTimeInterval | ( | KTimeSpan & | pTimeInterval | ) | [virtual] |
Find out start and end time of the animation curve.
This function retrieves the Curve's time span.
| pTimeInterval | Reference to receive start time and end time. |
true on success, false
otherwise.Reimplemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual bool Store | ( | KFbx * | pFileObject | ) | [pure virtual] |
Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
| virtual bool Retrieve | ( | KFbx * | pFileObject | ) | [pure virtual] |
Implemented in KFbxAnimCurve, and KFbxAnimCurveKFCurve.
friend class KFbxObject [friend] |
Reimplemented from KFbxPlug.
Definition at line 265 of file kfbxanimcurvebase.h.