This is the interface for implementation of animation key objects.
Definition at line 157 of file kfbxanimcurve.h.
#include <kfbxanimcurve.h>
Public Member Functions |
|
virtual | ~KFbxAnimCurveKeyImpl () |
Destructor. |
|
virtual KFbxAnimCurveKeyImpl & | operator= (const KFbxAnimCurveKeyImpl &pFKey)=0 |
Assignment operator. |
|
virtual void | Set (KTime pTime, float pValue)=0 |
Set time and value of key. |
|
virtual void | SetTCB (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 float | GetValue () const =0 |
Get the key value. |
|
virtual void | SetValue (float pValue)=0 |
Set the key value. |
|
virtual KFbxAnimCurveDef::EInterpolationType |
GetInterpolation () const =0 |
Get key's interpolation type. |
|
virtual void | SetInterpolation (KFbxAnimCurveDef::EInterpolationType pInterpolation)=0 |
Set key's interpolation type. |
|
virtual KFbxAnimCurveDef::ETangentMode |
GetTangentMode (bool pIncludeOverrides=false) const =0 |
Get key's tangent mode. |
|
virtual void | SetTangentMode (KFbxAnimCurveDef::ETangentMode pTangentMode)=0 |
Set tangent mode. |
|
virtual KFbxAnimCurveDef::EWeightedMode |
GetTangentWeightMode () const =0 |
Get key's tangent weight mode. |
|
virtual void | SetTangentWeightMode (KFbxAnimCurveDef::EWeightedMode pTangentWeightMode, KFbxAnimCurveDef::EWeightedMode pMask=KFbxAnimCurveDef::eWEIGHTED_ALL)=0 |
Set key's tangent weight mode as double
value (cubic interpolation, non TCB tangent mode). |
|
virtual KFbxAnimCurveDef::EVelocityMode |
GetTangentVelocityMode () const =0 |
Get key's tangent velocity mode. |
|
virtual void | SetTangentVelocityMode (KFbxAnimCurveDef::EVelocityMode pTangentVelocityMode, KFbxAnimCurveDef::EVelocityMode pMask=KFbxAnimCurveDef::eVELOCITY_ALL)=0 |
Set key's tangent velocity mode as double
value (cubic interpolation, non TCB tangent mode). |
|
virtual KFbxAnimCurveDef::EConstantMode |
GetConstantMode () const =0 |
Get key constant mode. |
|
virtual void | SetConstantMode (KFbxAnimCurveDef::EConstantMode pMode)=0 |
Set key's constant mode. |
|
virtual float | GetDataFloat (KFbxAnimCurveDef::EKFbxAnimCurveDataIndex pIndex) const =0 |
Get the value of specified data of the key.
|
|
virtual void | SetDataFloat (KFbxAnimCurveDef::EKFbxAnimCurveDataIndex pIndex, float pValue)=0 |
Set the value of specified data of the key.
|
|
virtual void | SetTangentVisibility (KFbxAnimCurveDef::ETangentVisibility pVisibility)=0 |
Set tangent visibility mode. |
|
virtual KFbxAnimCurveDef::ETangentVisibility |
GetTangentVisibility () const =0 |
Return tangent visibility mode. |
|
virtual void | SetBreak (bool pVal)=0 |
Turn on or turn off the tangent break.
|
|
virtual bool | GetBreak () const =0 |
Get if the tangent has a break. |
virtual ~KFbxAnimCurveKeyImpl | ( | ) | [inline, virtual] |
virtual KFbxAnimCurveKeyImpl& operator= | ( | const KFbxAnimCurveKeyImpl & | pFKey | ) | [pure virtual] |
Assignment operator.
Implemented in KFbxAnimCurveKFCurveKey.
virtual void Set | ( | KTime | pTime, |
float | pValue | ||
) | [pure virtual] |
Set time and value of key.
pTime | New time of this key. |
pValue | New value of this key. |
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetTCB | ( | 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 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. |
Implemented in KFbxAnimCurveKFCurveKey.
virtual float GetValue | ( | ) | const [pure virtual] |
virtual void SetValue | ( | float | pValue | ) | [pure virtual] |
virtual KFbxAnimCurveDef::EInterpolationType GetInterpolation | ( | ) | const [pure virtual] |
Get key's interpolation type.
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetInterpolation | ( | KFbxAnimCurveDef::EInterpolationType | pInterpolation | ) | [pure virtual] |
Set key's interpolation type.
pInterpolation | Interpolation type of the key. |
Implemented in KFbxAnimCurveKFCurveKey.
virtual KFbxAnimCurveDef::ETangentMode GetTangentMode | ( | bool | pIncludeOverrides =
false |
) | const [pure virtual] |
Get key's tangent mode.
pIncludeOverrides | Include override flags: Break, Clamp, Time-Independent. |
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetTangentMode | ( | KFbxAnimCurveDef::ETangentMode | pTangentMode | ) | [pure virtual] |
Set tangent mode.
pTangentMode | Tangent mode to set. |
Implemented in KFbxAnimCurveKFCurveKey.
virtual KFbxAnimCurveDef::EWeightedMode GetTangentWeightMode | ( | ) | const [pure virtual] |
Get key's tangent weight mode.
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetTangentWeightMode | ( | KFbxAnimCurveDef::EWeightedMode | pTangentWeightMode, |
KFbxAnimCurveDef::EWeightedMode | pMask =
KFbxAnimCurveDef::eWEIGHTED_ALL |
||
) | [pure virtual] |
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:
KFbxAnimCurveKey* lAnimCurveKey = FbxSdkNew<KFbxAnimCurveKey>(); lAnimCurveKey->SetTangentWeightMode(KFbxAnimCurveDef::eWEIGHTED_NEXT_LEFT); lAnimCurveKey->SetTangentWeightMode(KFbxAnimCurveDef::eWEIGHTED_RIGHT, KFbxAnimCurveDef::eWEIGHTED_RIGHT);
pMask is eWEIGHTED_RIGHT, it will first be used to cancel out the current tangent weight mode eWEIGHTED_NEXT_LEFT, since they are not the same, it fails to cancel it out. Then the mask eWEIGHTED_RIGHT will be used to define which tangent should be affected, since it is the same as pTangentWeightMode (eWEIGHTED_RIGHT), so the eWEIGHTED_RIGHT should be affected. In total, after above calls, both eWEIGHTED_NEXT_LEFT and eWEIGHTED_RIGHT of this key are affected, so lAnimCurveKey->GetTangentWeightMode() will be KFbxAnimCurveDef::eWEIGHTED_ALL.
Sample02:
KFbxAnimCurveKey* lAnimCurveKey = FbxSdkNew<KFbxAnimCurveKey>(); lAnimCurveKey->SetTangentWeightMode(KFbxAnimCurveDef::eWEIGHTED_ALL); lAnimCurveKey->SetTangentWeightMode(KFbxAnimCurveDef::eWEIGHTED_RIGHT, KFbxAnimCurveDef::eWEIGHTED_NEXT_LEFT);
pMask is eWEIGHTED_NEXT_LEFT, it will first be used to cancel out the current tangent weight mode eWEIGHTED_ALL, it will cancel out affect on eWEIGHTED_NEXT_LEFT, but leave affect on eWEIGHTED_RIGHT. Then the mask eWEIGHTED_NEXT_LEFT will be used to define which tangent should be affected, since it is not the same as pTangentWeightMode (eWEIGHTED_RIGHT), so the pMask won't affect anything in this step. In total, after above calls, only eWEIGHTED_RIGHT of this key is still affected, so lAnimCurveKey->GetTangentWeightMode() will be KFbxAnimCurveDef::eWEIGHTED_RIGHT.
Implemented in KFbxAnimCurveKFCurveKey.
virtual KFbxAnimCurveDef::EVelocityMode GetTangentVelocityMode | ( | ) | const [pure virtual] |
Get key's tangent velocity mode.
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetTangentVelocityMode | ( | KFbxAnimCurveDef::EVelocityMode | pTangentVelocityMode, |
KFbxAnimCurveDef::EVelocityMode | pMask =
KFbxAnimCurveDef::eVELOCITY_ALL |
||
) | [pure virtual] |
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 |
Implemented in KFbxAnimCurveKFCurveKey.
virtual KFbxAnimCurveDef::EConstantMode GetConstantMode | ( | ) | const [pure virtual] |
Get key constant mode.
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetConstantMode | ( | KFbxAnimCurveDef::EConstantMode | pMode | ) | [pure virtual] |
Set key's constant mode.
pMode | Constant mode to set. |
Implemented in KFbxAnimCurveKFCurveKey.
virtual float GetDataFloat | ( | KFbxAnimCurveDef::EKFbxAnimCurveDataIndex | pIndex | ) | const [pure virtual] |
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. |
KFbxAnimCurveKey* lKey; // we suppose this is a valid pointer if(lKey->GetTangentMode() == KFbxAnimCurveDef::eTANGENT_TCB) { lKey->GetDataFloat(KFbxAnimCurveDef::eTCB_TENSION); lKey->GetDataFloat(KFbxAnimCurveDef::eTCB_CONTINUITY); lKey->GetDataFloat(KFbxAnimCurveDef::eTCB_BIAS); }
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetDataFloat | ( | KFbxAnimCurveDef::EKFbxAnimCurveDataIndex | pIndex, |
float | pValue | ||
) | [pure virtual] |
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. |
KFbxAnimCurveKey* lKey; // we suppose this is a valid pointer lKey->SetInterpolation(KFbxAnimCurveDef::eINTERPOLATION_CUBIC); lKey->SetTangentMode(KFbxAnimCurveDef::eTANGENT_AUTO); lKey->SetDataFloat(KFbxAnimCurveDef::eRIGHT_SLOPE, 0.0);
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetTangentVisibility | ( | KFbxAnimCurveDef::ETangentVisibility | pVisibility | ) | [pure virtual] |
Set tangent visibility mode.
This would indicate what part of the tangent is visible in a graphical interface.
pVisibility | Tangent visibility mode. |
Implemented in KFbxAnimCurveKFCurveKey.
virtual KFbxAnimCurveDef::ETangentVisibility GetTangentVisibility | ( | ) | const [pure virtual] |
Return tangent visibility mode.
Implemented in KFbxAnimCurveKFCurveKey.
virtual void SetBreak | ( | bool | pVal | ) | [pure virtual] |
Turn on or turn off the tangent break.
When this flag is on (KFbxAnimCurveDef::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 ). |
Implemented in KFbxAnimCurveKFCurveKey.
virtual bool GetBreak | ( | ) | const [pure virtual] |
Get if the tangent has a break.
When this flag is set (KFbxAnimCurveDef::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
).Implemented in KFbxAnimCurveKFCurveKey.