Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

KFCurve Class Reference

This reference page is linked to from the following overview topics: Migrating to the new data structures for animation.


Search for all occurrences

Detailed Description

Note:
This class is subject to be deprecated in future releases. It is strongly suggested to use KFbxAnimCurve instead.

An animation curve, defined by a collection of keys (KFCurveKey), 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.

Extrapolation determines the state of a curve before the first key (pre-extrapolation) and after the last key (post-extrapolation). Extrapolation modes are

Note:
When adding keys to an animation curve, use KFCurve::KeyModifyBegin and KFCurve::KeyModifyEnd.
Examples:

ImportScene/DisplayAnimation.cxx, and ViewScene/SetCamera.cxx.

Definition at line 962 of file kfcurve.h.

#include <kfcurve.h>

List of all members.

Public Types

enum   FbxStoreVersionID { V7 = 4008, V71 = 4007, V6 = 4005, V5 = 4004 }

Public Member Functions

bool  FbxStore (KFbx *pFbx, bool pOnlyDefaults=false, bool pColor=true, FbxStoreVersionID pVersionID=V7)
bool  FbxRetrieve (KFbx *pFbx, bool pOnlyDefaults=false, bool pColor=false)
bool  FbxInternalRetrieve (KFbx *pFbx, bool pOnlyDefaults=false, bool pColor=false)
void  FbxStorePriKeyAndAttrArrays (KFbx *pFbx, FbxStoreVersionID pVersionID=V7)
void  FbxRetrievePriKeyAndAttrArrays (KFbx *pFbx, int pKeyVersion)
void  FbxRetrievePrePostExtrapolation (KFbx *pFbx)
double  CandidateEvaluate (KTime pTime, kFCurveIndex *pLast=NULL)
bool  CandidateClear ()
bool  CandidateSet (KTime pTime, double pValue)
bool  IsCandidate ()
double  CandidateGet ()
KTime  CandidateGetTime ()
bool  IsLocked () const
bool  IsLockedByLayer () const
bool  IsLockedByProperty () const
void  SetLockedByLayer (bool pLocked)
void  SetLockedByProperty (bool pLocked)
bool  CandidateKey (kFCurveIndex *pLast=NULL, int pInterpolation=KFCURVE_INTERPOLATION_CUBIC, int pTanMode=KFCURVE_TANGEANT_USER, int pContinuity=KFCURVE_CONTINUITY, bool pTangeantOverride=true, KTime pCandidateTime=KTIME_INFINITE, double pKeyIndexTolerance=0.0)
bool  NormalsSeemsToComeFromAPlot ()
void  SetWasData (int pType)
int  GetWasData () const
int  GuessWasData (KTime *pStart=NULL, KTime *pStep=NULL)
void  KeyTangeantHide ()
int  GetUpdateId () const
int  GetValuesUpdateId () const
void  CallbackRegister (kFCurveCallback pCallback, void *pObject)
void  CallbackUnregister (kFCurveCallback pCallback, void *pObject)
void  CallbackEnable (bool pEnable)
void  CallbackClear ()
void  CopyExternalPriKeyAndAttr (void **pSourceFCurveKeysList, int pSourceFCurveKeyCount)
  Function for faster data transfer between MotionBuilder and FBX SDK.
KPriFCurveKey **  GetPriFCurveKeysList () const

Static Public Member Functions

static void  AllocateGlobals ()
  Static method to allocate and initialize global variables used for KFCurveKey attribute management.
static void  FreeGlobals ()
  Static method to delete global variables used for KFCurveKey attribute management.

Static Public Attributes

static const bool  sConvertAutoTimeIndepedent
  Automatically convert KFCURVE_INTERPOLATION_CUBIC type auto tangent key to Time-Independent.
static KFCurveKeyAttrManager *  smGlobalKeyAttrMemoryPool
static kULong  smGlobalRecordingMemory
static KMemoryBlockQueue smGlobalKeyBufferQueue

Constructor and Destructor

  KFCurve ()
  Constructor. Use FbxSdkNew<KFCurve> instead, to ensure that the FBX memory allocators are used.
virtual  ~KFCurve ()
  Destructor. Use Destroy instead, to ensure that the FBX memory allocators are used.
void  Destroy (int Local=0)
  Destructor, for KFCurve created using FbxSdkNew.

General curve functions

float *  GetColor ()
  Get animation curve color.
void  SetColor (const float *pColor)
  Set animation curve color.
void  SetValue (kFCurveDouble pValue)
  Set the animation curve's default value.
KFBX_FCURVE_INLINE kFCurveDouble  GetValue () const
  Get the animation curve's default value.

Key Management

void  ResizeKeyBuffer (int pKeyCount, bool pResetKeyCount=false)
  Resize animation curve buffer to hold a certain number of keys.
void  KeyModifyBegin ()
  Call this function prior to adding, removing or editing keys of an animation curve.
void  KeyModifyEnd ()
  Call this function after adding, removing or editing keys of an animation curve.
int  KeyGetCount () const
  Get the number of keys.
int  KeyGetSelectionCount () const
  Get the number of selected keys.
void  KeySelectAll ()
  Select all keys.
void  KeyUnselectAll ()
  All keys become not selected.
KFCurveKey  KeyGet (kFCurveIndex pIndex) const
  Get key at given index.
void  KeyClear ()
  Remove all the keys of the animation curve and free buffer memory.
void  KeyShrink ()
  Minimize use of buffer memory.
bool  KeySet (kFCurveIndex pIndex, KFCurveKey &pKey)
  Set (or replace) key at given index with given key.
bool  KeySet (kFCurveIndex pIndex, KFCurve *pSourceCurve, int pSourceIndex)
  Set (or replace) key at given index with key from another curve, at given source index.
int  KeyMove (kFCurveIndex pIndex, KTime pTime)
  Change time of key found at given index.
bool  KeyMoveOf (bool pSelectedOnly, KTime pDeltaTime, kFCurveDouble pDeltaValue)
  Add time and value offsets to keys (all keys or only keys that are selected).
bool  KeyMoveValueTo (bool pSelectedOnly, kFCurveDouble pValue)
  Set value of keys (all keys or only keys that are selected).
bool  KeyScaleValue (bool pSelectedOnly, kFCurveDouble pMultValue)
  Scale value of keys (all keys or only keys that are selected).
bool  KeyScaleTangeant (bool pSelectedOnly, kFCurveDouble pMultValue)
  Scale tangent of keys (all keys or only keys that are selected).
bool  KeyScaleValueAndTangeant (bool pSelectedOnly, kFCurveDouble pMultValue)
  Scale value and tangent of keys (all keys or only keys that are selected).
bool  KeyRemove (kFCurveIndex pIndex)
  Remove key at given index.
int  KeyInsert (KTime pTime, kFCurveIndex *pLast=NULL)
  Insert a key at given time.
int  KeyAdd (KTime pTime, KFCurveKey &pKey, kFCurveIndex *pLast=NULL)
  Add a given key at given time.
int  KeyAdd (KTime pTime, KFCurve *pSourceCurve, int pSourceIndex, kFCurveIndex *pLast=NULL)
  Add a key from another curve at given time.
int  KeyAdd (KTime pTime, kFCurveIndex *pLast=NULL)
  Add a key at given time.
int  KeyAppend (KTime pAtTime, KFCurve *pSourceCurve, int pSourceIndex)
  Append a key at the end of the animation curve.
int  KeyAppendFast (KTime pTime, kFCurveDouble pValue)
  To be deprecated: Append a key at the end of the animation curve.
double  KeyFind (KTime pTime, kFCurveIndex *pLast=NULL)
  Find key index for a given time.

Key Manipulation

KFBX_FCURVE_INLINE void  KeySet (kFCurveIndex pKeyIndex, KTime pTime, kFCurveDouble pValue, kFCurveInterpolation pInterpolation=KFCURVE_INTERPOLATION_CUBIC, kFCurveTangeantMode pTangentMode=KFCURVE_TANGEANT_AUTO, kFCurveDouble pRightSlope=0.0, kFCurveDouble pNextLeftSlope=0.0, kFCurveTangeantWeightMode pTangentWeightMode=KFCURVE_WEIGHTED_NONE, kFCurveDouble pWeight0=KFCURVE_DEFAULT_WEIGHT, kFCurveDouble pWeight1=KFCURVE_DEFAULT_WEIGHT, kFCurveDouble pVelocity0=KFCURVE_DEFAULT_VELOCITY, kFCurveDouble pVelocity1=KFCURVE_DEFAULT_VELOCITY)
  General function to set key properties.
KFBX_FCURVE_INLINE void  KeySetTCB (kFCurveIndex pKeyIndex, KTime pTime, kFCurveDouble pValue, float pData0=0.0f, float pData1=0.0f, float pData2=0.0f)
  Set a key with cubic interpolation, TCB tangent mode.
KFBX_FCURVE_INLINE
kFCurveInterpolation 
KeyGetInterpolation (kFCurveIndex pKeyIndex) const
  Get key's interpolation type.
KFBX_FCURVE_INLINE void  KeySetInterpolation (kFCurveIndex pKeyIndex, kFCurveInterpolation pInterpolation)
  Set key's interpolation type.
bool  IsKeyInterpolationPureCubicAuto (kFCurveIndex pKeyIndex)
  Returns true if interpolation is cubic and the tangents and weightings are untouched (default values).
KFBX_FCURVE_INLINE
kFCurveConstantMode 
KeyGetConstantMode (kFCurveIndex pKeyIndex) const
  Get key's constant mode.
KFBX_FCURVE_INLINE
kFCurveTangeantMode 
KeyGetTangeantMode (kFCurveIndex pKeyIndex, bool pIncludeOverrides=false) const
  Get key's tangent mode.
KFBX_FCURVE_INLINE
kFCurveTangeantWeightMode 
KeyGetTangeantWeightMode (kFCurveIndex pKeyIndex) const
  Get key's tangent weight mode.
KFBX_FCURVE_INLINE
kFCurveTangeantVelocityMode 
KeyGetTangeantVelocityMode (kFCurveIndex pKeyIndex) const
  Get key's tangent velocity mode.
KFBX_FCURVE_INLINE void  KeySetConstantMode (kFCurveIndex pKeyIndex, kFCurveConstantMode pMode)
  Set key's constant mode.
KFBX_FCURVE_INLINE void  KeySetTangeantMode (kFCurveIndex pKeyIndex, kFCurveTangeantMode pTangent, bool pIgnoreAutoTimeIndepedentConversion=false)
  Set key's tangent mode.
KFBX_FCURVE_INLINE void  KeySetTangeantWeightMode (kFCurveIndex pKeyIndex, kFCurveTangeantWeightMode pTangentWeightMode, kFCurveTangeantWeightMode pMask=KFCURVE_WEIGHTED_ALL)
  Set key's tangent weight mode as double value (cubic interpolation, non TCB tangent mode).
KFBX_FCURVE_INLINE void  KeySetTangeantVelocityMode (kFCurveIndex pKeyIndex, kFCurveTangeantVelocityMode pTangentVelocityMode, kFCurveTangeantVelocityMode pMask=KFCURVE_VELOCITY_ALL)
  Set key's tangent velocity mode as double value (cubic interpolation, non TCB tangent mode).
KFBX_FCURVE_INLINE kFCurveDouble  KeyGetDataDouble (kFCurveIndex pKeyIndex, EKFCurveDataIndex pIndex) const
  Get key data as double value (cubic interpolation, non TCB tangent mode).
KFBX_FCURVE_INLINE void  KeySetDataDouble (kFCurveIndex pKeyIndex, EKFCurveDataIndex pIndex, kFCurveDouble pValue)
  Set data as double value (cubic interpolation, non TCB tangent mode).
KFBX_FCURVE_INLINE float  KeyGetDataFloat (kFCurveIndex pKeyIndex, EKFCurveDataIndex pIndex) const
  Get key data in the case of a cubic interpolation with TCB tangent mode.
KFBX_FCURVE_INLINE void  KeySetDataFloat (kFCurveIndex pKeyIndex, EKFCurveDataIndex pIndex, float pValue)
  Set data value in the case of a cubic interpolation with TCB tangent mode.
KFBX_FCURVE_INLINE const float *  KeyGetDataPtr (kFCurveIndex pKeyIndex) const
  Get key data as a pointer.
KFBX_FCURVE_INLINE kFCurveDouble  KeyGetValue (kFCurveIndex pKeyIndex) const
  Get key value.
KFBX_FCURVE_INLINE void  KeySetValue (kFCurveIndex pKeyIndex, kFCurveDouble pValue)
  Set key value.
KFBX_FCURVE_INLINE void  KeyIncValue (kFCurveIndex pKeyIndex, kFCurveDouble pValue)
  Increment key value.
KFBX_FCURVE_INLINE void  KeyMultValue (kFCurveIndex pKeyIndex, kFCurveDouble pValue)
  Multiply key value.
KFBX_FCURVE_INLINE void  KeyMultTangeant (kFCurveIndex pKeyIndex, kFCurveDouble pValue)
  Multiply key tangents.
KFBX_FCURVE_INLINE KTime  KeyGetTime (kFCurveIndex pKeyIndex) const
  Get key time.
KFBX_FCURVE_INLINE void  KeySetTime (kFCurveIndex pKeyIndex, KTime pTime)
  Set key time.
KFBX_FCURVE_INLINE void  KeyIncTime (kFCurveIndex pKeyIndex, KTime pTime)
  Increment key time.
KFBX_FCURVE_INLINE void  KeySetSelected (kFCurveIndex pKeyIndex, bool pSelected)
  Select or unselect key.
KFBX_FCURVE_INLINE bool  KeyGetSelected (kFCurveIndex pKeyIndex) const
  Return true if key is currently selected, false otherwise.
KFBX_FCURVE_INLINE void  KeySetMarkedForManipulation (kFCurveIndex pKeyIndex, bool pMark)
  Set key's manipulation flag.
KFBX_FCURVE_INLINE bool  KeyGetMarkedForManipulation (kFCurveIndex pKeyIndex) const
  Return true if key is currently marked for manipulation, false otherwise.
KFBX_FCURVE_INLINE void  KeySetTangeantVisibility (kFCurveIndex pKeyIndex, kFCurveTangeantVisibility pVisibility)
  Set tangent visibility mode.
KFBX_FCURVE_INLINE
kFCurveTangeantVisibility 
KeyGetTangeantVisibility (kFCurveIndex pKeyIndex) const
  Return tangent visibility mode.
KFBX_FCURVE_INLINE void  KeySetBreak (kFCurveIndex pKeyIndex, bool pVal)
  Set or unset the tangent break.
KFBX_FCURVE_INLINE bool  KeyGetBreak (kFCurveIndex pKeyIndex) const
  Get if the tangent has a break.

Key Tangent Management

void  KeyTangeantSetInterpolation (bool pSelectedOnly, kFCurveInterpolation pInterpolation)
  Set interpolation type on keys.
void  KeyTangeantSetMode (bool pSelectedOnly, kFCurveTangeantMode pTangentMode)
  Set tangent mode on keys.
kFCurveDouble  KeyGetLeftDerivative (kFCurveIndex pIndex)
  Get the left derivative of a key.
void  KeySetLeftDerivative (kFCurveIndex pIndex, kFCurveDouble pValue)
  Set the left derivative of a key.
kFCurveDouble  KeyGetLeftAuto (kFCurveIndex pIndex, bool pApplyOvershootProtection=false)
  Get the left auto parametric of a key.
void  KeySetLeftAuto (kFCurveIndex pIndex, kFCurveDouble pValue)
  Set the left auto parametric of a key.
KFCurveTangeantInfo  KeyGetLeftDerivativeInfo (kFCurveIndex pIndex)
  Get the left derivative info (of type KFCurveTangeantInfo) of a key.
void  KeySetLeftDerivativeInfo (kFCurveIndex pIndex, KFCurveTangeantInfo pValue, bool pForceDerivative=false)
  Set the left derivative info (of type KFCurveTangeantInfo) of a key.
void  KeyIncLeftDerivative (kFCurveIndex pIndex, kFCurveDouble pInc)
  Increment the left derivative of a key.
kFCurveDouble  KeyGetRightDerivative (kFCurveIndex pIndex)
  Get the right derivative of a key.
void  KeySetRightDerivative (kFCurveIndex pIndex, kFCurveDouble pValue)
  Set the right derivative of a key.
kFCurveDouble  KeyGetRightAuto (kFCurveIndex pIndex, bool pApplyOvershootProtection=false)
  Get the right auto parametric of a key.
void  KeySetRightAuto (kFCurveIndex pIndex, kFCurveDouble pValue)
  Set the right auto parametric of a key.
KFCurveTangeantInfo  KeyGetRightDerivativeInfo (kFCurveIndex pIndex)
  Get the right derivative info (of type KFCurveTangeantInfo) of a key.
void  KeySetRightDerivativeInfo (kFCurveIndex pIndex, KFCurveTangeantInfo pValue, bool pForceDerivative=false)
  Set the right derivative info (of type KFCurveTangeantInfo) of a key.
void  KeyIncRightDerivative (kFCurveIndex pIndex, kFCurveDouble pInc)
  Increment the right derivative of a key.
kFCurveDouble  KeyGetRightBezierTangeant (kFCurveIndex pIndex)
  This function is unsupported and subject to be deprecated.
void  KeySetLeftBezierTangeant (kFCurveIndex pIndex, kFCurveDouble pValue)
  Set the left derivative of a key as a Bezier tangent.
kFCurveDouble  KeyGetLeftBezierTangeant (kFCurveIndex pIndex)
  This function is unsupported and subject to be deprecated.
void  KeySetRightBezierTangeant (kFCurveIndex pIndex, kFCurveDouble pValue)
  Set the right derivative of a key as a Bezier tangent.
void  KeyMultDerivative (kFCurveIndex pIndex, kFCurveDouble pMultValue)
  Multiply the derivative of a key.
bool  KeyIsLeftTangeantWeighted (kFCurveIndex pIndex) const
  Get the left tangent weight mode of a key.
bool  KeyIsRightTangeantWeighted (kFCurveIndex pIndex) const
  Get the right tangent weight mode of a key.
void  KeySetLeftTangeantWeightedMode (kFCurveIndex pIndex, bool pWeighted)
  Set the left tangent weight mode of a key (KFCURVE_WEIGHTED_NEXT_LEFT).
void  KeySetRightTangeantWeightedMode (kFCurveIndex pIndex, bool pWeighted)
  Set the right tangent weight mode of a key (KFCURVE_WEIGHTED_RIGHT).
kFCurveDouble  KeyGetLeftTangeantWeight (kFCurveIndex pIndex) const
  Get the weight value component of the left tangent of a key.
kFCurveDouble  KeyGetRightTangeantWeight (kFCurveIndex pIndex) const
  Get the weight value component of the right tangent of a key.
void  KeySetLeftTangeantWeight (kFCurveIndex pIndex, kFCurveDouble pWeight, bool pAdjustTan=false)
  Set the left tangent weight of a key.
void  KeySetRightTangeantWeight (kFCurveIndex pIndex, kFCurveDouble pWeight, bool pAdjustTan=false)
  Set the right tangent weight of a key.
bool  KeyIsLeftTangeantVelocity (kFCurveIndex pIndex) const
  Get the left tangent velocity mode of a key.
bool  KeyIsRightTangeantVelocity (kFCurveIndex pIndex) const
  Get the right tangent velocity mode of a key.
void  KeySetLeftTangeantVelocityMode (kFCurveIndex pIndex, bool pVelocity)
  Set the left tangent velocity mode of a key (KFCURVE_VELOCITY_NEXT_LEFT).
void  KeySetRightTangeantVelocityMode (kFCurveIndex pIndex, bool pVelocity)
  Set the right tangent velocity mode of a key (KFCURVE_VELOCITY_RIGHT).
kFCurveDouble  KeyGetLeftTangeantVelocity (kFCurveIndex pIndex) const
  Get the velocity value component of the left tangent of a key.
kFCurveDouble  KeyGetRightTangeantVelocity (kFCurveIndex pIndex) const
  Get the velocity value component of the right tangent of a key.
void  KeySetLeftTangeantVelocity (kFCurveIndex pIndex, kFCurveDouble pVelocity)
  Set the left tangent velocity of a key.
void  KeySetRightTangeantVelocity (kFCurveIndex pIndex, kFCurveDouble pVelocity)
  Set the right tangent velocity of a key.

Extrapolation

Extrapolation defines the animation curve value before and after the keys.Pre-extrapolation defines the animation curve value before first key. Post-extrapolation defines the animation curve value after last key. Extrapolation modes are:
  • KFCURVE_EXTRAPOLATION_CONST means a constant value matching the first/last key
  • KFCURVE_EXTRAPOLATION_REPETITION means the entire animation curve is looped
  • KFCURVE_EXTRAPOLATION_MIRROR_REPETITION means the entire animation curve is looped once backward, once forward and so on
  • KFCURVE_EXTRAPOLATION_KEEP_SLOPE means a linear function with a slope matching the first/last key

KFBX_FCURVE_INLINE void  SetPreExtrapolation (kFCurveExtrapolationMode pExtrapolation)
  Set pre-extrapolation mode.
KFBX_FCURVE_INLINE
kFCurveExtrapolationMode 
GetPreExtrapolation () const
  Get pre-extrapolation mode.
KFBX_FCURVE_INLINE void  SetPreExtrapolationCount (kULong pCount)
  Set pre-extrapolation count.
KFBX_FCURVE_INLINE kULong  GetPreExtrapolationCount () const
  Get pre-extrapolation count.
KFBX_FCURVE_INLINE void  SetPostExtrapolation (kFCurveExtrapolationMode pExtrapolation)
  Set post-extrapolation mode.
KFBX_FCURVE_INLINE
kFCurveExtrapolationMode 
GetPostExtrapolation () const
  Get post-extrapolation mode.
KFBX_FCURVE_INLINE void  SetPostExtrapolationCount (kULong pCount)
  Set post-extrapolation count.
KFBX_FCURVE_INLINE kULong  GetPostExtrapolationCount () const
  Get post-extrapolation count.
int  KeyGetCountAll () const
  Get total number of keys, taking extrapolation into account.
double  KeyFindAll (KTime pTime, kFCurveIndex *pLast=NULL)
  Find key index for a given time taking extrapolation into account.

Evaluation and Analysis

kFCurveDouble  Evaluate (KTime pTime, kFCurveIndex *pLast=NULL)
  Evaluate animation curve value at a given time.
kFCurveDouble  EvaluateIndex (double pIndex)
  Evaluate animation curve value at a given key index.
kFCurveDouble  EvaluateLeftDerivative (KTime pTime, kFCurveIndex *pLast=NULL)
  Evaluate function left derivative at given time.
kFCurveDouble  EvaluateRightDerivative (KTime pTime, kFCurveIndex *pLast=NULL)
  Evaluate function right derivative at given time.
int  FindPeaks (kFCurveIndex pLeftKeyIndex, KTime &pPeakTime1, KTime &pPeakTime2)
  Find the peak times between 2 keys (a local minimum and/or maximum).
int  FindPeaks (kFCurveIndex pLeftKeyIndex, kFCurveDouble &pPeak1, kFCurveDouble &pPeak2)
  Find the peak values between 2 keys (a local minimum and/or maximum).
int  FindPeaks (kFCurveIndex pLeftKeyIndex, KTime &pPeakTime1, kFCurveDouble &pPeak1, KTime &pPeakTime2, kFCurveDouble &pPeak2)
  Find the peak times and values between 2 keys (a local minimum and/or maximum).
void  KeyGetPeriods (KTime &pAveragePeriod, KTime &pMinPeriod, KTime &pMaxPeriod)
  Get period statistics for keys on this curve.

Copy, Insert, Replace and Delete Functions

HKFCurve  Copy (KTime pStart=KTIME_MINUS_INFINITE, KTime pStop=KTIME_INFINITE)
  Create a new animation curve and copy keys.
void  CopyFrom (KFCurve &pSource, bool pWithKeys=true)
  Clear the current animation curve's keys, and then copy source animation curve content into current animation curve.
void  Replace (HKFCurve pSource, KTime pStart=KTIME_MINUS_INFINITE, KTime pStop=KTIME_INFINITE, bool pUseExactGivenSpan=false, bool pKeyStartEndOnNoKey=true, KTime pTimeSpanOffset=KTIME_ZERO)
  Replace keys within a range in current animation curve with keys found in a source animation curve for the same time range.
void  ReplaceForQuaternion (HKFCurve pSource, KTime pStart, KTime pStop, kFCurveDouble pScaleStart, kFCurveDouble pScaleStop, bool pUseExactGivenSpan=false, bool pKeyStartEndOnNoKey=true, KTime pTimeSpanOffset=KTIME_ZERO)
  Replace keys within a range in current animation curve with keys found in a source animation curve.
void  ReplaceForEulerXYZ (HKFCurve pSource, KTime pStart, KTime pStop, kFCurveDouble pAddFromStart, kFCurveDouble pAddAfterStop, bool pValueSubOffsetAfterStart, bool pValueSubOffsetAfterStop, bool pUseExactGivenSpan=false, bool pKeyStartEndOnNoKey=true, KTime pTimeSpanOffset=KTIME_ZERO)
  Replace keys within a range in current animation curve with keys found in a source animation curve.
void  Insert (HKFCurve pSource, KTime pInsertTime, kFCurveDouble pFirstKeyLeftDerivative, bool pFirstKeyIsWeighted=false, kFCurveDouble pFirstKeyWeight=KFCURVE_DEFAULT_WEIGHT)
  Insert all keys found in a source animation curve in current animation curve.
void  Insert (HKFCurve pSource, KTime pInsertTime, KFCurveTangeantInfo pFirstKeyLeftDerivative)
  Insert all keys found in a source animation curve in current animation curve.
bool  Delete (kFCurveIndex pStartIndex, kFCurveIndex pStopIndex)
  Delete keys within an index range.
bool  Delete (KTime pStart=KTIME_MINUS_INFINITE, KTime pStop=KTIME_INFINITE, bool pInclusive=false)
  Delete keys within a time range.
void  ExtractKeysIndex (KArrayTemplate< int > &pArray, int pMinIndex, int pMaxIndex, double pMinValue=-K_DOUBLE_MAX, double pMaxValue=K_DOUBLE_MAX)
  Extract all keys in the given selection span.

Member Enumeration Documentation


Constructor & Destructor Documentation

KFCurve ( )

Constructor. Use FbxSdkNew<KFCurve> instead, to ensure that the FBX memory allocators are used.

virtual ~KFCurve ( ) [virtual]

Destructor. Use Destroy instead, to ensure that the FBX memory allocators are used.


Member Function Documentation

void Destroy ( int  Local = 0 )

Destructor, for KFCurve created using FbxSdkNew.

Parameters:
Local Unused.
float* GetColor ( )

Get animation curve color.

Returns:
Pointer to an array of 3 elements: RGB values on a scale from 0 to 1.
void SetColor ( const float *  pColor )

Set animation curve color.

Parameters:
pColor Pointer to an array of 3 elements: RGB values on a scale from 0 to 1.
void SetValue ( kFCurveDouble  pValue )

Set the animation curve's default value.

Default value is used when there is no key in the animation curve.

Parameters:
pValue Default value.
KFBX_FCURVE_INLINE kFCurveDouble GetValue ( ) const

Get the animation curve's default value.

Default value is used when there is no key in the animation curve.

Returns:
Default value.
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3244 of file kfcurve.h.

{
    return mValue;
}
void ResizeKeyBuffer ( int  pKeyCount,
bool  pResetKeyCount = false 
)

Resize animation curve buffer to hold a certain number of keys.

Parameters:
pKeyCount Number of keys the animation curve will eventually hold.
pResetKeyCount If true, key count will be reset to 0
void KeyModifyBegin ( )

Call this function prior to adding, removing or editing keys of an animation curve.

Call function KFCurve::KeyModifyEnd() after modification.

void KeyModifyEnd ( )

Call this function after adding, removing or editing keys of an animation curve.

Function KFCurve::KeyModifyBegin() must have been called prior to modifying the keys.

int KeyGetCount ( ) const

Get the number of keys.

Returns:
Key count.
Examples:
ImportScene/DisplayAnimation.cxx.
int KeyGetSelectionCount ( ) const

Get the number of selected keys.

void KeySelectAll ( )

Select all keys.

void KeyUnselectAll ( )

All keys become not selected.

KFCurveKey KeyGet ( kFCurveIndex  pIndex ) const

Get key at given index.

Parameters:
pIndex Index of the key on the animation curve.
Returns:
Pointer to the key at the given index. Result is undetermined if animation curve has no key or if index is out of bounds.
void KeyClear ( )

Remove all the keys of the animation curve and free buffer memory.

void KeyShrink ( )

Minimize use of buffer memory.

Use this method after a lot of changes have been made to keys, on an animation curve with a lot of keys.

bool KeySet ( kFCurveIndex  pIndex,
KFCurveKey pKey 
)

Set (or replace) key at given index with given key.

Result is undetermined if animation curve has no key or if index is out of bounds.

Parameters:
pIndex Index of the key to be set or replaced.
pKey New key at this index.
Returns:
true if key time is superior to previous key time and inferior to next key time, false otherwise.
bool KeySet ( kFCurveIndex  pIndex,
KFCurve pSourceCurve,
int  pSourceIndex 
)

Set (or replace) key at given index with key from another curve, at given source index.

Result is undetermined if one of the animation curves has no key, or if one of the indices is out of bounds.

Parameters:
pIndex Index of the key to be set or replaced.
pSourceCurve Source animation curve for the new key.
pSourceIndex Index to select the new key in the source animation curve.
Returns:
true if key time is superior to previous key time and inferior to next key time, false otherwise.
int KeyMove ( kFCurveIndex  pIndex,
KTime  pTime 
)

Change time of key found at given index.

The new key index is computed and returned.

Parameters:
pIndex Index of key to move.
pTime Destination time.
Returns:
New index of moved key. Result is undetermined if animation curve has no key or if index is out of bounds.
bool KeyMoveOf ( bool  pSelectedOnly,
KTime  pDeltaTime,
kFCurveDouble  pDeltaValue 
)

Add time and value offsets to keys (all keys or only keys that are selected).

Note:
The keys might have different indices after this method is called, but the new indices are not returned.
Parameters:
pSelectedOnly If set to true, only keys that have their selection flag set are affected. If set to false, all keys are affected.
pDeltaTime Time offset added to keys.
pDeltaValue Value offset added to keys.
Returns:
true on success, false otherwise.
bool KeyMoveValueTo ( bool  pSelectedOnly,
kFCurveDouble  pValue 
)

Set value of keys (all keys or only keys that are selected).

Parameters:
pSelectedOnly If set to true, only selected keys are affected. Otherwise, all keys are affected.
pValue New key value.
Returns:
true on success, false otherwise.
bool KeyScaleValue ( bool  pSelectedOnly,
kFCurveDouble  pMultValue 
)

Scale value of keys (all keys or only keys that are selected).

Parameters:
pSelectedOnly If set to true, only selected keys are affected. Otherwise, all keys are affected.
pMultValue Scale applied on key values.
Returns:
true on success, false otherwise.
bool KeyScaleTangeant ( bool  pSelectedOnly,
kFCurveDouble  pMultValue 
)

Scale tangent of keys (all keys or only keys that are selected).

Parameters:
pSelectedOnly If set to true, only selected keys are affected. Otherwise, all keys are affected.
pMultValue Scale applied on key tangents.
Returns:
true on success, false otherwise.
bool KeyScaleValueAndTangeant ( bool  pSelectedOnly,
kFCurveDouble  pMultValue 
)

Scale value and tangent of keys (all keys or only keys that are selected).

Parameters:
pSelectedOnly If set to true, only selected keys are affected. Otherwise, all keys are affected.
pMultValue Scale applied on key values and tangents.
Returns:
true on success, false otherwise.
bool KeyRemove ( kFCurveIndex  pIndex )

Remove key at given index.

Other key indices are updated automatically.

Parameters:
pIndex Index of key to remove.
Returns:
true on success, false otherwise.
int KeyInsert ( KTime  pTime,
kFCurveIndex pLast = NULL 
)

Insert a key at given time.

This function should be used instead of KFCurve::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.

Parameters:
pTime Time of the new key.
pLast Key index 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.
Returns:
Index of the key at given time, no matter if it was inserted or already present. Key value must be set explicitly afterwards. The interpolation type and tangent mode are copied from the previous key.
int KeyAdd ( KTime  pTime,
KFCurveKey pKey,
kFCurveIndex pLast = NULL 
)

Add a given key at given time.

The new key is appended after all the other animation curve's keys. Function KFCurve::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.

Parameters:
pTime Time of the new key.
pKey Key to add.
pLast Key index 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.
Returns:
Index of the key at given time, no matter if it was added or already present. Key value, interpolation type and tangent mode must be set explicitly afterwards.
int KeyAdd ( KTime  pTime,
KFCurve pSourceCurve,
int  pSourceIndex,
kFCurveIndex pLast = NULL 
)

Add a key from another curve at given time.

The new key is appended after all the other animation curve's keys. Function KFCurve::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.

Parameters:
pTime Time of the new key.
pSourceCurve Source animation curve of the new key.
pSourceIndex Index of the new key in the source animation curve.
pLast Key index 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.
Returns:
Index of the key at given time, no matter if it was added or already present. Key value, interpolation type and tangent mode must be set explicitly afterwards.
int KeyAdd ( KTime  pTime,
kFCurveIndex pLast = NULL 
)

Add a key at given time.

The new key is appended after all the other animation curve's keys. Function KFCurve::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.

Parameters:
pTime Time of the new key.
pLast Key index 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.
Returns:
Index of the key at given time, no matter if it was added or already present. Key value, interpolation type and tangent mode must be set explicitly afterwards.
int KeyAppend ( KTime  pAtTime,
KFCurve pSourceCurve,
int  pSourceIndex 
)

Append a key at the end of the animation curve.

Parameters:
pAtTime Time of appended key, must be superior to the last key time.
pSourceCurve Source curve.
pSourceIndex Index of the source key in the source curve.
Returns:
Index of appended key or -1 if pAtTime is inferior to the last key's time.
int KeyAppendFast ( KTime  pTime,
kFCurveDouble  pValue 
)

To be deprecated: Append a key at the end of the animation curve.

Parameters:
pTime Time of appended key, must be superior to the last key time.
pValue Value of appended key.
Returns:
Index of appended key or -1 if pTime is inferior to the last key's time. Interpolation type of the appended key is set to KFCURVE_INTERPOLATION_CUBIC and tangent mode is set to KFCURVE_TANGEANT_AUTO.
Remarks:
Subject to become deprecated.
double KeyFind ( KTime  pTime,
kFCurveIndex pLast = NULL 
)

Find key index for a given time.

Parameters:
pTime Time of the key looked for.
pLast Key index 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.
Returns:
Key index. The integer part of the key index gives the index of the closest key with a smaller time. The decimals give the relative position of given time compared to previous and next key times. Returns -1 if animation curve has no key.

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.

KFBX_FCURVE_INLINE void KeySet ( kFCurveIndex  pKeyIndex,
KTime  pTime,
kFCurveDouble  pValue,
kFCurveInterpolation  pInterpolation = KFCURVE_INTERPOLATION_CUBIC,
kFCurveTangeantMode  pTangentMode = KFCURVE_TANGEANT_AUTO,
kFCurveDouble  pRightSlope = 0.0,
kFCurveDouble  pNextLeftSlope = 0.0,
kFCurveTangeantWeightMode  pTangentWeightMode = KFCURVE_WEIGHTED_NONE,
kFCurveDouble  pWeight0 = KFCURVE_DEFAULT_WEIGHT,
kFCurveDouble  pWeight1 = KFCURVE_DEFAULT_WEIGHT,
kFCurveDouble  pVelocity0 = KFCURVE_DEFAULT_VELOCITY,
kFCurveDouble  pVelocity1 = KFCURVE_DEFAULT_VELOCITY 
)

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 KFCurve::SetTCB() in the specific case of setting a key with cubic interpolation and TCB tangent mode.

Parameters:
pKeyIndex Index of the key.
pTime Key time.
pValue Key value.
pInterpolation Key interpolation type. Interpolation types are: KFCURVE_INTERPOLATION_CONSTANT, KFCURVE_INTERPOLATION_LINEAR, KFCURVE_INTERPOLATION_CUBIC (default).
pTangentMode Key tangent mode (meaningful for cubic interpolation only). Valid tangent modes are: KFCURVE_TANGEANT_AUTO (default), KFCURVE_TANGEANT_USER, KFCURVE_TANGEANT_BREAK.
pRightSlope Value of right derivative.
pNextLeftSlope Value of next left slope.
pTangentWeightMode Weight mode, if used. Weight modes are: KFCURVE_WEIGHTED_NONE (default), KFCURVE_WEIGHTED_RIGHT, KFCURVE_WEIGHTED_NEXT_LEFT, KFCURVE_WEIGHTED_ALL.
pWeight0 Weight for right slope, if tangent weight mode is KFCURVE_WEIGHTED_RIGHT or KFCURVE_WEIGHTED_ALL.
pWeight1 Weight for next left slope, if tangent weight mode is KFCURVE_WEIGHTED_NEXT_LEFT or KFCURVE_WEIGHTED_ALL.
pVelocity0 Velocity for right slope, if tangent velocity mode is KFCURVE_VELOCITY_RIGHT or KFCURVE_VELOCITY_ALL.
pVelocity1 Velocity for next left slope, if tangent velocity mode is KFCURVE_VELOCITY_NEXT_LEFT or KFCURVE_VELOCITY_ALL.

Definition at line 3340 of file kfcurve.h.

{
    KPriFCurveKey *lPriKey = InternalPriKeyGetPtr(pKeyIndex);
    lPriKey->Set(pTime, pValue);
    KPriFCurveKeyAttr lKeyAttr;
    lKeyAttr.mFlags = 0;
    if (lPriKey->mAttr)
        lKeyAttr.mFlags = lPriKey->mAttr->mFlags;
    lKeyAttr.Set( pInterpolation, pTangentMode, pRightSlope, pNextLeftSlope, pTangentWeightMode, pWeight0, pWeight1, pVelocity0, pVelocity1);

    KeyAttrSet(pKeyIndex, lKeyAttr);
}
KFBX_FCURVE_INLINE void KeySetTCB ( kFCurveIndex  pKeyIndex,
KTime  pTime,
kFCurveDouble  pValue,
float  pData0 = 0.0f,
float  pData1 = 0.0f,
float  pData2 = 0.0f 
)

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.

Parameters:
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.

Definition at line 3367 of file kfcurve.h.

{
    InternalPriKeyGetPtr(pKeyIndex)->Set(pTime, pValue);
    KPriFCurveKeyAttr lKeyAttr;
    lKeyAttr.SetTCB(pData0, pData1, pData2);

    KeyAttrSet(pKeyIndex, lKeyAttr);
}
KFBX_FCURVE_INLINE kFCurveInterpolation KeyGetInterpolation ( kFCurveIndex  pKeyIndex ) const

Get key's interpolation type.

Interpolation types are: KFCURVE_INTERPOLATION_CONSTANT Constant value until next key. KFCURVE_INTERPOLATION_LINEAR Linear progression to next key. KFCURVE_INTERPOLATION_CUBIC Cubic progression to next key.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Interpolation type of the queried key.
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3383 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetInterpolation();
}
KFBX_FCURVE_INLINE void KeySetInterpolation ( kFCurveIndex  pKeyIndex,
kFCurveInterpolation  pInterpolation 
)

Set key's interpolation type.

Interpolation types are: KFCURVE_INTERPOLATION_CONSTANT Constant value until next key. KFCURVE_INTERPOLATION_LINEAR Linear progression to next key. KFCURVE_INTERPOLATION_CUBIC Cubic progression to next key.

Parameters:
pKeyIndex Index of the key.
pInterpolation Key interpolation type.

Definition at line 3391 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        if ( lKey->mAttr->GetInterpolation() != pInterpolation)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetInterpolation(pInterpolation);
            CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
bool IsKeyInterpolationPureCubicAuto ( kFCurveIndex  pKeyIndex )

Returns true if interpolation is cubic and the tangents and weightings are untouched (default values).

Parameters:
pKeyIndex Index of the key to test.
Returns:
Returns true if the interpolation is a pure cubic auto.
KFBX_FCURVE_INLINE kFCurveConstantMode KeyGetConstantMode ( kFCurveIndex  pKeyIndex ) const

Get key's constant mode.

Note:
This method is only relevant if the key's interpolation type is constant (KFCURVE_INTERPOLATION_CONSTANT). Using this method on a key with an other interpolation type will return unpredictable value. Constant modes are: KFCURVE_CONSTANT_STANDARD Curve value is constant between this key and the next KFCURVE_CONSTANT_NEXT Curve value is constant, with next key's value
Parameters:
pKeyIndex Index of the queried key.
Returns:
Key constant mode.
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3409 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetConstantMode();
}
KFBX_FCURVE_INLINE kFCurveTangeantMode KeyGetTangeantMode ( kFCurveIndex  pKeyIndex,
bool  pIncludeOverrides = false 
) const

Get key's tangent mode.

Parameters:
pKeyIndex The key index.
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. Tangent modes are: KFCURVE_TANGEANT_AUTO Auto key (spline cardinal). KFCURVE_TANGEANT_TCB Spline TCB (Tension, Continuity, Bias) KFCURVE_TANGEANT_USER Next slope at the left equal to slope at the right. KFCURVE_TANGEANT_BREAK Independent left and right slopes, with next slope at the left equal to slope at the right. KFCURVE_TANGEANT_AUTO_BREAK Independent left and right slopes, with auto key.
Returns:
Key tangent mode.
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3417 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetTangeantMode( pIncludeOverrides );
}
KFBX_FCURVE_INLINE kFCurveTangeantWeightMode KeyGetTangeantWeightMode ( kFCurveIndex  pKeyIndex ) const

Get key's tangent weight mode.

This method is meaningful for cubic interpolation only. Tangent weight modes are: KFCURVE_WEIGHTED_NONE Tangent has default weights of 0.333; we define this state as not weighted. KFCURVE_WEIGHTED_RIGHT Right tangent is weighted. KFCURVE_WEIGHTED_NEXT_LEFT Left tangent is weighted. KFCURVE_WEIGHTED_ALL Both left and right tangents are weighted.

Parameters:
pKeyIndex The key index.
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3425 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetTangeantWeightMode();
}
KFBX_FCURVE_INLINE kFCurveTangeantVelocityMode KeyGetTangeantVelocityMode ( kFCurveIndex  pKeyIndex ) const

Get key's tangent velocity mode.

This method is meaningful for cubic interpolation only. Tangent velocity modes are: KFCURVE_VELOCITY_NONE No velocity (default). KFCURVE_VELOCITY_RIGHT Right tangent has velocity. KFCURVE_VELOCITY_NEXT_LEFT Left tangent has velocity. KFCURVE_VELOCITY_ALL Both left and right tangents have velocity.

Parameters:
pKeyIndex The key index.
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3433 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetTangeantVelocityMode();
}
KFBX_FCURVE_INLINE void KeySetConstantMode ( kFCurveIndex  pKeyIndex,
kFCurveConstantMode  pMode 
)

Set key's constant mode.

This method is meaningful for constant interpolation only.

Parameters:
pKeyIndex Index of the key.
pMode Key constant mode. Constant modes are: KFCURVE_CONSTANT_STANDARD Curve value is constant between this key and the next KFCURVE_CONSTANT_NEXT Curve value is constant, with next key's value

Definition at line 3441 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        if (lKey->mAttr->GetConstantMode() != pMode)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetConstantMode(pMode);
            CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE void KeySetTangeantMode ( kFCurveIndex  pKeyIndex,
kFCurveTangeantMode  pTangent,
bool  pIgnoreAutoTimeIndepedentConversion = false 
)

Set key's tangent mode.

This method is meaningful for cubic interpolation only.

Parameters:
pKeyIndex Index of the key.
pTangent Key tangent mode. Tangent modes are: KFCURVE_TANGEANT_AUTO Auto key (spline cardinal). KFCURVE_TANGEANT_TCB Spline TCB (Tension, Continuity, Bias) KFCURVE_TANGEANT_USER Next slope at the left equal to slope at the right. KFCURVE_TANGEANT_BREAK Independent left and right slopes, with next slope at the left equal to slope at the right. KFCURVE_TANGEANT_AUTO_BREAK Independent left and right slopes, with auto key.
pIgnoreAutoTimeIndepedentConversion true ignore the auto time independent conversion flag.

Definition at line 3459 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    // Avoid call expensive CallbackAddEvent() and KeyAttrSeparate(). 
    // We need to test if the flag value will be really changed.
    // but there is not easy way to tell that change for this operation,
    // so we need to performance special "try and swap" technique.
    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        kUInt32 lFlags = lKey->mAttr->mFlags;
        lKey->mAttr->SetTangeantMode(pTangent, pIgnoreAutoTimeIndepedentConversion); //only affect mFlags

        if (lKey->mAttr->mFlags != lFlags)
        {
            if (lKey->mAttr->GetRefCount() > 1)
            {
                kUInt32 lSwapFlags = lKey->mAttr->mFlags;
                lKey->mAttr->mFlags = lFlags; //Restore previous attr flag for other keys.
                KeyAttrSeparate(pKeyIndex);
                lKey->mAttr->mFlags = lSwapFlags;
            }
            CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE void KeySetTangeantWeightMode ( kFCurveIndex  pKeyIndex,
kFCurveTangeantWeightMode  pTangentWeightMode,
kFCurveTangeantWeightMode  pMask = KFCURVE_WEIGHTED_ALL 
)

Set key's tangent weight mode as double value (cubic interpolation, non TCB tangent mode).

This method is meaningful for cubic interpolation only.

Parameters:
pKeyIndex Index of the key.
pTangentWeightMode Weight mode. Values are: KFCURVE_WEIGHTED_NONE Tangent has default weights of 0.333; we define this state as not weighted. KFCURVE_WEIGHTED_RIGHT Right tangent is weighted. KFCURVE_WEIGHTED_NEXT_LEFT Left tangent is weighted. KFCURVE_WEIGHTED_ALL Both left and right tangents are weighted.
pMask Used to select the affected tangents Mask values are: KFCURVE_WEIGHTED_RIGHT, KFCURVE_WEIGHTED_NEXT_LEFT, KFCURVE_WEIGHTED_ALL

Definition at line 3489 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    // Avoid call expensive CallbackAddEvent() and KeyAttrSeparate(). 
    // We need to test if the flag value will be really changed.
    // but there is not easy way to tell that change for this operation,
    // so we need to performance special "try and swap" technique.
    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        kUInt32 lFlags = lKey->mAttr->mFlags;
        lKey->mAttr->SetTangeantWeightMode(pTangentWeightMode, pMask); //only affect mFlags
        if (lKey->mAttr->mFlags != lFlags)
        {
           if (lKey->mAttr->GetRefCount() > 1)
           {
              kUInt32 lSwapFlags = lKey->mAttr->mFlags;
              lKey->mAttr->mFlags = lFlags; //Restore previous attr flag for other keys.
              KeyAttrSeparate(pKeyIndex);
              lKey->mAttr->mFlags = lSwapFlags;
           }
            CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE void KeySetTangeantVelocityMode ( kFCurveIndex  pKeyIndex,
kFCurveTangeantVelocityMode  pTangentVelocityMode,
kFCurveTangeantVelocityMode  pMask = KFCURVE_VELOCITY_ALL 
)

Set key's tangent velocity mode as double value (cubic interpolation, non TCB tangent mode).

This method is meaningful for cubic interpolation only.

Parameters:
pKeyIndex Index of the key.
pTangentVelocityMode Velocity mode. Values are: KFCURVE_VELOCITY_NONE No velocity (default). KFCURVE_VELOCITY_RIGHT Right tangent has velocity. KFCURVE_VELOCITY_NEXT_LEFT Left tangent has velocity. KFCURVE_VELOCITY_ALL Both left and right tangents have velocity.
pMask Used to select the affected tangents. Mask values are: KFCURVE_VELOCITY_RIGHT, KFCURVE_VELOCITY_NEXT_LEFT, KFCURVE_VELOCITY_ALL.

Definition at line 3518 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    // Avoid call expensive CallbackAddEvent() and KeyAttrSeparate(). 
    // We need to test if the flag value will be really changed.
    // but there is not easy way to tell that change for this operation,
    // so we need to performance special "try and swap" technique.
    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        kUInt32 lFlags = lKey->mAttr->mFlags;
        lKey->mAttr->SetTangeantVelocityMode(pTangentVelocityMode, pMask); //only affect mFlags
        if (lKey->mAttr->mFlags != lFlags)
        {
           if (lKey->mAttr->GetRefCount() > 1)
           {
              kUInt32 lSwapFlags = lKey->mAttr->mFlags;
              lKey->mAttr->mFlags = lFlags; //Restore previous attr flag for other keys.
              KeyAttrSeparate(pKeyIndex);
              lKey->mAttr->mFlags = lSwapFlags;
           }
            CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE kFCurveDouble KeyGetDataDouble ( kFCurveIndex  pKeyIndex,
EKFCurveDataIndex  pIndex 
) const

Get key data as double value (cubic interpolation, non TCB tangent mode).

Using this method for other than cubic interpolated key (linear, constant) will return unpredictable values. Slope data is inconsistent for automatic tangent mode. Use KFCurve::EvaluateLeftDerivative() and KFCurve::EvaluateRightDerivative() to find slope values. For a TCB tangent mode key, use KFCurve::KeyGetDataFloat() instead.

Parameters:
pKeyIndex Index of the queried key.
pIndex Data index: KFCURVEKEY_RIGHT_SLOPE Index of the right derivative KFCURVEKEY_NEXT_LEFT_SLOPE Index of the left derivative for the next key. KFCURVEKEY_RIGHT_WEIGHT Index of weight on right tangent. KFCURVEKEY_NEXT_LEFT_WEIGHT Index of weight on next key's left tangent.
Returns:
Slope value or weight value.

Definition at line 3547 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetDataDouble(pIndex);
}
KFBX_FCURVE_INLINE void KeySetDataDouble ( kFCurveIndex  pKeyIndex,
EKFCurveDataIndex  pIndex,
kFCurveDouble  pValue 
)

Set data as double value (cubic interpolation, non TCB tangent mode).

Slope data is inconsistent for automatic tangent mode. Therefore, it is irrelevant to use this method on automatic tangent mode keys. Using this method for other than cubic interpolated key (linear, constant) is irrelevant. For a TCB tangent mode key, use KFCurve::SetDataFloat() instead.

Parameters:
pKeyIndex Index of the key.
pIndex Data index: KFCURVEKEY_RIGHT_SLOPE Index of the right derivative KFCURVEKEY_NEXT_LEFT_SLOPE Index of the left derivative for the next key. KFCURVEKEY_RIGHT_WEIGHT Index of weight on right tangent. KFCURVEKEY_NEXT_LEFT_WEIGHT Index of weight on next key's left tangent.
pValue The data value to set (a slope or a weight).

Definition at line 3555 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        if (lKey->mAttr->GetDataDouble(pIndex) != pValue)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetDataDouble(pIndex, pValue);
            CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE float KeyGetDataFloat ( kFCurveIndex  pKeyIndex,
EKFCurveDataIndex  pIndex 
) const

Get key data in the case of a cubic interpolation with TCB tangent mode.

Using this method for any key but a cubic interpolated, in TCB tangent mode, will return unpredictable values.

Parameters:
pKeyIndex Index of the key.
pIndex Data index: either KFCURVEKEY_TCB_TENSION Tension KFCURVEKEY_TCB_CONTINUITY Continuity, or KFCURVEKEY_TCB_BIAS Bias.
Returns:
Key data value.

Definition at line 3573 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetDataFloat(pIndex);
}
KFBX_FCURVE_INLINE void KeySetDataFloat ( kFCurveIndex  pKeyIndex,
EKFCurveDataIndex  pIndex,
float  pValue 
)

Set data value in the case of a cubic interpolation with TCB tangent mode.

Using this method for any key but a cubic interpolated, in TCB tangent mode, will return unpredictable values.

Parameters:
pKeyIndex Index of the key.
pIndex Data index, either KFCURVEKEY_TCB_TENSION Tension KFCURVEKEY_TCB_CONTINUITY Continuity, or KFCURVEKEY_TCB_BIAS Bias.
pValue Data value to set.

Definition at line 3581 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        if (lKey->mAttr->GetDataFloat(pIndex) != pValue)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetDataFloat(pIndex, pValue);
            CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE const float * KeyGetDataPtr ( kFCurveIndex  pKeyIndex ) const

Get key data as a pointer.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Data as a float array.

Definition at line 3599 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetDataPtr();
}
KFBX_FCURVE_INLINE kFCurveDouble KeyGetValue ( kFCurveIndex  pKeyIndex ) const

Get key value.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Key value.
Remarks:
kFCurveDouble is defined as float.
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3607 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyGetPtr(pKeyIndex)->GetValue();
}
KFBX_FCURVE_INLINE void KeySetValue ( kFCurveIndex  pKeyIndex,
kFCurveDouble  pValue 
)

Set key value.

Parameters:
pKeyIndex Index of the key.
pValue The value to set.
Remarks:
kFCurveDouble is defined as float.

Definition at line 3615 of file kfcurve.h.

{
    InternalPriKeyGetPtr(pKeyIndex)->SetValue(pValue);
    CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITVALUE, pKeyIndex);
}
KFBX_FCURVE_INLINE void KeyIncValue ( kFCurveIndex  pKeyIndex,
kFCurveDouble  pValue 
)

Increment key value.

Parameters:
pKeyIndex Index of the key.
pValue Term added to the key value.
Remarks:
kFCurveDouble is defined as float.

Definition at line 3621 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    InternalPriKeyGetPtr(pKeyIndex)->IncValue(pValue);
    CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITVALUE, pKeyIndex);
}
KFBX_FCURVE_INLINE void KeyMultValue ( kFCurveIndex  pKeyIndex,
kFCurveDouble  pValue 
)

Multiply key value.

Parameters:
pKeyIndex Index of the key.
pValue Factor multiplying the key value.
Remarks:
kFCurveDouble is defined as float.
See also:
KFCurve::KeyMultTangent.

Definition at line 3630 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    InternalPriKeyGetPtr(pKeyIndex)->MultValue(pValue);
    CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITVALUE, pKeyIndex);
}
KFBX_FCURVE_INLINE void KeyMultTangeant ( kFCurveIndex  pKeyIndex,
kFCurveDouble  pValue 
)

Multiply key tangents.

Remarks:
When multiplying a key value, tangents must be multiplied to conserve the same topology.
kFCurveDouble is defined as float.
Parameters:
pKeyIndex Index of the key.
pValue Factor multiplying the key tangents.

Definition at line 3639 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    if (pValue == 1.0)
    {
       return;
    }
    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex); K_ASSERT(lKey->mAttr != NULL);
    KPriFCurveKey* lKeyNext = NULL;
    if (pKeyIndex < KeyGetCount()-1)
    {
        lKeyNext = InternalPriKeyGetPtr(pKeyIndex+1); 
        K_ASSERT(lKeyNext->mAttr != NULL);
    }

    if (lKey->mAttr)
    {
        if (lKey->mAttr->GetInterpolation() == KFCURVE_INTERPOLATION_CUBIC)
        {
            bool lScaleNextLeft = false;
            switch (lKey->mAttr->GetTangeantMode())
            {                   
            case KFCURVE_TANGEANT_USER:
            case KFCURVE_TANGEANT_BREAK:
                lScaleNextLeft = true;
                KeyAttrSeparateCheck(pKeyIndex);                        
                lKey->mAttr->SetDataDouble(KFCURVEKEY_RIGHT_SLOPE, lKey->mAttr->GetDataDouble(KFCURVEKEY_RIGHT_SLOPE) * pValue);

            case KFCURVE_TANGEANT_AUTO:
            case KFCURVE_TANGEANT_AUTO_BREAK:
                if (lKeyNext)
                {
                    switch (lKeyNext->mAttr->GetTangeantMode())
                    {
                    case KFCURVE_TANGEANT_USER:
                    case KFCURVE_TANGEANT_BREAK:                    
                        lScaleNextLeft = true;
                    }
                }

                if (lScaleNextLeft)
                {
                    lKey->mAttr->SetDataDouble(KFCURVEKEY_NEXT_LEFT_SLOPE, lKey->mAttr->GetDataDouble(KFCURVEKEY_NEXT_LEFT_SLOPE) * pValue);
                    CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
                }
                break;

            case KFCURVE_TANGEANT_TCB:
                // dunno how to handle this
            default:
                // nothing to do
                break;
            }
        }
    }
}
KFBX_FCURVE_INLINE KTime KeyGetTime ( kFCurveIndex  pKeyIndex ) const

Get key time.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Key time (time at which this key is occurring).
Examples:
ImportScene/DisplayAnimation.cxx.

Definition at line 3698 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyGetPtr(pKeyIndex)->GetTime();
}
KFBX_FCURVE_INLINE void KeySetTime ( kFCurveIndex  pKeyIndex,
KTime  pTime 
)

Set key time.

Parameters:
pKeyIndex Index of the key.
pTime Key time (time at which this key is occurring).
Remarks:
The new key time might modify the key index.

Definition at line 3706 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    InternalPriKeyGetPtr(pKeyIndex)->SetTime(pTime);
    CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITTIME, pKeyIndex);
}
KFBX_FCURVE_INLINE void KeyIncTime ( kFCurveIndex  pKeyIndex,
KTime  pTime 
)

Increment key time.

Parameters:
pKeyIndex Index of the key.
pTime Time value by which the key time is incremented.
Remarks:
The new key time might modify the key index.

Definition at line 3715 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    InternalPriKeyGetPtr(pKeyIndex)->IncTime(pTime);
    CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITTIME, pKeyIndex);
}
KFBX_FCURVE_INLINE void KeySetSelected ( kFCurveIndex  pKeyIndex,
bool  pSelected 
)

Select or unselect key.

Some functions can modify either all keys or only selected keys: KFCurve::KeyTangeantSetInterpolation, KFCurve::KeyTangeantSetMode, KFCurve::KeyMoveOf, KFCurve::KeyMoveValueTo, KFCurve::KeyScaleValue, KFCurve::KeyScaleTangeant, KFCurve::KeyScaleValueAndTangeant.

Parameters:
pKeyIndex Index of the key.
pSelected Selection flag.

Definition at line 3724 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        if (lKey->mAttr->GetSelected() != pSelected)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetSelected(pSelected);
            CallbackAddEvent(KFCURVEEVENT_SELECTION, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE bool KeyGetSelected ( kFCurveIndex  pKeyIndex ) const

Return true if key is currently selected, false otherwise.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Selection flag (true or false).

Definition at line 3742 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetSelected();
}
KFBX_FCURVE_INLINE void KeySetMarkedForManipulation ( kFCurveIndex  pKeyIndex,
bool  pMark 
)

Set key's manipulation flag.

Remarks:
To mark a key for manipulation makes sense in the context of a graphical interface. The FBX SDK doesn't have such an interface, and this function is not used in the SDK.
Parameters:
pKeyIndex Index of the key.
pMark Mark this key for manipulation.

Definition at line 3750 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        if (lKey->mAttr->GetMarkedForManipulation() != pMarked)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetMarkedForManipulation(pMarked);
        }
    }
}
KFBX_FCURVE_INLINE bool KeyGetMarkedForManipulation ( kFCurveIndex  pKeyIndex ) const

Return true if key is currently marked for manipulation, false otherwise.

Remarks:
To mark a key for manipulation makes sense in the context of a graphical interface. The FBX SDK doesn't have such an interface, and this function is not used in the SDK.
Parameters:
pKeyIndex Index of the queried key.
Returns:
true if key is marked for manipulation, false otherwise.

Definition at line 3767 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetMarkedForManipulation();
}
KFBX_FCURVE_INLINE void KeySetTangeantVisibility ( kFCurveIndex  pKeyIndex,
kFCurveTangeantVisibility  pVisibility 
)

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.

Parameters:
pKeyIndex Index of the key.
pVisibility Tangent visibility mode. Tangent visibility modes are: KFCURVE_TANGEANT_SHOW_NONE No tangent is visible. KFCURVE_TANGEANT_SHOW_LEFT Left tangent is visible. KFCURVE_TANGEANT_SHOW_RIGHT Right tangent is visible. KFCURVE_TANGEANT_SHOW_BOTH Both left and right tangents are visible.

Definition at line 3775 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);  
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {
        if (lKey->mAttr->GetTangeantVisibility() != pVisibility)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetTangeantVisibility(pVisibility);
            CallbackAddEvent(KFCURVEEVENT_SELECTION, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE kFCurveTangeantVisibility KeyGetTangeantVisibility ( kFCurveIndex  pKeyIndex ) const

Return tangent visibility mode.

This method is relevant for cubic interpolation only.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Tangent visibility mode. Tangent visibility modes are: KFCURVE_TANGEANT_SHOW_NONE No tangent is visible. KFCURVE_TANGEANT_SHOW_LEFT Left tangent is visible. KFCURVE_TANGEANT_SHOW_RIGHT Right tangent is visible. KFCURVE_TANGEANT_SHOW_BOTH Both left and right tangents are visible.

Definition at line 3793 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetTangeantVisibility();
}
KFBX_FCURVE_INLINE void KeySetBreak ( kFCurveIndex  pKeyIndex,
bool  pVal 
)

Set or unset the tangent break.

When this flag is set (KFCURVE_TANGEANT_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 (KFCURVE_TANGEANT_USER) and Auto (KFCURVE_TANGEANT_AUTO) tangent modes only.

Parameters:
pKeyIndex Index of the key.
pVal Break flag (true or false).

Definition at line 3801 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    KPriFCurveKey* lKey = InternalPriKeyGetPtr(pKeyIndex);
    K_ASSERT(lKey->mAttr != NULL);
    if (lKey->mAttr)
    {   
        if (lKey->mAttr->GetBreak() != pVal)
        {
            KeyAttrSeparateCheck(pKeyIndex);
            lKey->mAttr->SetBreak(pVal);
            CallbackAddEvent(KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, pKeyIndex);
        }
    }
}
KFBX_FCURVE_INLINE bool KeyGetBreak ( kFCurveIndex  pKeyIndex ) const

Get if the tangent has a break.

When this flag is set (KFCURVE_TANGEANT_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 (KFCURVE_TANGEANT_USER) and Auto (KFCURVE_TANGEANT_AUTO) tangent modes only.

Parameters:
pKeyIndex Index of the queried key.
Returns:
Break flag (true or false).

Definition at line 3819 of file kfcurve.h.

{
    K_ASSERT(pKeyIndex >= 0);
    K_ASSERT(pKeyIndex < KeyGetCount());

    return InternalPriKeyAttrGetPtr(pKeyIndex)->GetBreak();
}
void KeyTangeantSetInterpolation ( bool  pSelectedOnly,
kFCurveInterpolation  pInterpolation 
)

Set interpolation type on keys.

Modify either all keys or only selected keys.

Parameters:
pSelectedOnly If set to true, only selected keys are affected. Otherwise, all keys are affected.
pInterpolation Interpolation type.
void KeyTangeantSetMode ( bool  pSelectedOnly,
kFCurveTangeantMode  pTangentMode 
)

Set tangent mode on keys.

Modify either all keys or only selected keys.

Parameters:
pSelectedOnly If set to true, only selected keys are affected. Otherwise, all keys are affected.
pTangentMode Tangent mode. Tangent mode is only relevant on keys with a cubic interpolation type. If the key's interpolation type is constant or linear, this function has no effect on the animation curve shape.
kFCurveDouble KeyGetLeftDerivative ( kFCurveIndex  pIndex )

Get the left derivative of a key.

Parameters:
pIndex Index of the queried key.
Returns:
Left derivative (Value over time (s)). Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetLeftDerivative ( kFCurveIndex  pIndex,
kFCurveDouble  pValue 
)

Set the left derivative of a key.

Parameters:
pIndex Index of the key.
pValue Left derivative. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER, KFCURVE_TANGEANT_BREAK or KFCURVE_TANGEANT_AUTO.
kFCurveDouble KeyGetLeftAuto ( kFCurveIndex  pIndex,
bool  pApplyOvershootProtection = false 
)

Get the left auto parametric of a key.

This is used to compute the slope of Auto and User keys.

Parameters:
pIndex Index of the key.
pApplyOvershootProtection Clamp flag (KFCURVE_GENERIC_CLAMP) is taken into account.
Returns:
Left auto parametric. Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetLeftAuto ( kFCurveIndex  pIndex,
kFCurveDouble  pValue 
)

Set the left auto parametric of a key.

This is used to compute the slope of Auto and User keys.

Parameters:
pIndex Index of the key.
pValue Left auto parametric. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER, KFCURVE_TANGEANT_BREAK or KFCURVE_TANGEANT_AUTO.
KFCurveTangeantInfo KeyGetLeftDerivativeInfo ( kFCurveIndex  pIndex )

Get the left derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
pIndex Index of the queried key.
Returns:
Left derivative info. Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetLeftDerivativeInfo ( kFCurveIndex  pIndex,
KFCurveTangeantInfo  pValue,
bool  pForceDerivative = false 
)

Set the left derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
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. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
void KeyIncLeftDerivative ( kFCurveIndex  pIndex,
kFCurveDouble  pInc 
)

Increment the left derivative of a key.

Parameters:
pIndex Index of the key.
pInc Term to add to the left slope. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
kFCurveDouble KeyGetRightDerivative ( kFCurveIndex  pIndex )

Get the right derivative of a key.

Parameters:
pIndex Index of the key.
Returns:
Right derivative (Value over time (s)). Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetRightDerivative ( kFCurveIndex  pIndex,
kFCurveDouble  pValue 
)

Set the right derivative of a key.

Parameters:
pIndex Index of the key.
pValue Right derivative. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER, KFCURVE_TANGEANT_BREAK or KFCURVE_TANGEANT_AUTO.
kFCurveDouble KeyGetRightAuto ( kFCurveIndex  pIndex,
bool  pApplyOvershootProtection = false 
)

Get the right auto parametric of a key.

This is used to compute the slope of Auto and User keys.

Parameters:
pIndex Index of the key.
pApplyOvershootProtection Clamp flag (KFCURVE_GENERIC_CLAMP) is taken into account.
Returns:
Right auto parametric. Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetRightAuto ( kFCurveIndex  pIndex,
kFCurveDouble  pValue 
)

Set the right auto parametric of a key.

This is used to compute the slope of Auto and User keys.

Parameters:
pIndex Index of the key.
pValue Right auto parametric. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER, KFCURVE_TANGEANT_BREAK or KFCURVE_TANGEANT_AUTO.
KFCurveTangeantInfo KeyGetRightDerivativeInfo ( kFCurveIndex  pIndex )

Get the right derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
pIndex Index of the queried key.
Returns:
Right derivative info. Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetRightDerivativeInfo ( kFCurveIndex  pIndex,
KFCurveTangeantInfo  pValue,
bool  pForceDerivative = false 
)

Set the right derivative info (of type KFCurveTangeantInfo) of a key.

Parameters:
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. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
void KeyIncRightDerivative ( kFCurveIndex  pIndex,
kFCurveDouble  pInc 
)

Increment the right derivative of a key.

Parameters:
pIndex Index of the key.
pInc Term to add to the right slope. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
kFCurveDouble KeyGetRightBezierTangeant ( kFCurveIndex  pIndex )

This function is unsupported and subject to be deprecated.

Parameters:
pIndex Index of the queried key.
Returns:
Unknown.
void KeySetLeftBezierTangeant ( kFCurveIndex  pIndex,
kFCurveDouble  pValue 
)

Set the left derivative of a key as a Bezier tangent.

Parameters:
pIndex Index of the key.
pValue Left derivative as a Bezier tangent. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
kFCurveDouble KeyGetLeftBezierTangeant ( kFCurveIndex  pIndex )

This function is unsupported and subject to be deprecated.

Parameters:
pIndex Index of the queried key.
Returns:
Unknown.
void KeySetRightBezierTangeant ( kFCurveIndex  pIndex,
kFCurveDouble  pValue 
)

Set the right derivative of a key as a Bezier tangent.

Parameters:
pIndex Index of the key.
pValue Right derivative as a Bezier tangent. Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
void KeyMultDerivative ( kFCurveIndex  pIndex,
kFCurveDouble  pMultValue 
)

Multiply the derivative of a key.

Both the left and right derivatives are multiplied.

Parameters:
pIndex Index of the key.
pMultValue Value that multiply Derivative Result is undetermined if animation curve has no key or if index is out of bounds. This function is only relevant if key tangent type is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
bool KeyIsLeftTangeantWeighted ( kFCurveIndex  pIndex ) const

Get the left tangent weight mode of a key.

Parameters:
pIndex Index of queried key.
Returns:
true if the key is left weighted (Weight mode is KFCURVE_WEIGHTED_NEXT_LEFT or KFCURVE_WEIGHTED_ALL). false otherwise. Result is undetermined if animation curve has no key or if index is out of bounds.
bool KeyIsRightTangeantWeighted ( kFCurveIndex  pIndex ) const

Get the right tangent weight mode of a key.

Parameters:
pIndex Index of queried key.
Returns:
true if the key is right weighted (Weight mode is KFCURVE_WEIGHTED_RIGHT or KFCURVE_WEIGHTED_ALL). false otherwise. Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetLeftTangeantWeightedMode ( kFCurveIndex  pIndex,
bool  pWeighted 
)

Set the left tangent weight mode of a key (KFCURVE_WEIGHTED_NEXT_LEFT).

Parameters:
pIndex Index of the key.
pWeighted Weighted state of the tangent. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
void KeySetRightTangeantWeightedMode ( kFCurveIndex  pIndex,
bool  pWeighted 
)

Set the right tangent weight mode of a key (KFCURVE_WEIGHTED_RIGHT).

Parameters:
pIndex Index of the key.
pWeighted Weighted state of the tangent. This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
kFCurveDouble KeyGetLeftTangeantWeight ( kFCurveIndex  pIndex ) const

Get the weight value component of the left tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Left tangent weight, or KFCURVE_DEFAULT_WEIGHT (0.333...) if left tangent is not weighted. This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC.
kFCurveDouble KeyGetRightTangeantWeight ( kFCurveIndex  pIndex ) const

Get the weight value component of the right tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Right tangent weight, or KFCURVE_DEFAULT_WEIGHT (0.333...) if right tangent is not weighted. This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC.
void KeySetLeftTangeantWeight ( kFCurveIndex  pIndex,
kFCurveDouble  pWeight,
bool  pAdjustTan = false 
)

Set the left tangent weight of a key.

Parameters:
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. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK. The tangent is automatically set in weighted mode.
Remarks:
The pAdjustTan option will only produce correct results provided that the tangent has already been set before calling this function.
void KeySetRightTangeantWeight ( kFCurveIndex  pIndex,
kFCurveDouble  pWeight,
bool  pAdjustTan = false 
)

Set the right tangent weight of a key.

Parameters:
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. This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK. The tangent is automatically set in weighted mode.
Remarks:
The pAdjustTan option will only produce correct results provided that the tangent has already been set before calling this function.
bool KeyIsLeftTangeantVelocity ( kFCurveIndex  pIndex ) const

Get the left tangent velocity mode of a key.

Parameters:
pIndex Index of the key.
Returns:
true if the key's left tangent has velocity (Velocity mode is KFCURVE_VELOCITY_NEXT_LEFT or KFCURVE_VELOCITY_ALL). Result is undetermined if animation curve has no key or if index is out of bounds.
bool KeyIsRightTangeantVelocity ( kFCurveIndex  pIndex ) const

Get the right tangent velocity mode of a key.

Parameters:
pIndex Index of the key.
Returns:
true if the key's right tangent has velocity (Velocity mode is KFCURVE_VELOCITY_RIGHT or KFCURVE_VELOCITY_ALL). Result is undetermined if animation curve has no key or if index is out of bounds.
void KeySetLeftTangeantVelocityMode ( kFCurveIndex  pIndex,
bool  pVelocity 
)

Set the left tangent velocity mode of a key (KFCURVE_VELOCITY_NEXT_LEFT).

Parameters:
pIndex Index of the key.
pVelocity Velocity state of the tangent This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
void KeySetRightTangeantVelocityMode ( kFCurveIndex  pIndex,
bool  pVelocity 
)

Set the right tangent velocity mode of a key (KFCURVE_VELOCITY_RIGHT).

Parameters:
pIndex Index of the key.
pVelocity Velocity state of the tangent This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK.
kFCurveDouble KeyGetLeftTangeantVelocity ( kFCurveIndex  pIndex ) const

Get the velocity value component of the left tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Tangent velocity of the left tangent. This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC
kFCurveDouble KeyGetRightTangeantVelocity ( kFCurveIndex  pIndex ) const

Get the velocity value component of the right tangent of a key.

Parameters:
pIndex Index of the key.
Returns:
Tangent velocity of the right tangent. This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC
void KeySetLeftTangeantVelocity ( kFCurveIndex  pIndex,
kFCurveDouble  pVelocity 
)

Set the left tangent velocity of a key.

Parameters:
pIndex Index of the key.
pVelocity Value of the velocity for the left tangent. This function is only relevant if previous key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK. The tangent is automatically set in velocity mode.
void KeySetRightTangeantVelocity ( kFCurveIndex  pIndex,
kFCurveDouble  pVelocity 
)

Set the right tangent velocity of a key.

Parameters:
pIndex Index of the key.
pVelocity Value of the velocity for the right tangent. This function is only relevant if key interpolation type is KFCURVE_INTERPOLATION_CUBIC and tangent mode is KFCURVE_TANGEANT_USER or KFCURVE_TANGEANT_BREAK. The tangent is automatically set in velocity mode.
KFBX_FCURVE_INLINE void SetPreExtrapolation ( kFCurveExtrapolationMode  pExtrapolation )

Set pre-extrapolation mode.

Parameters:
pExtrapolation The extrapolation mode to set before the first key.

Definition at line 3250 of file kfcurve.h.

{
    K_ASSERT_MSG(   (pExtrapolation == KFCURVE_EXTRAPOLATION_CONST) || 
        (pExtrapolation == KFCURVE_EXTRAPOLATION_REPETITION) ||
        (pExtrapolation == KFCURVE_EXTRAPOLATION_MIRROR_REPETITION) ||
        (pExtrapolation == KFCURVE_EXTRAPOLATION_KEEP_SLOPE) ,"Wrong extrapolation type." );

    mPreExtrapolation = pExtrapolation; 
    CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, -1);
}
KFBX_FCURVE_INLINE kUInt GetPreExtrapolation ( ) const

Get pre-extrapolation mode.

Definition at line 3262 of file kfcurve.h.

{
    return mPreExtrapolation;
}
KFBX_FCURVE_INLINE void SetPreExtrapolationCount ( kULong  pCount )

Set pre-extrapolation count.

Parameters:
pCount Number of repetitions if pre-extrapolation mode is KFCURVE_EXTRAPOLATION_REPETITION or KFCURVE_EXTRAPOLATION_MIRROR_REPETITION.

Definition at line 3268 of file kfcurve.h.

{
    mPreExtrapolationCount = pCount; 
    CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, -1);
}
KFBX_FCURVE_INLINE kULong GetPreExtrapolationCount ( ) const

Get pre-extrapolation count.

Returns:
Number of repetitions if pre-extrapolation mode is KFCURVE_EXTRAPOLATION_REPETITION or KFCURVE_EXTRAPOLATION_MIRROR_REPETITION.

Definition at line 3275 of file kfcurve.h.

{
    return mPreExtrapolationCount;
}
KFBX_FCURVE_INLINE void SetPostExtrapolation ( kFCurveExtrapolationMode  pExtrapolation )

Set post-extrapolation mode.

Parameters:
pExtrapolation The extrapolation mode to set after the last key.

Definition at line 3282 of file kfcurve.h.

{
    K_ASSERT_MSG(   (pExtrapolation == KFCURVE_EXTRAPOLATION_CONST) || 
        (pExtrapolation == KFCURVE_EXTRAPOLATION_REPETITION) ||
        (pExtrapolation == KFCURVE_EXTRAPOLATION_MIRROR_REPETITION) ||
        (pExtrapolation == KFCURVE_EXTRAPOLATION_KEEP_SLOPE) ,"Wrong extrapolation type." );

    mPostExtrapolation = pExtrapolation; 
    CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, -1);
}
KFBX_FCURVE_INLINE kUInt GetPostExtrapolation ( ) const

Get post-extrapolation mode.

Definition at line 3295 of file kfcurve.h.

{
    return mPostExtrapolation;
}
KFBX_FCURVE_INLINE void SetPostExtrapolationCount ( kULong  pCount )

Set post-extrapolation count.

Parameters:
pCount Number of repetitions if post-extrapolation mode is KFCURVE_EXTRAPOLATION_REPETITION or KFCURVE_EXTRAPOLATION_MIRROR_REPETITION.

Definition at line 3301 of file kfcurve.h.

{
    mPostExtrapolationCount = pCount; 
    CallbackAddEvent (KFCURVEEVENT_KEY | KFCURVEEVENT_EDITOTHER, -1);
}
KFBX_FCURVE_INLINE kULong GetPostExtrapolationCount ( ) const

Get post-extrapolation count.

Returns:
Number of repetitions if post-extrapolation mode is KFCURVE_EXTRAPOLATION_REPETITION or KFCURVE_EXTRAPOLATION_MIRROR_REPETITION.

Definition at line 3308 of file kfcurve.h.

{
    return mPostExtrapolationCount;
}
int KeyGetCountAll ( ) const

Get total number of keys, taking extrapolation into account.

The total number of keys includes repetitions of the animation curve if pre-extrapolation and/or post-extrapolation are of mode KFCURVE_EXTRAPOLATION_REPETITION or KFCURVE_EXTRAPOLATION_MIRROR_REPETITION.

Returns:
Total number of keys, taking extrapolation into account.
double KeyFindAll ( KTime  pTime,
kFCurveIndex pLast = NULL 
)

Find key index for a given time taking extrapolation into account.

Parameters:
pTime Time of the key looked for.
pLast Key index 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.
Returns:
Key index between 0 and KFCurve::KeyGetCount() - 1.The integer part of the key index gives the index of the closest key with a smaller or equal time. The decimals give the relative position of given time compared to previous and next key times. Return -1 if animation curve has no key.
kFCurveDouble Evaluate ( KTime  pTime,
kFCurveIndex pLast = NULL 
)

Evaluate animation curve value at a given time.

Parameters:
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 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.
Returns:
Animation curve value on given time, or animation curve's default value if animation curve has no key. This function takes extrapolation into account.
kFCurveDouble EvaluateIndex ( double  pIndex )

Evaluate animation curve value at a given key index.

Parameters:
pIndex Any value between 0 and KFCurve::KeyGetCount() - 1. If key index is not an integer value, animation curve value is interpolated according to previous key interpolation type and tangent mode, if relevant. This function does not take extrapolation into account.
Returns:
Animation curve value, or default value if animation curve has no key. Result is undetermined if index is out of bounds.
kFCurveDouble EvaluateLeftDerivative ( KTime  pTime,
kFCurveIndex pLast = NULL 
)

Evaluate function left derivative at given time.

Parameters:
pTime Time of evaluation.
pLast Key index 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.
Returns:
Left derivative at given time. This function does not take extrapolation into account. Result is undetermined if index is out of bounds.
kFCurveDouble EvaluateRightDerivative ( KTime  pTime,
kFCurveIndex pLast = NULL 
)

Evaluate function right derivative at given time.

Parameters:
pTime Time of evaluation.
pLast Key index 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.
Returns:
Right derivative at given time. This function does not take extrapolation into account. Result is undetermined if index is out of bounds.
int FindPeaks ( kFCurveIndex  pLeftKeyIndex,
KTime pPeakTime1,
KTime pPeakTime2 
)

Find the peak times between 2 keys (a local minimum and/or maximum).

Parameters:
pLeftKeyIndex Left key index (there must be a right key).
pPeakTime1 First peak time (output).
pPeakTime2 Second peak time (output).
Returns:
Number of peaks found. Result is undetermined if animation curve has no key or if index is out of bounds.
int FindPeaks ( kFCurveIndex  pLeftKeyIndex,
kFCurveDouble pPeak1,
kFCurveDouble pPeak2 
)

Find the peak values between 2 keys (a local minimum and/or maximum).

Parameters:
pLeftKeyIndex Left key index (there must be a right key).
pPeak1 First peak value (output).
pPeak2 Second peak value (output).
Returns:
Number of peaks found. Result is undetermined if animation curve has no key or if index is out of bounds.
int FindPeaks ( kFCurveIndex  pLeftKeyIndex,
KTime pPeakTime1,
kFCurveDouble pPeak1,
KTime pPeakTime2,
kFCurveDouble pPeak2 
)

Find the peak times and values between 2 keys (a local minimum and/or maximum).

Parameters:
pLeftKeyIndex Left key index (there must be a right key).
pPeakTime1 First peak time (output).
pPeak1 First peak value (output).
pPeakTime2 Second peak time (output).
pPeak2 Second peak value (output).
Returns:
Number of peaks found. Result is undetermined if animation curve has no key or if index is out of bounds.
void KeyGetPeriods ( KTime pAveragePeriod,
KTime pMinPeriod,
KTime pMaxPeriod 
)

Get period statistics for keys on this curve.

If pAveragePeriod == pMinPeriod, the data is iso-sampled: the keys are spaced evenly.

Parameters:
pAveragePeriod Average key period (output).
pMinPeriod Minimum period found (output).
pMaxPeriod Maximum period found (output).
HKFCurve Copy ( KTime  pStart = KTIME_MINUS_INFINITE,
KTime  pStop = KTIME_INFINITE 
)

Create a new animation curve and copy keys.

Parameters:
pStart Beginning of time range (not used).
pStop End of time range (not used).
Returns:
Created animation curve.
Remarks:
All keys are always copied. To copy keys in a specific time range, use Replace().
void CopyFrom ( KFCurve pSource,
bool  pWithKeys = true 
)

Clear the current animation curve's keys, and then copy source animation curve content into current animation curve.

Parameters:
pSource Source animation curve.
pWithKeys If true, copy keys from source animation curve. If false, only the parameters specific to the animation curve (default value, extrapolation and color) are copied.
void Replace ( HKFCurve  pSource,
KTime  pStart = KTIME_MINUS_INFINITE,
KTime  pStop = KTIME_INFINITE,
bool  pUseExactGivenSpan = false,
bool  pKeyStartEndOnNoKey = true,
KTime  pTimeSpanOffset = KTIME_ZERO 
)

Replace keys within a range in current animation curve with keys found in a source animation curve for the same time range.

Parameters:
pSource Source animation curve.
pStart Start of time range.
pStop End of time range.
pUseExactGivenSpan If false, time of first and last keys is used (original behavior). If true, pStart and pStop are enforced.
pKeyStartEndOnNoKey Inserts a key at the beginning and at the end of the range if there is no key to insert.
pTimeSpanOffset Time offset to be added: Keys from pSource between pStart and pStop are copied to the current curve between pStart+pTimeSpanOffset and pStop+pTimeSpanOffset.
void ReplaceForQuaternion ( HKFCurve  pSource,
KTime  pStart,
KTime  pStop,
kFCurveDouble  pScaleStart,
kFCurveDouble  pScaleStop,
bool  pUseExactGivenSpan = false,
bool  pKeyStartEndOnNoKey = true,
KTime  pTimeSpanOffset = KTIME_ZERO 
)

Replace keys within a range in current animation curve with keys found in a source animation curve.

The copied keys have their value scaled with a factor varying linearly in time within the given time range.

Parameters:
pSource Source animation curve.
pStart Start of time range.
pStop End of time range.
pScaleStart Scale factor applied at start of time range.
pScaleStop Scale factor applied at end of time range.
pUseExactGivenSpan If false, time of first and last keys is used (original behavior). If true, pStart and pStop are enforced.
pKeyStartEndOnNoKey Inserts a key at the beginning and at the end of the range if there is no key to insert.
pTimeSpanOffset Time offset to be added: Keys from pSource between pStart and pStop are copied to the current curve between pStart+pTimeSpanOffset and pStop+pTimeSpanOffset.
void ReplaceForEulerXYZ ( HKFCurve  pSource,
KTime  pStart,
KTime  pStop,
kFCurveDouble  pAddFromStart,
kFCurveDouble  pAddAfterStop,
bool  pValueSubOffsetAfterStart,
bool  pValueSubOffsetAfterStop,
bool  pUseExactGivenSpan = false,
bool  pKeyStartEndOnNoKey = true,
KTime  pTimeSpanOffset = KTIME_ZERO 
)

Replace keys within a range in current animation curve with keys found in a source animation curve.

Parameters:
pSource Source animation curve.
pStart Start of time range.
pStop End of time range.
pAddFromStart Offset applied to copied key values within the time range.
pAddAfterStop Offset applied to key values after the time range.
pValueSubOffsetAfterStart If true, copied key values within the time range are subtracted from time offset specified by parameter pAddFromStart. If false, copied key values within the time range are added to time offset specified by parameter pAddFromStart.
pValueSubOffsetAfterStop If true, key values after the time range are subtracted from time offset specified by parameter pAddAfterStop. If false, key values after the time range are added to time offset specified by parameter pAddAfterStop.
pUseExactGivenSpan If false, time of first and last keys is used (original behavior). If true, pStart and pStop are enforced.
pKeyStartEndOnNoKey Inserts a key at the beginning and at the end of the range if there is no key to insert
pTimeSpanOffset Time offset to be added: Keys from pSource between pStart and pStop are copied to the current curve between pStart+pTimeSpanOffset and pStop+pTimeSpanOffset.
void Insert ( HKFCurve  pSource,
KTime  pInsertTime,
kFCurveDouble  pFirstKeyLeftDerivative,
bool  pFirstKeyIsWeighted = false,
kFCurveDouble  pFirstKeyWeight = KFCURVE_DEFAULT_WEIGHT 
)

Insert all keys found in a source animation curve in current animation curve.

A time offset is added to copied keys so that the first copied key occurs at the given insertion time. Keys from the source animation curve are merged into the current animation curve. In other words, no existing key in the current function curve is destroyed unless there is an overlap with a copied key.

Parameters:
pSource Source animation curve.
pInsertTime Insert time of the first key found in the source animation curve.
pFirstKeyLeftDerivative First key left derivative.
pFirstKeyIsWeighted First key left weighted state (true if weighted).
pFirstKeyWeight First key left weight
void Insert ( HKFCurve  pSource,
KTime  pInsertTime,
KFCurveTangeantInfo  pFirstKeyLeftDerivative 
)

Insert all keys found in a source animation curve in current animation curve.

A time offset is added to copied keys so that the first copied key occurs at the given insertion time. Keys from the source animation curve are merged into the current animation curve. In other words, no existing key in the current function curve is destroyed unless there is an overlap with a copied key.

Parameters:
pSource Source animation curve.
pInsertTime Insert time of the first key found in the source animation curve.
pFirstKeyLeftDerivative First key left derivative info.
bool Delete ( kFCurveIndex  pStartIndex,
kFCurveIndex  pStopIndex 
)

Delete keys within an index range.

Index range is inclusive. This function is much faster than multiple removes.

Parameters:
pStartIndex Index of first deleted key.
pStopIndex Index of last deleted key.
Returns:
true if the animation curve contains keys, false otherwise. Result is undetermined if animation curve has keys but an index is out of bounds.
bool Delete ( KTime  pStart = KTIME_MINUS_INFINITE,
KTime  pStop = KTIME_INFINITE,
bool  pInclusive = false 
)

Delete keys within a time range.

This function is much faster than multiple removes.

Parameters:
pStart Start of time range.
pStop End of time range.
pInclusive Time range includes the keys at pStart and pStop if true.
Returns:
true if the animation curve contains keys, false otherwise.
void ExtractKeysIndex ( KArrayTemplate< int > &  pArray,
int  pMinIndex,
int  pMaxIndex,
double  pMinValue = -K_DOUBLE_MAX,
double  pMaxValue = K_DOUBLE_MAX 
)

Extract all keys in the given selection span.

Parameters:
pArray Array where to stored found keys.
pMinIndex Index where to start the search (the key at this index is tested).
pMaxIndex Index where to stop the search (the last index is the limit, the key at this index is not tested).
pMinValue Minimal value to consider the key. Keys under that value are not extracted to the array.
pMaxValue Maximal value to consider the key. Keys over that value are not extracted to the array.
bool FbxStore ( KFbx pFbx,
bool  pOnlyDefaults = false,
bool  pColor = true,
FbxStoreVersionID  pVersionID = V7 
)
bool FbxRetrieve ( KFbx pFbx,
bool  pOnlyDefaults = false,
bool  pColor = false 
)
bool FbxInternalRetrieve ( KFbx pFbx,
bool  pOnlyDefaults = false,
bool  pColor = false 
)
void FbxStorePriKeyAndAttrArrays ( KFbx pFbx,
FbxStoreVersionID  pVersionID = V7 
)
void FbxRetrievePriKeyAndAttrArrays ( KFbx pFbx,
int  pKeyVersion 
)
void FbxRetrievePrePostExtrapolation ( KFbx pFbx )
double CandidateEvaluate ( KTime  pTime,
kFCurveIndex pLast = NULL 
)
bool CandidateClear ( )
bool CandidateSet ( KTime  pTime,
double  pValue 
)
bool IsCandidate ( )
double CandidateGet ( )
KTime CandidateGetTime ( )
bool IsLocked ( ) const
bool IsLockedByLayer ( ) const
bool IsLockedByProperty ( ) const
void SetLockedByLayer ( bool  pLocked )
void SetLockedByProperty ( bool  pLocked )
bool CandidateKey ( kFCurveIndex pLast = NULL,
int  pInterpolation = KFCURVE_INTERPOLATION_CUBIC,
int  pTanMode = KFCURVE_TANGEANT_USER,
int  pContinuity = KFCURVE_CONTINUITY,
bool  pTangeantOverride = true,
KTime  pCandidateTime = KTIME_INFINITE,
double  pKeyIndexTolerance = 0.0 
)
bool NormalsSeemsToComeFromAPlot ( )
void SetWasData ( int  pType )
int GetWasData ( ) const
int GuessWasData ( KTime pStart = NULL,
KTime pStep = NULL 
)
void KeyTangeantHide ( )
int GetUpdateId ( ) const
int GetValuesUpdateId ( ) const
void CallbackRegister ( kFCurveCallback  pCallback,
void *  pObject 
)
void CallbackUnregister ( kFCurveCallback  pCallback,
void *  pObject 
)
void CallbackEnable ( bool  pEnable )
void CallbackClear ( )
void CopyExternalPriKeyAndAttr ( void **  pSourceFCurveKeysList,
int  pSourceFCurveKeyCount 
)

Function for faster data transfer between MotionBuilder and FBX SDK.

As of 2009-10-29, MotionBuilder and Fbx (2011 - Turnpike) have the same internal data structure for KFCurve, KPriFCurveKey, and KPriFCurveKeyAttr classes. CopyExternalPriKeyAndAttr takes advantage of this information to move data faster between MotionBuilder and FBX SDK. If there is any internal data structure change for those classes, this function must be modified accordingly.

Parameters:
pSourceFCurveKeysList List of keys (KFCurveKey) to be copied
pSourceFCurveKeyCount Number of keys to be copied
KPriFCurveKey** GetPriFCurveKeysList ( ) const [inline]

Definition at line 2393 of file kfcurve.h.

{ return mFCurveKeysList; }
static void AllocateGlobals ( ) [static]

Static method to allocate and initialize global variables used for KFCurveKey attribute management.

Must be called after the KFbxSdkManager is initialized.

static void FreeGlobals ( ) [static]

Static method to delete global variables used for KFCurveKey attribute management.

Must be called when the last KFbxSdkManager is deleted.


Member Data Documentation

const bool sConvertAutoTimeIndepedent [static]

Automatically convert KFCURVE_INTERPOLATION_CUBIC type auto tangent key to Time-Independent.

Definition at line 2381 of file kfcurve.h.

KFCurveKeyAttrManager* smGlobalKeyAttrMemoryPool [static]

Definition at line 2445 of file kfcurve.h.

Definition at line 2447 of file kfcurve.h.

Definition at line 2448 of file kfcurve.h.


The documentation for this class was generated from the following file:

KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve
KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve KFCurve