FBX C++ API Reference
|
#include <fbxanimcurve.h>
This is the interface for the FBX animation curve keys.
A key is defined by a time and a value. It also has tangents that control how the animation curve enters and exits the key.
Definition at line 348 of file fbxanimcurve.h.
Public Member Functions | |
FbxAnimCurveKey () | |
Constructor with no argument. More... | |
FbxAnimCurveKey (FbxTime pTime) | |
Constructor with time. More... | |
FbxAnimCurveKey (FbxTime pTime, float pVal) | |
Constructor with time and value. More... | |
FbxAnimCurveKey (FbxAnimCurveKey const &pFKey) | |
Copy constructor. More... | |
~FbxAnimCurveKey () | |
Destructor. More... | |
FbxAnimCurveKey & | operator= (const FbxAnimCurveKey &pFKey) |
Assignment operator. More... | |
FbxTime | GetTime () const |
Get time value. More... | |
void | SetTime (const FbxTime &pTime) |
Set time value. More... | |
void | Set (FbxTime pTime, float pValue) |
Set time and value of key. More... | |
void | SetTCB (FbxTime pTime, float pValue, float pData0=0.0f, float pData1=0.0f, float pData2=0.0f) |
Set a key with cubic interpolation, TCB tangent mode. More... | |
float | GetValue () const |
Get the key value. More... | |
void | SetValue (float pValue) |
Set the key value. More... | |
FbxAnimCurveDef::EInterpolationType | GetInterpolation () |
Get key's interpolation type. More... | |
void | SetInterpolation (FbxAnimCurveDef::EInterpolationType pInterpolation) |
Set key's interpolation type. More... | |
FbxAnimCurveDef::ETangentMode | GetTangentMode (bool pIncludeOverrides=false) |
Get key's tangent mode. More... | |
void | SetTangentMode (FbxAnimCurveDef::ETangentMode pTangentMode) |
Set tangent mode. More... | |
FbxAnimCurveDef::EWeightedMode | GetTangentWeightMode () const |
Get key's tangent weight mode. More... | |
void | SetTangentWeightMode (FbxAnimCurveDef::EWeightedMode pTangentWeightMode, FbxAnimCurveDef::EWeightedMode pMask=FbxAnimCurveDef::eWeightedAll) |
Set key's tangent weight mode as double value (cubic interpolation, non TCB tangent mode). More... | |
void | SetTangentWeightAndAdjustTangent (FbxAnimCurveDef::EDataIndex pIndex, double pWeight) |
Adjust the actual tangent of the key so that the tangent control point (tangent extremity) stays closer to where it should be. More... | |
FbxAnimCurveDef::EVelocityMode | GetTangentVelocityMode () const |
Get key's tangent velocity mode. More... | |
void | SetTangentVelocityMode (FbxAnimCurveDef::EVelocityMode pTangentVelocityMode, FbxAnimCurveDef::EVelocityMode pMask=FbxAnimCurveDef::eVelocityAll) |
Set key's tangent velocity mode as double value (cubic interpolation, non TCB tangent mode). More... | |
FbxAnimCurveDef::EConstantMode | GetConstantMode () const |
Get key constant mode. More... | |
void | SetConstantMode (FbxAnimCurveDef::EConstantMode pMode) |
Set key's constant mode. More... | |
float | GetDataFloat (FbxAnimCurveDef::EDataIndex pIndex) const |
Get the value of specified data of the key. More... | |
void | SetDataFloat (FbxAnimCurveDef::EDataIndex pIndex, float pValue) |
Set the value of specified data of the key. More... | |
void | SetTangentVisibility (FbxAnimCurveDef::ETangentVisibility pVisibility) |
Set tangent visibility mode. More... | |
FbxAnimCurveDef::ETangentVisibility | GetTangentVisibility () const |
Return tangent visibility mode. More... | |
void | SetBreak (bool pVal) |
Turn on or turn off the tangent break. More... | |
bool | GetBreak () const |
Get if the tangent has a break. More... | |
FbxAnimCurveKey_Impl * | GetImpl () const |
Get key implementation. More... | |
![]() | |
FbxAnimCurveKeyBase () | |
Constructor. More... | |
virtual | ~FbxAnimCurveKeyBase () |
Destructor. More... | |
Static Public Member Functions | |
static void | SetAllocatorFct (FbxAnimCurveKey_Impl *(*pAllocatorFct)()) |
Set allocator function. More... | |
static void | SetCopyAllocatorFct (FbxAnimCurveKey_Impl *(*pCopyAllocatorFct)(FbxAnimCurveKey_Impl *)) |
Set copy allocator function. More... | |
static void | SetDeallocatorFct (void(*pDeallocatorFct)(FbxAnimCurveKey_Impl *)) |
Set deallocator function. More... | |
Additional Inherited Members | |
![]() | |
FbxTime | mTime |
Data member representing time value. More... | |
|
inline |
Constructor with no argument.
Definition at line 353 of file fbxanimcurve.h.
|
inline |
Constructor with time.
pTime | The time of key. |
Definition at line 362 of file fbxanimcurve.h.
|
inline |
Constructor with time and value.
pTime | The time of key. |
pVal | The value of key. |
Definition at line 373 of file fbxanimcurve.h.
|
inline |
Copy constructor.
Definition at line 382 of file fbxanimcurve.h.
|
inline |
|
inline |
Assignment operator.
Definition at line 399 of file fbxanimcurve.h.
|
inlinevirtual |
Get time value.
Reimplemented from FbxAnimCurveKeyBase.
Definition at line 413 of file fbxanimcurve.h.
|
inlinevirtual |
Set time value.
pTime | Time value to set. |
Reimplemented from FbxAnimCurveKeyBase.
Definition at line 421 of file fbxanimcurve.h.
|
inline |
Set time and value of key.
pTime | New time of this key. |
pValue | New value of this key. |
Definition at line 430 of file fbxanimcurve.h.
|
inline |
Set a key with cubic interpolation, TCB tangent mode.
The key is modified according to the other parameters. The TCB mode controls the tension, continuity, and bias of the curve.
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. |
Definition at line 447 of file fbxanimcurve.h.
|
inline |
|
inline |
Set the key value.
pValue | The value to set. |
Definition at line 464 of file fbxanimcurve.h.
|
inline |
Get key's interpolation type.
Definition at line 473 of file fbxanimcurve.h.
|
inline |
Set key's interpolation type.
pInterpolation | Interpolation type of the key. |
Definition at line 481 of file fbxanimcurve.h.
|
inline |
Get key's tangent mode.
pIncludeOverrides | Include override flags: Break, Clamp, Time-Independent. |
Definition at line 492 of file fbxanimcurve.h.
|
inline |
Set tangent mode.
pTangentMode | Tangent mode to set. |
Definition at line 500 of file fbxanimcurve.h.
|
inline |
Get key's tangent weight mode.
Definition at line 509 of file fbxanimcurve.h.
|
inline |
Set key's tangent weight mode as double value (cubic interpolation, non TCB tangent mode).
pTangentWeightMode | Weight mode. |
pMask | Used to select the affected tangents. |
Sample01:
pMask is eWeightedRight, it will first be used to cancel out the current tangent weight mode eWeightedNextLeft, since they are not the same, it fails to cancel it out. Then the mask eWeightedRight will be used to define which tangent should be affected, since it is the same as pTangentWeightMode (eWeightedRight), so the eWeightedRight should be affected. In total, after above calls, both eWeightedNextLeft and eWeightedRight of this key are affected, so lAnimCurveKey->GetTangentWeightMode() will be FbxAnimCurveDef::eWeightedAll.
Sample02:
pMask is eWeightedNextLeft, it will first be used to cancel out the current tangent weight mode eWeightedAll, it will cancel out affect on eWeightedNextLeft, but leave affect on eWeightedRight. Then the mask eWeightedNextLeft will be used to define which tangent should be affected, since it is not the same as pTangentWeightMode (eWeightedRight), so the pMask won't affect anything in this step. In total, after above calls, only eWeightedRight of this key is still affected, so lAnimCurveKey->GetTangentWeightMode() will be FbxAnimCurveDef::eWeightedRight.
Definition at line 547 of file fbxanimcurve.h.
|
inline |
Adjust the actual tangent of the key so that the tangent control point (tangent extremity) stays closer to where it should be.
This is required because the weight value gets imprecise when it is small (it is stored as a fixed point value). This method must be called when setting the weight coming from a source where the precision is the same. It must be called after the tangent value has been set.
pIndex | FbxAnimCurveDef::EDataIndex |
pWeight | New tangent weight value. |
Definition at line 562 of file fbxanimcurve.h.
|
inline |
Get key's tangent velocity mode.
Definition at line 571 of file fbxanimcurve.h.
|
inline |
Set key's tangent velocity mode as double value (cubic interpolation, non TCB tangent mode).
pTangentVelocityMode | Velocity mode. |
pMask | Used to select the affected tangents |
Definition at line 585 of file fbxanimcurve.h.
|
inline |
Get key constant mode.
Definition at line 595 of file fbxanimcurve.h.
|
inline |
Set key's constant mode.
pMode | Constant mode to set. |
Definition at line 604 of file fbxanimcurve.h.
|
inline |
Get the value of specified data of the key.
pIndex | Data index to specify which data to get value, the index is dependent on the key tangent mode. |
Definition at line 623 of file fbxanimcurve.h.
|
inline |
Set the value of specified data of the key.
pIndex | Data index to specify which data to get value, the index is dependent on the key tangent mode. |
pValue | The data value to set. |
Definition at line 639 of file fbxanimcurve.h.
|
inline |
Set tangent visibility mode.
This would indicate what part of the tangent is visible in a graphical interface.
pVisibility | Tangent visibility mode. |
Definition at line 648 of file fbxanimcurve.h.
|
inline |
Return tangent visibility mode.
Definition at line 657 of file fbxanimcurve.h.
|
inline |
Turn on or turn off the tangent break.
When this flag is on (FbxAnimCurveDef::eTANGEAT_BREAK will be set), the key's left and right slopes are independent. When this flag is off, the key's left and right slope are equal.
pVal | Break flag (true or false ). |
Definition at line 668 of file fbxanimcurve.h.
|
inline |
Get if the tangent has a break.
When this flag is set (FbxAnimCurveDef::eTANGEAT_BREAK), the key's left and right slopes are independent. When this flag is off, the key's left and right slope are equal.
true
or false
). Definition at line 679 of file fbxanimcurve.h.
|
inline |
Get key implementation.
Definition at line 687 of file fbxanimcurve.h.
|
static |
Set allocator function.
pAllocatorFct | Allocator function |
|
static |
Set copy allocator function.
pCopyAllocatorFct | Copy allocator function |
|
static |
Set deallocator function.
pDeallocatorFct | Deallocator function |