This class implements the interface KFbxAnimCurveKeyImpl for FBX animation curve keys.
Definition at line 32 of file kfbxanimcurvekfcurve.h.
#include <kfbxanimcurvekfcurve.h>
Constructors, Destructors, Copy Constructors, and other base functions. |
|
static KFbxAnimCurveKeyImpl * | AllocatorFct () |
Get a new instance of
KFbxAnimCurveKFCurveKey. |
|
static KFbxAnimCurveKeyImpl * | CopyAllocatorFct (KFbxAnimCurveKeyImpl *pImpl) |
Get a new instance of
KFbxAnimCurveKFCurveKey, copied from the given instance.
|
|
static void | DeallocatorFct (KFbxAnimCurveKeyImpl *pImpl) |
Delete a
KFbxAnimCurveKFCurveKey. |
|
KFbxAnimCurveKFCurveKey () | |
Default Constructor. |
|
virtual | ~KFbxAnimCurveKFCurveKey () |
Destructor. |
|
KFbxAnimCurveKFCurveKey (KTime pTime) | |
Constructor with time. |
|
KFbxAnimCurveKFCurveKey (KTime pTime, float pVal) | |
Constructor with time and value. |
|
KFbxAnimCurveKFCurveKey (KFbxAnimCurveKFCurveKey const &pFKey) | |
Copy constructor. |
|
KFbxAnimCurveKFCurveKey (KFCurveKey const &pFKey) | |
Constructor from KFCurveKey. |
|
KFbxAnimCurveKeyImpl & | operator= (const KFbxAnimCurveKeyImpl &pFKey) |
Assignment operator. |
|
KFbxAnimCurveKFCurveKey & | operator= (const KFbxAnimCurveKFCurveKey &pFKey) |
Assignment operator. |
|
operator KFCurveKey & () | |
Cast operator to convert this to its base
class instance. |
|
KFCurveKey * | GetKFCurveKey () |
Get base class pointer. |
|
|
|
virtual KTime | GetTime () const |
Get time value of the key. |
|
virtual void | SetTime (const KTime &pTime) |
Set time of key. |
|
void | Set (KTime pTime, float pValue) |
Set time and value of key. |
|
void | SetTCB (KTime pTime, float pValue, float pData0=0.0f, float pData1=0.0f, float pData2=0.0f) |
Set a key with cubic interpolation, TCB
tangent mode. |
|
float | GetValue () const |
Get key value. |
|
void | SetValue (float pValue) |
Set key value. |
|
KFbxAnimCurveDef::EInterpolationType | GetInterpolation () const |
Get key's interpolation type. |
|
void | SetInterpolation (KFbxAnimCurveDef::EInterpolationType pInterpolation) |
Set key's interpolation type. |
|
KFbxAnimCurveDef::ETangentMode | GetTangentMode (bool pIncludeOverrides=false) const |
Get key's tangent mode. |
|
void | SetTangentMode (KFbxAnimCurveDef::ETangentMode pTangentMode) |
Set key's tangent mode. |
|
KFbxAnimCurveDef::EWeightedMode | GetTangentWeightMode () const |
Get key's tangent weight mode. |
|
void | SetTangentWeightMode (KFbxAnimCurveDef::EWeightedMode pTangentWeightMode, KFbxAnimCurveDef::EWeightedMode pMask=KFbxAnimCurveDef::eWEIGHTED_ALL) |
Set key's tangent weight mode as double
value (cubic interpolation, non TCB tangent mode). |
|
KFbxAnimCurveDef::EVelocityMode | GetTangentVelocityMode () const |
Get key's tangent velocity mode. |
|
void | SetTangentVelocityMode (KFbxAnimCurveDef::EVelocityMode pTangentVelocityMode, KFbxAnimCurveDef::EVelocityMode pMask=KFbxAnimCurveDef::eVELOCITY_ALL) |
Set key's tangent velocity mode as double
value (cubic interpolation, non TCB tangent mode). |
|
KFbxAnimCurveDef::EConstantMode | GetConstantMode () const |
Get key's constant mode. |
|
void | SetConstantMode (KFbxAnimCurveDef::EConstantMode pMode) |
Set key's constant mode. |
|
float | GetDataFloat (KFbxAnimCurveDef::EKFbxAnimCurveDataIndex pIndex) const |
Get key data. |
|
void | SetDataFloat (KFbxAnimCurveDef::EKFbxAnimCurveDataIndex pIndex, float pValue) |
Set key data. |
|
void | SetTangentVisibility (KFbxAnimCurveDef::ETangentVisibility pVisibility) |
Set tangent visibility mode. |
|
KFbxAnimCurveDef::ETangentVisibility | GetTangentVisibility () const |
Return tangent visibility mode. |
|
void | SetBreak (bool pVal) |
Set or unset the tangent break. |
|
bool | GetBreak () const |
Get if the tangent has a break. |
KFbxAnimCurveKFCurveKey | ( | ) | [inline] |
Default Constructor.
Definition at line 71 of file kfbxanimcurvekfcurve.h.
: KFbxAnimCurveKeyImpl() { KTime lTime = GetTime(); SetTime(lTime); mKey.Set(lTime, 0.0); };
virtual ~KFbxAnimCurveKFCurveKey | ( | ) | [inline, virtual] |
KFbxAnimCurveKFCurveKey | ( | KTime | pTime | ) | [inline] |
Constructor with time.
Value will be set to 0.0.
pTime | Time of the key. |
Definition at line 88 of file kfbxanimcurvekfcurve.h.
: KFbxAnimCurveKeyImpl() { SetTime(pTime); mKey.Set(pTime, 0.0); }
KFbxAnimCurveKFCurveKey | ( | KTime | pTime, |
float | pVal | ||
) | [inline] |
Constructor with time and value.
pTime | Time of the key. |
pVal | Value of the key. |
Definition at line 98 of file kfbxanimcurvekfcurve.h.
: KFbxAnimCurveKeyImpl() { SetTime(pTime); mKey.Set(pTime, pVal); }
KFbxAnimCurveKFCurveKey | ( | KFbxAnimCurveKFCurveKey const & | pFKey | ) | [inline] |
Copy constructor.
pFKey | Key instance (of type KFbxAnimCurveKFCurveKey) to be copied. |
Definition at line 108 of file kfbxanimcurvekfcurve.h.
: KFbxAnimCurveKeyImpl() { mKey = pFKey.mKey; SetTime(mKey.GetTime()); };
KFbxAnimCurveKFCurveKey | ( | KFCurveKey const & | pFKey | ) | [inline] |
Constructor from KFCurveKey.
pFKey | Key instance (of type KFCurveKey) to be copied. |
Definition at line 117 of file kfbxanimcurvekfcurve.h.
: KFbxAnimCurveKeyImpl() { mKey = pFKey; SetTime(mKey.GetTime()); };
static KFbxAnimCurveKeyImpl* AllocatorFct | ( | ) | [inline, static] |
Get a new instance of KFbxAnimCurveKFCurveKey.
Definition at line 47 of file kfbxanimcurvekfcurve.h.
{
return FbxSdkNew<KFbxAnimCurveKFCurveKey>();
}
static KFbxAnimCurveKeyImpl* CopyAllocatorFct | ( | KFbxAnimCurveKeyImpl * | pImpl | ) | [inline, static] |
Get a new instance of KFbxAnimCurveKFCurveKey, copied from the given instance.
pImpl | Key to copy. |
Definition at line 56 of file kfbxanimcurvekfcurve.h.
{ return FbxSdkNew<KFbxAnimCurveKFCurveKey>(*((KFbxAnimCurveKFCurveKey*)pImpl)); }
static void DeallocatorFct | ( | KFbxAnimCurveKeyImpl * | pImpl | ) | [inline, static] |
Delete a KFbxAnimCurveKFCurveKey.
pImpl | Key to delete. |
Definition at line 64 of file kfbxanimcurvekfcurve.h.
{ FbxSdkDelete<KFbxAnimCurveKFCurveKey>((KFbxAnimCurveKFCurveKey*)pImpl); }
KFbxAnimCurveKeyImpl& operator= | ( | const KFbxAnimCurveKeyImpl & | pFKey | ) | [inline, virtual] |
Assignment operator.
pFKey | Key (of type KFbxAnimCurveKeyImpl) to be copied. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 127 of file kfbxanimcurvekfcurve.h.
{ *this = *((KFbxAnimCurveKFCurveKey*)&pFKey); return *this; }
KFbxAnimCurveKFCurveKey& operator= | ( | const KFbxAnimCurveKFCurveKey & | pFKey | ) | [inline] |
Assignment operator.
pFKey | Key (of type KFbxAnimCurveKFCurveKey) to be copied. |
Definition at line 137 of file kfbxanimcurvekfcurve.h.
operator KFCurveKey & | ( | ) | [inline] |
Cast operator to convert this to its base class instance.
Definition at line 146 of file kfbxanimcurvekfcurve.h.
{
return mKey;
};
KFCurveKey* GetKFCurveKey | ( | ) | [inline] |
Get base class pointer.
Definition at line 154 of file kfbxanimcurvekfcurve.h.
{
return &mKey;
};
virtual KTime GetTime | ( | ) | const [inline, virtual] |
Get time value of the key.
Definition at line 166 of file kfbxanimcurvekfcurve.h.
{ return mKey.GetTime(); };
virtual void SetTime | ( | const KTime & | pTime | ) | [inline, virtual] |
Set time of key.
pTime | New time of this key (time at which this key is occurring). |
Definition at line 174 of file kfbxanimcurvekfcurve.h.
{ mKey.SetTime(pTime); };
void Set | ( | KTime | pTime, |
float | pValue | ||
) | [inline, virtual] |
Set time and value of key.
pTime | New time for this key. |
pValue | New value for this key. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 183 of file kfbxanimcurvekfcurve.h.
{ mKey.Set(pTime, pValue); }
void SetTCB | ( | KTime | pTime, |
float | pValue, | ||
float | pData0 = 0.0f , |
||
float | pData1 = 0.0f , |
||
float | pData2 =
0.0f |
||
) | [inline, 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. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 199 of file kfbxanimcurvekfcurve.h.
{ mKey.SetTCB(pTime, pValue, pData0, pData1, pData2); }
float GetValue | ( | ) | const [inline, virtual] |
Get key value.
Implements KFbxAnimCurveKeyImpl.
Definition at line 207 of file kfbxanimcurvekfcurve.h.
{ return mKey.GetValue(); }
void SetValue | ( | float | pValue | ) | [inline, virtual] |
Set key value.
pValue | The value to set. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 215 of file kfbxanimcurvekfcurve.h.
{ mKey.SetValue(pValue); }
KFbxAnimCurveDef::EInterpolationType GetInterpolation | ( | ) | const [inline, virtual] |
Get key's interpolation type.
Implements KFbxAnimCurveKeyImpl.
Definition at line 223 of file kfbxanimcurvekfcurve.h.
{ return KFbxAnimCurveDef::EInterpolationType(mKey.GetInterpolation()); }
void SetInterpolation | ( | KFbxAnimCurveDef::EInterpolationType | pInterpolation | ) | [inline, virtual] |
Set key's interpolation type.
pInterpolation | Key interpolation type. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 231 of file kfbxanimcurvekfcurve.h.
{ mKey.SetInterpolation(pInterpolation); }
KFbxAnimCurveDef::ETangentMode GetTangentMode | ( | bool | pIncludeOverrides =
false |
) | const [inline, virtual] |
Get key's tangent mode.
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. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 242 of file kfbxanimcurvekfcurve.h.
{ return KFbxAnimCurveDef::ETangentMode(mKey.GetTangeantMode(pIncludeOverrides)); }
void SetTangentMode | ( | KFbxAnimCurveDef::ETangentMode | pTangentMode | ) | [inline, virtual] |
Set key's tangent mode.
This method is meaningful for cubic interpolation only.
pTangentMode | Key tangent mode. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 251 of file kfbxanimcurvekfcurve.h.
{ bool lTI = (pTangentMode&KFbxAnimCurveDef::eTANGENT_GENERIC_TIME_INDEPENDENT)==KFbxAnimCurveDef::eTANGENT_GENERIC_TIME_INDEPENDENT; mKey.SetTangeantMode(pTangentMode, lTI==false); }
KFbxAnimCurveDef::EWeightedMode GetTangentWeightMode | ( | ) | const [inline, virtual] |
Get key's tangent weight mode.
This method is meaningful for cubic interpolation only.
Implements KFbxAnimCurveKeyImpl.
Definition at line 260 of file kfbxanimcurvekfcurve.h.
{ return KFbxAnimCurveDef::EWeightedMode(mKey.GetTangeantWeightMode()); }
void SetTangentWeightMode | ( | KFbxAnimCurveDef::EWeightedMode | pTangentWeightMode, |
KFbxAnimCurveDef::EWeightedMode | pMask =
KFbxAnimCurveDef::eWEIGHTED_ALL |
||
) | [inline, virtual] |
Set key's tangent weight mode as double value (cubic interpolation, non TCB tangent mode).
This method is meaningful for cubic interpolation only.
pTangentWeightMode | Weight mode. |
pMask | Used to select the affected tangents. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 270 of file kfbxanimcurvekfcurve.h.
{ mKey.SetTangeantWeightMode(pTangentWeightMode, pMask); }
KFbxAnimCurveDef::EVelocityMode GetTangentVelocityMode | ( | ) | const [inline, virtual] |
Get key's tangent velocity mode.
This method is meaningful for cubic interpolation only.
Implements KFbxAnimCurveKeyImpl.
Definition at line 279 of file kfbxanimcurvekfcurve.h.
{ return KFbxAnimCurveDef::EVelocityMode(mKey.GetTangeantVelocityMode()); }
void SetTangentVelocityMode | ( | KFbxAnimCurveDef::EVelocityMode | pTangentVelocityMode, |
KFbxAnimCurveDef::EVelocityMode | pMask =
KFbxAnimCurveDef::eVELOCITY_ALL |
||
) | [inline, virtual] |
Set key's tangent velocity mode as double value (cubic interpolation, non TCB tangent mode).
This method is meaningful for cubic interpolation only.
pTangentVelocityMode | Velocity mode. |
pMask | Used to select the affected tangents |
Implements KFbxAnimCurveKeyImpl.
Definition at line 289 of file kfbxanimcurvekfcurve.h.
{ mKey.SetTangeantVelocityMode(pTangentVelocityMode, pMask); }
KFbxAnimCurveDef::EConstantMode GetConstantMode | ( | ) | const [inline, virtual] |
Get key's constant mode.
Implements KFbxAnimCurveKeyImpl.
Definition at line 299 of file kfbxanimcurvekfcurve.h.
{ return KFbxAnimCurveDef::EConstantMode(mKey.GetConstantMode()); }
void SetConstantMode | ( | KFbxAnimCurveDef::EConstantMode | pMode | ) | [inline, virtual] |
Set key's constant mode.
This method is meaningful for constant interpolation only.
pMode | Constant mode to set. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 308 of file kfbxanimcurvekfcurve.h.
{ mKey.SetConstantMode(pMode); }
float GetDataFloat | ( | KFbxAnimCurveDef::EKFbxAnimCurveDataIndex | pIndex | ) | const [inline, virtual] |
Get key data.
If this is a TCB key, the data can be Tension, Continuity or Bias. If the key is weighted, the data is the weights values. If the key has velocity, the data is the velocity values.
pIndex | Data index, dependent on the key tangent mode. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 320 of file kfbxanimcurvekfcurve.h.
{ // VR: The way KFCurveKey::GetDataFloat() and GetDataDouble() are implemented are different. // GetDataDouble() works for cases USER, AUTO, BREAK, etc, which have 2 or 4 float values to store. // GetDataFloat() works for the TCB case which has 3 float values (Tension, Continuity and Bias). // It is not my purpose to modify KFCurveKey at this point, so we use GetDataDouble in general, // and GetDataFloat in the case of a TCB. if (GetTangentMode() == KFbxAnimCurveDef::eTANGENT_TCB) { return mKey.GetDataFloat(EKFCurveDataIndex(pIndex)); } return (float)mKey.GetDataDouble(EKFCurveDataIndex(pIndex)); }
void SetDataFloat | ( | KFbxAnimCurveDef::EKFbxAnimCurveDataIndex | pIndex, |
float | pValue | ||
) | [inline, virtual] |
Set key data.
If this is a TCB key, the data can be Tension, Continuity or Bias. If the key is weighted, the data is the weights values. If the key has velocity, the data is the velocity values.
pIndex | Data index, dependent on the key tangent mode. |
pValue | Data value to set. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 343 of file kfbxanimcurvekfcurve.h.
{ // VR: The way KFCurveKey::SetDataFloat() and SetDataDouble() are implemented are different. // SetDataDouble() works for cases USER, AUTO, BREAK, etc, which have 2 or 4 float values to store. // SetDataFloat() works for the TCB case which has 3 float values (Tension, Continuity and Bias). // It is not my purpose to modivy KFCurveKey at this point, so we use SetDataDouble in general, // and SetDataFloat in the case of a TCB. if (GetTangentMode() == KFbxAnimCurveDef::eTANGENT_TCB) { mKey.SetDataFloat(EKFCurveDataIndex(pIndex), pValue); } mKey.SetDataDouble(EKFCurveDataIndex(pIndex), (kFCurveDouble)pValue); }
void SetTangentVisibility | ( | KFbxAnimCurveDef::ETangentVisibility | pVisibility | ) | [inline, virtual] |
Set tangent visibility mode.
This would indicate what part of the tangent is visible in a graphical interface. This method is relevant for cubic interpolation only.
pVisibility | Tangent visibility mode. |
Implements KFbxAnimCurveKeyImpl.
Definition at line 363 of file kfbxanimcurvekfcurve.h.
{ mKey.SetTangeantVisibility(pVisibility); }
KFbxAnimCurveDef::ETangentVisibility GetTangentVisibility | ( | ) | const [inline, virtual] |
Return tangent visibility mode.
This method is relevant for cubic interpolation only.
Implements KFbxAnimCurveKeyImpl.
Definition at line 372 of file kfbxanimcurvekfcurve.h.
{ return KFbxAnimCurveDef::ETangentVisibility(mKey.GetTangeantVisibility()); }
void SetBreak | ( | bool | pVal | ) | [inline, 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.
pVal | Break flag (true or false ). |
Implements KFbxAnimCurveKeyImpl.
Definition at line 382 of file kfbxanimcurvekfcurve.h.
{ mKey.SetBreak(pVal); }
bool GetBreak | ( | ) | const [inline, 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.
true
or false
).Implements KFbxAnimCurveKeyImpl.
Definition at line 392 of file kfbxanimcurvekfcurve.h.
{ return mKey.GetBreak(); }