FBX C++ API Reference
FbxAnimCurve Class Referenceabstract

#include <fbxanimcurve.h>

Class Description

An animation curve, defined by a collection of keys (FbxAnimCurveKey), 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 FbxAnimCurve::KeyGetCount-1. The time unit in FBX (FbxTime) 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

  • Constant - Curve value stays the same until next key
  • Linear - Animation curve is a straight line
  • Cubic - Animation curve is a Bezier spline

Tangent modes are

  • Auto (Spline cardinal)
  • Spline TCB (Tension, Continuity, Bias)
  • User (Next slope at the left equal to slope at the right)

Tangent modes can be overridden by more tangent options:

  • Break (Independent left and right slopes)
  • Clamp (Key should be flat if next or previous key has the same value)
  • Time independent

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.

Remarks
FbxAnimCurve is now the main animation animation curve object of the SDK. Users should always use this class to handle animation curve.
Note
When adding keys to an animation curve, use FbxAnimCurve::KeyModifyBegin and FbxAnimCurve::KeyModifyEnd. please refer to the following sample code:
FbxTime lTime;
int lKeyIndex = 0;
// Create curve
FbxAnimCurve* lAnimCurve = FbxAnimCurve::Create(pScene, "Cube Animation");
// Add keys to the curve
lAnimCurve->KeyModifyBegin();
// First key: time 0, value 0
lTime.SetSecondDouble(0.0);
lKeyIndex = lAnimCurve->KeyAdd(lTime);
lAnimCurve->KeySet(lKeyIndex, lTime, 0.0, FbxAnimCurveDef::eInterpolationLinear);
// Second key: time 20s, value -3600
// Since this curve will describe rotation, each cube will rotate 10 times around itself during 20 seconds.
lTime.SetSecondDouble(20.0);
lKeyIndex = lAnimCurve->KeyAdd(lTime);
lAnimCurve->KeySet(lKeyIndex, lTime, -3600, FbxAnimCurveDef::eInterpolationLinear);
// Done adding keys.
lAnimCurve->KeyModifyEnd();
Examples:
Animation/main.cxx, Audio/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, ImportScene/DisplayAnimation.cxx, Instances/main.cxx, Pivot/main.cxx, UserProperties/main.cxx, ViewScene/DrawScene.cxx, ViewScene/SceneCache.h, and ViewScene/SetCamera.cxx.

Definition at line 779 of file fbxanimcurve.h.

+ Inheritance diagram for FbxAnimCurve:

Public Types

typedef FbxAnimCurveBase ParentClass
 
- Public Types inherited from FbxAnimCurveBase
typedef FbxObject ParentClass
 
enum  EExtrapolationType {
  eConstant = 1, eRepetition = 2, eMirrorRepetition = 3, eKeepSlope = 4,
  eRelativeRepetition = 5
}
 
- Public Types inherited from FbxObject
typedef FbxEmitter ParentClass
 
enum  EObjectFlag {
  eNone = 0, eInitialized = 1 << 0, eSystem = 1 << 1, eSavable = 1 << 2,
  eSelected = 1 << 3, eHidden = 1 << 4, eContentLoaded = 1 << 5, eDontLocalize = 1 << 6,
  eCopyCalledByClone = 1 << 16
}
 Flags available to control objects. More...
 
enum  ECloneType { eDeepClone, eReferenceClone }
 Types of clones that can be created for FbxObject. More...
 

Public Member Functions

virtual FbxClassId GetClassId () const
 
- Public Member Functions inherited from FbxAnimCurveBase
void SetPreExtrapolation (EExtrapolationType pExtrapolation)
 Set pre-extrapolation mode. More...
 
EExtrapolationType GetPreExtrapolation () const
 Get pre-extrapolation mode. More...
 
void SetPreExtrapolationCount (unsigned long pCount)
 Set pre-extrapolation count. More...
 
unsigned long GetPreExtrapolationCount () const
 Get pre-extrapolation count. More...
 
void SetPostExtrapolation (EExtrapolationType pExtrapolation)
 Set post-extrapolation mode. More...
 
EExtrapolationType GetPostExtrapolation () const
 Get post-extrapolation mode. More...
 
void SetPostExtrapolationCount (unsigned long pCount)
 Set post-extrapolation count. More...
 
unsigned long GetPostExtrapolationCount () const
 Get post-extrapolation count. More...
 
- Public Member Functions inherited from FbxObject
virtual void Compact ()
 Compact the memory used by this object. More...
 
template<class T >
bool Is () const
 Templated test if this class is a hierarchical children of the specified class type. More...
 
FbxManagerGetFbxManager () const
 Retrieve the FbxManager this object belongs to. More...
 
FbxDocumentGetDocument () const
 Returns a const pointer to the document that contains this object. More...
 
FbxDocumentGetRootDocument () const
 Returns a const pointer to the root document that contains this object. More...
 
FbxSceneGetScene () const
 Returns a const pointer to the scene that contains this object. More...
 
void Destroy (bool pRecursive=false)
 Unregister and delete this object from memory. More...
 
void ResetProperties ()
 Reset all the properties of this object to their default values. More...
 
virtual bool GetSelected ()
 Returns if this object is currently in a selected state. More...
 
virtual void SetSelected (bool pSelected)
 Sets whether this object is currently selected. More...
 
void SetUserDataPtr (const FbxUInt64 &pUserID, void *pUserData)
 Sets the data pointer for an user data record whose ID is pUserID. More...
 
void * GetUserDataPtr (const FbxUInt64 &pUserID) const
 Returns the data pointer of an user data record whose ID is pUserID. More...
 
void SetUserDataPtr (void *pUserData)
 Sets the data pointer for the user data record whose ID is the object ID. More...
 
void * GetUserDataPtr () const
 Returns the data pointer of the user data record whose ID is the object ID. More...
 
bool ConnectSrcObject (FbxObject *pObject, FbxConnection::EType pType=FbxConnection::eNone)
 Connects this object to a source object. More...
 
bool IsConnectedSrcObject (const FbxObject *pObject) const
 Judges whether this object connects with the source object. More...
 
bool DisconnectSrcObject (FbxObject *pObject)
 Disconnects this object from a source object. More...
 
bool DisconnectAllSrcObject ()
 Disconnects this object from all source objects. More...
 
bool DisconnectAllSrcObject (const FbxCriteria &pCriteria)
 Disconnects this object from all source objects that satisfy a given criteria. More...
 
int GetSrcObjectCount () const
 Returns the number of source objects with which this object connects. More...
 
int GetSrcObjectCount (const FbxCriteria &pCriteria) const
 Returns the number of source objects that satisfy the given criteria with which this object connects. More...
 
FbxObjectGetSrcObject (int pIndex=0) const
 Returns the source object with which this object connects at the specified index. More...
 
FbxObjectGetSrcObject (const FbxCriteria &pCriteria, int pIndex=0) const
 Returns the source object that satisfies the criteria at the specified index with which this object connects. More...
 
FbxObjectFindSrcObject (const char *pName, int pStartIndex=0) const
 Searches the source object with the specified name, starting at the specified index. More...
 
FbxObjectFindSrcObject (const FbxCriteria &pCriteria, const char *pName, int pStartIndex=0) const
 Searches the source object with the specified name which satisfies the given criteria, starting at the specified index. More...
 
template<class T >
bool DisconnectAllSrcObject ()
 Disconnects this object from all source objects of the specified class type. More...
 
template<class T >
bool DisconnectAllSrcObject (const FbxCriteria &pCriteria)
 Disconnects this object from all source objects that are of the specified class type and that satisfy the given criteria. More...
 
template<class T >
int GetSrcObjectCount () const
 Returns the number of source objects of a specific class type with which this object connects. More...
 
template<class T >
int GetSrcObjectCount (const FbxCriteria &pCriteria) const
 Returns the number of source objects with which this object connects that are the specified class type and that satisfy the given criteria. More...
 
template<class T >
T * GetSrcObject (int pIndex=0) const
 Returns the source object of the specified class type at the specified index. More...
 
template<class T >
T * GetSrcObject (const FbxCriteria &pCriteria, int pIndex=0) const
 Returns the source object that is the specified class type and that satisfies the given criteria at the specified index. More...
 
template<class T >
T * FindSrcObject (const char *pName, int pStartIndex=0) const
 Searches the source object with the specified name that is the specified class type, starting at the specified index. More...
 
template<class T >
T * FindSrcObject (const FbxCriteria &pCriteria, const char *pName, int pStartIndex=0) const
 Searches the source object with the specified name that is the specified class type and that satisfies the given criteria, starting at the specified index. More...
 
bool ConnectDstObject (FbxObject *pObject, FbxConnection::EType pType=FbxConnection::eNone)
 Connects this object to one destination object. More...
 
bool IsConnectedDstObject (const FbxObject *pObject) const
 Judges whether this object connects with the destination object. More...
 
bool DisconnectDstObject (FbxObject *pObject)
 Disconnects this object from the destination object. More...
 
bool DisconnectAllDstObject ()
 Disconnects this object from all destination objects. More...
 
bool DisconnectAllDstObject (const FbxCriteria &pCriteria)
 Disconnects this object from all destination objects that satisfy given criteria. More...
 
int GetDstObjectCount () const
 Returns the number of destination objects with which this object connects. More...
 
int GetDstObjectCount (const FbxCriteria &pCriteria) const
 Returns the number of destination objects with which this object connects that satisfy the given criteria. More...
 
FbxObjectGetDstObject (int pIndex=0) const
 Returns the destination object at the specified index with which this object connects. More...
 
FbxObjectGetDstObject (const FbxCriteria &pCriteria, int pIndex=0) const
 Returns the destination object with which this object connects that satisfies the given criteria at the specified index. More...
 
FbxObjectFindDstObject (const char *pName, int pStartIndex=0) const
 Searches the destination object with the specified name, starting at the specified index. More...
 
FbxObjectFindDstObject (const FbxCriteria &pCriteria, const char *pName, int pStartIndex=0) const
 Searches the destination object with the specified name which satisfies the given criteria, starting at the specified index. More...
 
template<class T >
bool DisconnectAllDstObject ()
 Disconnects this object from all destination objects of the specified class type. More...
 
template<class T >
bool DisconnectAllDstObject (const FbxCriteria &pCriteria)
 Disconnects this object from all destination objects that are the specified class type and that satisfy the given criteria. More...
 
template<class T >
int GetDstObjectCount () const
 Returns the number of destination objects of the specified class type with which this object connects. More...
 
template<class T >
int GetDstObjectCount (const FbxCriteria &pCriteria) const
 Returns the number of destination objects with which this object connects that are the specified class type and that satisfy the given criteria. More...
 
template<class T >
T * GetDstObject (int pIndex=0) const
 Returns the destination object with which this object connects that is the specified class type at the specified index. More...
 
template<class T >
T * GetDstObject (const FbxCriteria &pCriteria, int pIndex=0) const
 Returns the destination object with which this object connects that is the specified class type and that satisfies the given criteria at the specified index. More...
 
template<class T >
T * FindDstObject (const char *pName, int pStartIndex=0) const
 Searches the destination object with the specified name which is of the specified class type, starting at the specified index. More...
 
template<class T >
T * FindDstObject (const FbxCriteria &pCriteria, const char *pName, int pStartIndex=0) const
 Searches the destination object with the specified name that is the specified class type and that satisfies the given criteria, starting at the specified index. More...
 
FbxProperty GetFirstProperty () const
 Returns the first property of this object. More...
 
FbxProperty GetNextProperty (const FbxProperty &pProperty) const
 Returns the next property of this object that follows the specified property. More...
 
FbxProperty FindProperty (const char *pName, bool pCaseSensitive=true) const
 Searches a property by name. More...
 
FbxProperty FindProperty (const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
 Searches a property by name and data type. More...
 
FbxProperty FindPropertyHierarchical (const char *pName, bool pCaseSensitive=true) const
 Searches a property by full name. More...
 
FbxProperty FindPropertyHierarchical (const char *pName, const FbxDataType &pDataType, bool pCaseSensitive=true) const
 Searches a property by full name and data type. More...
 
FbxProperty GetClassRootProperty ()
 Returns the class root property. More...
 
bool ConnectSrcProperty (const FbxProperty &pProperty)
 Connects this object to a source property. More...
 
bool IsConnectedSrcProperty (const FbxProperty &pProperty)
 Determines whether this object connects with the specified source property. More...
 
bool DisconnectSrcProperty (const FbxProperty &pProperty)
 Disconnects this object from the specified source property. More...
 
int GetSrcPropertyCount () const
 Returns the number of source properties with which this object connects. More...
 
FbxProperty GetSrcProperty (int pIndex=0) const
 Returns the source property at the specified index with which this object connects. More...
 
FbxProperty FindSrcProperty (const char *pName, int pStartIndex=0) const
 Searches a source property with which this object connects that has a specific name, starting at the specified index. More...
 
bool ConnectDstProperty (const FbxProperty &pProperty)
 Connects this object to a destination property. More...
 
bool IsConnectedDstProperty (const FbxProperty &pProperty)
 Determines if this object connects with the specified destination property. More...
 
bool DisconnectDstProperty (const FbxProperty &pProperty)
 Disconnects this object from the specified destination property. More...
 
int GetDstPropertyCount () const
 Returns the number of destination properties with which this object connects. More...
 
FbxProperty GetDstProperty (int pIndex=0) const
 Returns the destination property at the specified index with which this object connects. More...
 
FbxProperty FindDstProperty (const char *pName, int pStartIndex=0) const
 Searches a destination property with which this object connects that has a specific name, starting at the specified index. More...
 
int ContentUnload ()
 Unloads this object's content using the offload peripheral that is currently set in the document then flushes it from memory. More...
 
int ContentLoad ()
 Loads this object's content using the offload peripheral that is currently set in the document. More...
 
bool ContentIsLoaded () const
 Judges if this object's content is loaded. More...
 
void ContentDecrementLockCount ()
 Decreases the content lock count of an object. More...
 
void ContentIncrementLockCount ()
 Increases the content lock count of an object. More...
 
bool ContentIsLocked () const
 Judges if this object's content is locked. More...
 
virtual bool ContentWriteTo (FbxStream &pStream) const
 Writes the content of the object to the given stream. More...
 
virtual bool ContentReadFrom (const FbxStream &pStream)
 Reads the content of the object from the given stream. More...
 
void EmitMessage (FbxMessage *pMessage) const
 Emits a message in all available message emitters in the document or SDK manager. More...
 
virtual const char * Localize (const char *pID, const char *pDefault=((void *) 0)) const
 Localization helper function, it calls the implementation of FBX SDK manager. More...
 
FbxLibraryGetParentLibrary () const
 Returns a handle on the parent library of this object. More...
 
bool AddImplementation (FbxImplementation *pImplementation)
 Adds an implementation. More...
 
bool RemoveImplementation (FbxImplementation *pImplementation)
 Removes an implementation. More...
 
bool HasDefaultImplementation (void) const
 Determines if this shading node has a default implementation. More...
 
FbxImplementationGetDefaultImplementation (void) const
 Returns the default implementation of this shading node. More...
 
bool SetDefaultImplementation (FbxImplementation *pImplementation)
 Sets the default implementation of this shading node. More...
 
int GetImplementationCount (const FbxImplementationFilter *pCriteria=((void *) 0)) const
 Returns the number of implementations that satisfy a given criteria. More...
 
FbxImplementationGetImplementation (int pIndex, const FbxImplementationFilter *pCriteria=((void *) 0)) const
 Returns the implementation at the specified index that satisfies the given criteria. More...
 
virtual FbxString GetUrl () const
 Returns the URL of this object. More...
 
virtual bool SetUrl (char *pUrl)
 Sets the URL of this object. More...
 
void SetRuntimeClassId (const FbxClassId &pClassId)
 Set the run-time ClassId for this class. More...
 
FbxClassId GetRuntimeClassId () const
 Retrieve the run-time ClassId for this object. More...
 
bool IsRuntime (const FbxClassId &pClassId) const
 Test if this class is a hierarchical children of the specified class type. More...
 
bool IsRuntimePlug () const
 Find out if the ClassId was registered during run-time rather than at compile time. More...
 
void SetObjectFlags (EObjectFlag pFlags, bool pValue)
 Set the state of object flags. More...
 
bool GetObjectFlags (EObjectFlag pFlags) const
 Get the state of object flags. More...
 
void SetAllObjectFlags (FbxUInt pFlags)
 Override all object flags at once. More...
 
FbxUInt GetAllObjectFlags () const
 Get all object flags at once. More...
 
virtual FbxObjectCopy (const FbxObject &pObject)
 Copy an object content into this object. More...
 
virtual FbxObjectClone (FbxObject::ECloneType pCloneType=eDeepClone, FbxObject *pContainer=((void *) 0), void *pSet=((void *) 0)) const
 Creates a clone of this object. More...
 
bool IsAReferenceTo () const
 Checks if this object is a reference clone of another object. More...
 
FbxObjectGetReferenceTo () const
 If this object is a reference clone, returns the original object (from which the clone originates). More...
 
bool IsReferencedBy () const
 Checks if any objects are reference cloned from this object. More...
 
int GetReferencedByCount () const
 Returns the number of objects that are reference clones of this object. More...
 
FbxObjectGetReferencedBy (int pIndex) const
 Returns a reference clone of this object at the specified index. More...
 
void SetName (const char *pName)
 Sets the name of this object. More...
 
const char * GetName () const
 Returns the full name of this object. More...
 
FbxString GetNameWithoutNameSpacePrefix () const
 Returns the name of the object without the namespace qualifier. More...
 
FbxString GetNameWithNameSpacePrefix () const
 Returns the name of the object with the namespace qualifier. More...
 
void SetInitialName (const char *pName)
 Sets the initial name of the object. More...
 
const char * GetInitialName () const
 Returns the initial name of the object. More...
 
FbxString GetNameSpaceOnly ()
 Returns the namespace of the object. More...
 
void SetNameSpace (FbxString pNameSpace)
 Sets the namespace of the object. More...
 
FbxArray< FbxString * > GetNameSpaceArray (char identifier)
 Returns an array of all the namespaces for this object. More...
 
FbxString GetNameOnly () const
 Returns only the name (no namespace or prefix) of the object. More...
 
FbxString GetNameSpacePrefix () const
 Returns the namespace qualifier. More...
 
const FbxUInt64GetUniqueID () const
 Returns the unique ID of this object. More...
 
- Public Member Functions inherited from FbxEmitter
void AddListener (FbxEventHandler &pHandler)
 Add the specified event handler to current emitter list. More...
 
void RemoveListener (FbxEventHandler &pHandler)
 Remove the specified event handler from current emitter list. More...
 
template<typename EventType >
void Emit (const EventType &pEvent) const
 Emit an event with the specified the event type. More...
 

Static Public Member Functions

static FbxAnimCurveCreate (FbxManager *pManager, const char *pName)
 
- Static Public Member Functions inherited from FbxAnimCurveBase
static FbxAnimCurveBaseCreate (FbxManager *pManager, const char *pName)
 
- Static Public Member Functions inherited from FbxObject
static FbxObjectCreate (FbxManager *pManager, const char *pName)
 
static FbxObjectCreate (FbxObject *pContainer, const char *pName)
 
static FbxString RemovePrefix (char *pName)
 Removes the prefix of pName. More...
 
static FbxString StripPrefix (FbxString &lName)
 Strips the prefix of pName. More...
 
static FbxString StripPrefix (const char *pName)
 Strips the prefix of pName. More...
 

Static Public Attributes

static FbxClassId ClassId
 
- Static Public Attributes inherited from FbxAnimCurveBase
static FbxClassId ClassId
 
- Static Public Attributes inherited from FbxObject
static FbxClassId ClassId
 

Protected Member Functions

virtual ~ FbxAnimCurve ()
 
 FbxAnimCurve (FbxManager &pManager, const char *pName)
 
- Protected Member Functions inherited from FbxAnimCurveBase
virtual ~ FbxAnimCurveBase ()
 
 FbxAnimCurveBase (FbxManager &pManager, const char *pName)
 
- Protected Member Functions inherited from FbxObject
virtual ~ FbxObject ()
 
virtual void Construct (const FbxObject *pFrom)
 Optional constructor override, automatically called by default constructor. More...
 
virtual void ConstructProperties (bool pForceSet)
 Optional property constructor override, automatically called by default constructor. More...
 
virtual void Destruct (bool pRecursive)
 Optional destructor override, automatically called by default destructor. More...
 
virtual void ContentClear ()
 Clears this object's content from memory. More...
 
virtual FbxPeripheralGetPeripheral ()
 Retrieves the peripheral of that object. More...
 

Static Protected Attributes

static FbxObjectCreateProc Allocate
 
- Static Protected Attributes inherited from FbxAnimCurveBase
static FbxObjectCreateProc Allocate
 

Friends

class fbxsdk ::FbxManager
 

Animation curve creation.

static FbxAnimCurveCreate (FbxScene *pContainer, const char *pName)
 Create a FbxAnimCurve. More...
 

Key management.

virtual void ResizeKeyBuffer (int pKeyCount)=0
 Resize animation curve buffer to hold a certain number of keys. More...
 
virtual void KeyModifyBegin ()=0
 Call this function prior to adding, removing or editing keys of an animation curve. More...
 
virtual void KeyModifyEnd ()=0
 Call this function after adding, removing or editing keys of an animation curve. More...
 
virtual void KeyClear ()=0
 Remove all the keys of the animation curve and free buffer memory. More...
 
virtual int KeyGetCount () const =0
 Get the number of keys. More...
 
virtual int KeyAdd (FbxTime pTime, FbxAnimCurveKeyBase &pKey, int *pLast=((void *) 0))=0
 Add a given key at given time. More...
 
virtual int KeyAdd (FbxTime pTime, int *pLast=((void *) 0))=0
 Add a key at given time. More...
 
virtual bool KeySet (int pIndex, FbxAnimCurveKeyBase &pKey)=0
 Set (or replace) key at given index with given key. More...
 
virtual bool KeyRemove (int pIndex)=0
 Remove key at given index. More...
 
virtual bool KeyRemove (int pStartIndex, int pEndIndex)=0
 Remove all the keys in the given range. More...
 
virtual int KeyInsert (FbxTime pTime, int *pLast=((void *) 0))=0
 Insert a key at given time. More...
 
virtual double KeyFind (FbxTime pTime, int *pLast=((void *) 0))=0
 Find key index for a given time. More...
 
virtual bool KeyScaleValue (float pMultValue)=0
 Scale value of all keys. More...
 
virtual bool KeyScaleValueAndTangent (float pMultValue)=0
 Scale value and tangent of all keys. More...
 

Key Manipulation

virtual void KeySet (int pKeyIndex, FbxTime pTime, float pValue, FbxAnimCurveDef::EInterpolationType pInterpolation=FbxAnimCurveDef::eInterpolationCubic, FbxAnimCurveDef::ETangentMode pTangentMode=FbxAnimCurveDef::eTangentAuto, float pData0=0.0, float pData1=0.0, FbxAnimCurveDef::EWeightedMode pTangentWeightMode=FbxAnimCurveDef::eWeightedNone, float pWeight0=FbxAnimCurveDef::sDEFAULT_WEIGHT, float pWeight1=FbxAnimCurveDef::sDEFAULT_WEIGHT, float pVelocity0=FbxAnimCurveDef::sDEFAULT_VELOCITY, float pVelocity1=FbxAnimCurveDef::sDEFAULT_VELOCITY)=0
 General function to set key properties. More...
 
virtual void KeySetTCB (int pKeyIndex, FbxTime pTime, float pValue, float pData0=0.0f, float pData1=0.0f, float pData2=0.0f)=0
 Set a key with cubic interpolation, TCB tangent mode. More...
 
virtual FbxAnimCurveDef::EInterpolationType KeyGetInterpolation (int pKeyIndex) const =0
 Get key's interpolation type. More...
 
virtual void KeySetInterpolation (int pKeyIndex, FbxAnimCurveDef::EInterpolationType pInterpolation)=0
 Set key's interpolation type. More...
 
virtual FbxAnimCurveDef::EConstantMode KeyGetConstantMode (int pKeyIndex) const =0
 Get key's constant mode. More...
 
virtual FbxAnimCurveDef::ETangentMode KeyGetTangentMode (int pKeyIndex, bool pIncludeOverrides=false) const =0
 Get key's tangent mode. More...
 
virtual void KeySetConstantMode (int pKeyIndex, FbxAnimCurveDef::EConstantMode pMode)=0
 Set key's constant mode. More...
 
virtual void KeySetTangentMode (int pKeyIndex, FbxAnimCurveDef::ETangentMode pTangent)=0
 Set key's tangent mode. More...
 
virtual FbxAnimCurveKey KeyGet (int pIndex) const =0
 Get key at given index. More...
 
virtual float KeyGetValue (int pKeyIndex) const =0
 Get key value. More...
 
virtual void KeySetValue (int pKeyIndex, float pValue)=0
 Set key value. More...
 
virtual void KeyIncValue (int pKeyIndex, float pValue)=0
 Increment key value. More...
 
virtual void KeyMultValue (int pKeyIndex, float pValue)=0
 Multiply key value. More...
 
virtual void KeyMultTangent (int pKeyIndex, float pValue)=0
 Multiply key tangents. More...
 
virtual FbxTime KeyGetTime (int pKeyIndex) const =0
 Get key time. More...
 
virtual void KeySetTime (int pKeyIndex, FbxTime pTime)=0
 Set key time. More...
 
virtual void KeySetBreak (int pKeyIndex, bool pVal)=0
 Set or unset the tangent break. More...
 
virtual bool KeyGetBreak (int pKeyIndex) const =0
 Get if the tangent has a break. More...
 

Key Tangent Management

virtual float KeyGetLeftDerivative (int pIndex)=0
 Get the left derivative of a key. More...
 
virtual void KeySetLeftDerivative (int pIndex, float pValue)=0
 Set the left derivative of a key. More...
 
virtual float KeyGetLeftAuto (int pIndex, bool pApplyOvershootProtection=false)=0
 Get the left auto parametric of a key. More...
 
virtual FbxAnimCurveTangentInfo KeyGetLeftDerivativeInfo (int pIndex)=0
 Get the left derivative info (of type FbxAnimCurveTangentInfo) of a key. More...
 
virtual void KeySetLeftDerivativeInfo (int pIndex, const FbxAnimCurveTangentInfo &pValue, bool pForceDerivative=false)=0
 Set the left derivative info (of type FbxAnimCurveTangentInfo) of a key. More...
 
virtual float KeyGetRightDerivative (int pIndex)=0
 Get the right derivative of a key. More...
 
virtual void KeySetRightDerivative (int pIndex, float pValue)=0
 Set the right derivative of a key. More...
 
virtual float KeyGetRightAuto (int pIndex, bool pApplyOvershootProtection=false)=0
 Get the right auto parametric of a key. More...
 
virtual FbxAnimCurveTangentInfo KeyGetRightDerivativeInfo (int pIndex)=0
 Get the right derivative info (of type FbxAnimCurveTangentInfo) of a key. More...
 
virtual void KeySetRightDerivativeInfo (int pIndex, const FbxAnimCurveTangentInfo &pValue, bool pForceDerivative=false)=0
 Set the right derivative info (of type FbxAnimCurveTangentInfo) of a key. More...
 
virtual bool KeyIsLeftTangentWeighted (int pIndex) const =0
 Get the left tangent weight mode of a key. More...
 
virtual bool KeyIsRightTangentWeighted (int pIndex) const =0
 Get the right tangent weight mode of a key. More...
 
virtual float KeyGetLeftTangentWeight (int pIndex) const =0
 Get the weight value component of the left tangent of a key. More...
 
virtual float KeyGetRightTangentWeight (int pIndex) const =0
 Get the weight value component of the right tangent of a key. More...
 
virtual void KeySetLeftTangentWeight (int pIndex, float pWeight, bool pAdjustTan=false)=0
 Set the left tangent weight of a key. More...
 
virtual void KeySetRightTangentWeight (int pIndex, float pWeight, bool pAdjustTan=false)=0
 Set the right tangent weight of a key. More...
 
virtual float KeyGetLeftTangentVelocity (int pIndex) const =0
 Get the velocity value component of the left tangent of a key. More...
 
virtual float KeyGetRightTangentVelocity (int pIndex) const =0
 Get the velocity value component of the right tangent of a key. More...
 

Evaluation and Analysis

virtual float Evaluate (FbxTime pTime, int *pLast=((void *) 0))=0
 Evaluate animation curve value at a given time. More...
 
virtual float EvaluateIndex (double pIndex)=0
 Evaluate animation curve value at a given key index. More...
 
virtual float EvaluateLeftDerivative (FbxTime pTime, int *pLast=((void *) 0))=0
 Evaluate function left derivative at given time. More...
 
virtual float EvaluateRightDerivative (FbxTime pTime, int *pLast=((void *) 0))=0
 Evaluate function right derivative at given time. More...
 

Utility functions.

virtual bool GetTimeInterval (FbxTimeSpan &pTimeInterval)=0
 Find out start and end time of the animation animation curve. More...
 
virtual void CopyFrom (FbxAnimCurve &pSource, bool pWithKeys=true)=0
 Copy animation curve content into current animation curve. More...
 
virtual float GetValue (int pCurveNodeIndex=0)=0
 Retrieve the value of the parent curve node channel. More...
 
virtual void SetValue (float pValue, int pCurveNodeIndex=0)=0
 Set the value to the parent curve node channel. More...
 

Additional Inherited Members

- Public Attributes inherited from FbxObject
FbxProperty RootProperty
 The root property that holds all children property for this object. More...
 
- Static Protected Member Functions inherited from FbxObject
static FbxObjectAllocate (FbxManager *pManager, const char *pName, const FbxObject *pFrom)
 

Member Typedef Documentation

◆ ParentClass

Definition at line 781 of file fbxanimcurve.h.

Constructor & Destructor Documentation

◆ ~ FbxAnimCurve()

virtual ~ FbxAnimCurve ( )
inlineprotectedvirtual

Definition at line 781 of file fbxanimcurve.h.

783 :

◆ FbxAnimCurve()

FbxAnimCurve ( FbxManager pManager,
const char *  pName 
)
inlineprotected

Definition at line 781 of file fbxanimcurve.h.

783 :

Member Function Documentation

◆ GetClassId()

virtual FbxClassId GetClassId ( ) const
inlinevirtual

Reimplemented from FbxAnimCurveBase.

Definition at line 781 of file fbxanimcurve.h.

783 :

◆ Create() [1/2]

static FbxAnimCurve* Create ( FbxManager pManager,
const char *  pName 
)
static

◆ Create() [2/2]

static FbxAnimCurve* Create ( FbxScene pContainer,
const char *  pName 
)
static

Create a FbxAnimCurve.

Parameters
pContainerScene to which the created animation curve belongs.
pNameName of the animation curve.
Returns
Newly created animation curve

◆ ResizeKeyBuffer()

virtual void ResizeKeyBuffer ( int  pKeyCount)
pure virtual

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

Parameters
pKeyCountNumber of keys the animation curve will eventually hold.
Examples:
UserProperties/main.cxx.

◆ KeyModifyBegin()

virtual void KeyModifyBegin ( )
pure virtual

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

Call function FbxAnimCurve::KeyModifyEnd() after modification.

Examples:
Animation/main.cxx, Audio/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, Instances/main.cxx, and UserProperties/main.cxx.

◆ KeyModifyEnd()

virtual void KeyModifyEnd ( )
pure virtual

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

Function FbxAnimCurve::KeyModifyBegin() must have been called prior to modify the keys.

Examples:
Animation/main.cxx, Audio/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, Instances/main.cxx, and UserProperties/main.cxx.

◆ KeyClear()

virtual void KeyClear ( )
pure virtual

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

Implements FbxAnimCurveBase.

◆ KeyGetCount()

virtual int KeyGetCount ( ) const
pure virtual

Get the number of keys.

Returns
Key count.

Implements FbxAnimCurveBase.

Examples:
ImportScene/DisplayAnimation.cxx.

◆ KeyAdd() [1/2]

virtual int KeyAdd ( FbxTime  pTime,
FbxAnimCurveKeyBase pKey,
int *  pLast = ((void *) 0) 
)
pure virtual

Add a given key at given time.

The new key is appended after all the other animation curve's keys. Function FbxAnimCurve::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
pTimeTime of the new key.
pKeyKey to add.
pLastIndex of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns
Index of the key at given time, no matter if it was added or already present.
Remarks
Key value, interpolation type and tangent mode must be set explicitly afterwards.

Implements FbxAnimCurveBase.

Examples:
Animation/main.cxx, Audio/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, Instances/main.cxx, Pivot/main.cxx, and UserProperties/main.cxx.

◆ KeyAdd() [2/2]

virtual int KeyAdd ( FbxTime  pTime,
int *  pLast = ((void *) 0) 
)
pure virtual

Add a key at given time.

The new key is appended after all the other animation curve's keys. Function FbxAnimCurve::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
pTimeTime of the new key.
pLastIndex of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns
Index of the key at given time, no matter if it was added or already present.
Remarks
Key value, interpolation type and tangent mode must be set explicitly afterwards.

◆ KeySet() [1/2]

virtual bool KeySet ( int  pIndex,
FbxAnimCurveKeyBase pKey 
)
pure virtual

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

Parameters
pIndexIndex of the key to be set or replaced.
pKeyNew key at this index.
Returns
true if key time is superior to previous key time and inferior to next key time, false otherwise.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

Implements FbxAnimCurveBase.

Examples:
ExportScene04/main.cxx, Instances/main.cxx, and UserProperties/main.cxx.

◆ KeyRemove() [1/2]

virtual bool KeyRemove ( int  pIndex)
pure virtual

Remove key at given index.

Other key indices are updated automatically.

Parameters
pIndexIndex of key to remove.
Returns
true on success, false otherwise.

Implements FbxAnimCurveBase.

◆ KeyRemove() [2/2]

virtual bool KeyRemove ( int  pStartIndex,
int  pEndIndex 
)
pure virtual

Remove all the keys in the given range.

Parameters
pStartIndexIndex of the first key to remove (inclusive).
pEndIndexIndex of the last key to remove (inclusive).
Returns
true on success.

Implements FbxAnimCurveBase.

◆ KeyInsert()

virtual int KeyInsert ( FbxTime  pTime,
int *  pLast = ((void *) 0) 
)
pure virtual

Insert a key at given time.

This function should be used instead of FbxAnimCurve::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
pTimeTime of the new key.
pLastIndex of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns
Index of the key at given time, no matter if it was inserted or already present.
Remarks
Key value must be set explicitly afterwards. The interpolation type and tangent mode are copied from the previous key.

◆ KeyFind()

virtual double KeyFind ( FbxTime  pTime,
int *  pLast = ((void *) 0) 
)
pure virtual

Find key index for a given time.

Parameters
pTimeTime of the key looked for.
pLastIndex of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
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.

◆ KeyScaleValue()

virtual bool KeyScaleValue ( float  pMultValue)
pure virtual

Scale value of all keys.

Parameters
pMultValueScale applied on key values.
Returns
true on success, false otherwise.

◆ KeyScaleValueAndTangent()

virtual bool KeyScaleValueAndTangent ( float  pMultValue)
pure virtual

Scale value and tangent of all keys.

Parameters
pMultValueScale applied on key values and tangents.
Returns
true on success, false otherwise.

◆ KeySet() [2/2]

virtual void KeySet ( int  pKeyIndex,
FbxTime  pTime,
float  pValue,
FbxAnimCurveDef::EInterpolationType  pInterpolation = FbxAnimCurveDef::eInterpolationCubic,
FbxAnimCurveDef::ETangentMode  pTangentMode = FbxAnimCurveDef::eTangentAuto,
float  pData0 = 0.0,
float  pData1 = 0.0,
FbxAnimCurveDef::EWeightedMode  pTangentWeightMode = FbxAnimCurveDef::eWeightedNone,
float  pWeight0 = FbxAnimCurveDef::sDEFAULT_WEIGHT,
float  pWeight1 = FbxAnimCurveDef::sDEFAULT_WEIGHT,
float  pVelocity0 = FbxAnimCurveDef::sDEFAULT_VELOCITY,
float  pVelocity1 = FbxAnimCurveDef::sDEFAULT_VELOCITY 
)
pure virtual

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

Parameters
pKeyIndexIndex of the key.
pTimeKey time.
pValueKey value.
pInterpolationKey interpolation type.
pTangentModeKey tangent mode (meaningful for cubic interpolation only).
pData0Value of right slope.
pData1Value of next left slope.
pTangentWeightModeWeight mode, if used.
pWeight0Weight for right slope, if tangent weight mode is eWeightedRight or eWeightedAll.
pWeight1Weight for next left slope, if tangent weight mode is eWeightedNextLeft or eWeightedAll.
pVelocity0Velocity for right slope, if tangent velocity mode is eVelocityRight or eVelocityAll.
pVelocity1Velocity for next left slope, if tangent velocity mode is eVelocityNextLeft or eVelocityAll.

◆ KeySetTCB()

virtual void KeySetTCB ( int  pKeyIndex,
FbxTime  pTime,
float  pValue,
float  pData0 = 0.0f,
float  pData1 = 0.0f,
float  pData2 = 0.0f 
)
pure virtual

Set a key with cubic interpolation, TCB tangent mode.

The key 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
pKeyIndexIndex of the key.
pTimeKey time.
pValueKey value.
pData0Tension. 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.
pData1Continuity. Controls the smoothness or singularity of the curve on the key.
pData2Bias. Controls if the effect of tension and continuity affect the curve before or after the key.

◆ KeyGetInterpolation()

virtual FbxAnimCurveDef::EInterpolationType KeyGetInterpolation ( int  pKeyIndex) const
pure virtual

Get key's interpolation type.

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

◆ KeySetInterpolation()

virtual void KeySetInterpolation ( int  pKeyIndex,
FbxAnimCurveDef::EInterpolationType  pInterpolation 
)
pure virtual

Set key's interpolation type.

Parameters
pKeyIndexIndex of the key.
pInterpolationKey interpolation type.
Examples:
ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, and ExportScene04/main.cxx.

◆ KeyGetConstantMode()

virtual FbxAnimCurveDef::EConstantMode KeyGetConstantMode ( int  pKeyIndex) const
pure virtual

Get key's constant mode.

Note
This method is only relevant if the key's interpolation type is constant (eInterpolationConstant). Using this method on a key with an other interpolation type will return unpredictable value.
Parameters
pKeyIndexIndex of the queried key.
Returns
Key constant mode.
Examples:
ImportScene/DisplayAnimation.cxx.

◆ KeyGetTangentMode()

virtual FbxAnimCurveDef::ETangentMode KeyGetTangentMode ( int  pKeyIndex,
bool  pIncludeOverrides = false 
) const
pure virtual

Get key's tangent mode.

Parameters
pKeyIndexIndex of the key.
pIncludeOverridesInclude 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.
Returns
Key tangent mode.
Examples:
ImportScene/DisplayAnimation.cxx.

◆ KeySetConstantMode()

virtual void KeySetConstantMode ( int  pKeyIndex,
FbxAnimCurveDef::EConstantMode  pMode 
)
pure virtual

Set key's constant mode.

This method is meaningful for constant interpolation only.

Parameters
pKeyIndexIndex of the key.
pModeKey constant mode.

◆ KeySetTangentMode()

virtual void KeySetTangentMode ( int  pKeyIndex,
FbxAnimCurveDef::ETangentMode  pTangent 
)
pure virtual

Set key's tangent mode.

This method is meaningful for cubic interpolation only.

Parameters
pKeyIndexIndex of the key.
pTangentKey tangent mode.

◆ KeyGet()

virtual FbxAnimCurveKey KeyGet ( int  pIndex) const
pure virtual

Get key at given index.

Parameters
pIndexIndex of the key on the animation curve.
Returns
The key at the given index.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.
Examples:
ImportScene/DisplayAnimation.cxx.

◆ KeyGetValue()

virtual float KeyGetValue ( int  pKeyIndex) const
pure virtual

Get key value.

Parameters
pKeyIndexIndex of the queried key.
Returns
Key value.
Examples:
ImportScene/DisplayAnimation.cxx.

◆ KeySetValue()

virtual void KeySetValue ( int  pKeyIndex,
float  pValue 
)
pure virtual

Set key value.

Parameters
pKeyIndexIndex of the key.
pValueThe value to set.
Examples:
ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, and ExportScene04/main.cxx.

◆ KeyIncValue()

virtual void KeyIncValue ( int  pKeyIndex,
float  pValue 
)
pure virtual

Increment key value.

Parameters
pKeyIndexIndex of the key.
pValueTerm added to the key value.

◆ KeyMultValue()

virtual void KeyMultValue ( int  pKeyIndex,
float  pValue 
)
pure virtual

Multiply key value.

Parameters
pKeyIndexIndex of the key.
pValueFactor multiplying the key value.
See also
FbxAnimCurve::KeyMultTangent.

◆ KeyMultTangent()

virtual void KeyMultTangent ( int  pKeyIndex,
float  pValue 
)
pure virtual

Multiply key tangents.

Remarks
When multiplying a key value, tangents must be multiplied to conserve the same topology.
Parameters
pKeyIndexIndex of the key.
pValueFactor multiplying the key tangents.

◆ KeyGetTime()

virtual FbxTime KeyGetTime ( int  pKeyIndex) const
pure virtual

Get key time.

Parameters
pKeyIndexIndex of the queried key.
Returns
Key time (time at which this key is occurring).

Reimplemented from FbxAnimCurveBase.

Examples:
ImportScene/DisplayAnimation.cxx.

◆ KeySetTime()

virtual void KeySetTime ( int  pKeyIndex,
FbxTime  pTime 
)
pure virtual

Set key time.

Parameters
pKeyIndexIndex of the key.
pTimeKey time (time at which this key is occurring).
Remarks
The new key time might modify the key index.

Implements FbxAnimCurveBase.

◆ KeySetBreak()

virtual void KeySetBreak ( int  pKeyIndex,
bool  pVal 
)
pure virtual

Set or unset the tangent break.

When this flag is set (FbxAnimCurveDef::eTangentBreak), 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 (FbxAnimCurveDef::eTangentUser) and Auto (FbxAnimCurveDef::eTangentAuto) tangent modes only.

Parameters
pKeyIndexIndex of the key.
pValBreak flag (true or false).

◆ KeyGetBreak()

virtual bool KeyGetBreak ( int  pKeyIndex) const
pure virtual

Get if the tangent has a break.

When this flag is set (FbxAnimCurveDef::eTangentBreak), 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 (FbxAnimCurveDef::eTangentUser) and Auto (FbxAnimCurveDef::eTangentAuto) tangent modes only.

Parameters
pKeyIndexIndex of the queried key.
Returns
Break flag (true or false).

◆ KeyGetLeftDerivative()

virtual float KeyGetLeftDerivative ( int  pIndex)
pure virtual

Get the left derivative of a key.

Parameters
pIndexIndex of the queried key.
Returns
Left derivative (Value over time (s)).
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeySetLeftDerivative()

virtual void KeySetLeftDerivative ( int  pIndex,
float  pValue 
)
pure virtual

Set the left derivative of a key.

Parameters
pIndexIndex of the key.
pValueLeft derivative.
Remarks
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 eInterpolationCubic and tangent mode is FbxAnimCurveDef::eTangentUser, FbxAnimCurveDef::eTangentBreak or FbxAnimCurveDef::eTangentAuto.

◆ KeyGetLeftAuto()

virtual float KeyGetLeftAuto ( int  pIndex,
bool  pApplyOvershootProtection = false 
)
pure virtual

Get the left auto parametric of a key.

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

Parameters
pIndexIndex of the key.
pApplyOvershootProtectionClamp flag (eGENERIC_CLAMP) is taken into account.
Returns
Left auto parametric.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeyGetLeftDerivativeInfo()

virtual FbxAnimCurveTangentInfo KeyGetLeftDerivativeInfo ( int  pIndex)
pure virtual

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

Parameters
pIndexIndex of the queried key.
Returns
Left derivative info.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeySetLeftDerivativeInfo()

virtual void KeySetLeftDerivativeInfo ( int  pIndex,
const FbxAnimCurveTangentInfo pValue,
bool  pForceDerivative = false 
)
pure virtual

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

Parameters
pIndexIndex of the key.
pValueLeft derivative info.
pForceDerivativeIf 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.
Remarks
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 eInterpolationCubic and tangent mode is FbxAnimCurveDef::eTangentUser or FbxAnimCurveDef::eTangentBreak.

◆ KeyGetRightDerivative()

virtual float KeyGetRightDerivative ( int  pIndex)
pure virtual

Get the right derivative of a key.

Parameters
pIndexIndex of the key.
Returns
Right derivative (Value over time (s)).
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeySetRightDerivative()

virtual void KeySetRightDerivative ( int  pIndex,
float  pValue 
)
pure virtual

Set the right derivative of a key.

Parameters
pIndexIndex of the key.
pValueRight derivative.
Remarks
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 eInterpolationCubic and tangent mode is FbxAnimCurveDef::eTangentUser, FbxAnimCurveDef::eTangentBreak or FbxAnimCurveDef::eTangentAuto.

◆ KeyGetRightAuto()

virtual float KeyGetRightAuto ( int  pIndex,
bool  pApplyOvershootProtection = false 
)
pure virtual

Get the right auto parametric of a key.

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

Parameters
pIndexIndex of the key.
pApplyOvershootProtectionClamp flag (eGENERIC_CLAMP) is taken into account.
Returns
Right auto parametric.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeyGetRightDerivativeInfo()

virtual FbxAnimCurveTangentInfo KeyGetRightDerivativeInfo ( int  pIndex)
pure virtual

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

Parameters
pIndexIndex of the queried key.
Returns
Right derivative info.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeySetRightDerivativeInfo()

virtual void KeySetRightDerivativeInfo ( int  pIndex,
const FbxAnimCurveTangentInfo pValue,
bool  pForceDerivative = false 
)
pure virtual

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

Parameters
pIndexIndex of the key.
pValueRight derivative info.
pForceDerivativeIf 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.
Remarks
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 eInterpolationCubic and tangent mode is FbxAnimCurveDef::eTangentUser or FbxAnimCurveDef::eTangentBreak.

◆ KeyIsLeftTangentWeighted()

virtual bool KeyIsLeftTangentWeighted ( int  pIndex) const
pure virtual

Get the left tangent weight mode of a key.

Parameters
pIndexIndex of queried key.
Returns
true if the key is left weighted (Weight mode is eWEIGHT_WEIGHTED_RIGHT or eWeightedAll). false otherwise.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeyIsRightTangentWeighted()

virtual bool KeyIsRightTangentWeighted ( int  pIndex) const
pure virtual

Get the right tangent weight mode of a key.

Parameters
pIndexIndex of queried key.
Returns
true if the key is right weighted (Weight mode is eWeightedRight or eWeightedAll). false otherwise.
Remarks
Result is undetermined if animation curve has no key or if index is out of bounds.

◆ KeyGetLeftTangentWeight()

virtual float KeyGetLeftTangentWeight ( int  pIndex) const
pure virtual

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

Parameters
pIndexIndex of the key.
Returns
Left tangent weight, or eDEFAULT_WEIGHT (0.333...) if left tangent is not weighted.
Remarks
This function is only relevant if key interpolation type is eInterpolationCubic.

◆ KeyGetRightTangentWeight()

virtual float KeyGetRightTangentWeight ( int  pIndex) const
pure virtual

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

Parameters
pIndexIndex of the key.
Returns
Right tangent weight, or eDEFAULT_WEIGHT (0.333...) if right tangent is not weighted.
Remarks
This function is only relevant if key interpolation type is eInterpolationCubic.

◆ KeySetLeftTangentWeight()

virtual void KeySetLeftTangentWeight ( int  pIndex,
float  pWeight,
bool  pAdjustTan = false 
)
pure virtual

Set the left tangent weight of a key.

Parameters
pIndexIndex of the key.
pWeightWeight to set on the left tangent.
pAdjustTanIf true, recompute the tangent height to compensate for very small weights.
Remarks
This function is only relevant if previous key interpolation type is eInterpolationCubic and tangent mode is FbxAnimCurveDef::eTangentUser or FbxAnimCurveDef::eTangentBreak. The tangent is automatically set in weighted mode. The pAdjustTan option will only produce correct results provided that the tangent has already been set before calling this function.

◆ KeySetRightTangentWeight()

virtual void KeySetRightTangentWeight ( int  pIndex,
float  pWeight,
bool  pAdjustTan = false 
)
pure virtual

Set the right tangent weight of a key.

Parameters
pIndexIndex of the key.
pWeightWeight to set on the right tangent.
pAdjustTanIf true, recompute the tangent height to compensate for very small weights.
Remarks
This function is only relevant if key interpolation type is eInterpolationCubic and tangent mode is FbxAnimCurveDef::eTangentUser or FbxAnimCurveDef::eTangentBreak. The tangent is automatically set in weighted mode. The pAdjustTan option will only produce correct results provided that the tangent has already been set before calling this function.

◆ KeyGetLeftTangentVelocity()

virtual float KeyGetLeftTangentVelocity ( int  pIndex) const
pure virtual

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

Parameters
pIndexIndex of the key.
Returns
Tangent velocity of the left tangent.
Remarks
This function is only relevant if key interpolation type is eInterpolationCubic

◆ KeyGetRightTangentVelocity()

virtual float KeyGetRightTangentVelocity ( int  pIndex) const
pure virtual

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

Parameters
pIndexIndex of the key.
Returns
Tangent velocity of the right tangent.
Remarks
This function is only relevant if key interpolation type is eInterpolationCubic

◆ Evaluate()

virtual float Evaluate ( FbxTime  pTime,
int *  pLast = ((void *) 0) 
)
pure virtual

Evaluate animation curve value at a given time.

Parameters
pTimeTime of evaluation. If time falls between two keys, animation curve value is interpolated according to previous key interpolation type and tangent mode if relevant.
pLastIndex of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns
Animation curve value on given time, or animation curve's default value if animation curve has no key.
Remarks
This function takes extrapolation into account.

Implements FbxAnimCurveBase.

Examples:
ViewScene/DrawScene.cxx, and ViewScene/SetCamera.cxx.

◆ EvaluateIndex()

virtual float EvaluateIndex ( double  pIndex)
pure virtual

Evaluate animation curve value at a given key index.

Parameters
pIndexAny value from 0 to FbxAnimCurve::KeyGetCount() - 1.
Returns
Animation curve value, or default value if animation curve has no key.
Remarks
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. Result is undetermined if index is out of bounds.

Implements FbxAnimCurveBase.

◆ EvaluateLeftDerivative()

virtual float EvaluateLeftDerivative ( FbxTime  pTime,
int *  pLast = ((void *) 0) 
)
pure virtual

Evaluate function left derivative at given time.

Parameters
pTimeTime of evaluation.
pLastIndex of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns
Left derivative at given time.
Remarks
This function does not take extrapolation into account. Result is undetermined if index is out of bounds.

◆ EvaluateRightDerivative()

virtual float EvaluateRightDerivative ( FbxTime  pTime,
int *  pLast = ((void *) 0) 
)
pure virtual

Evaluate function right derivative at given time.

Parameters
pTimeTime of evaluation.
pLastIndex of the last processed key to speed up search. If this function is called in a loop, initialize this value to 0 and let it be updated by each call.
Returns
Right derivative at given time.
Remarks
This function does not take extrapolation into account. Result is undetermined if index is out of bounds.

◆ GetTimeInterval()

virtual bool GetTimeInterval ( FbxTimeSpan pTimeInterval)
pure virtual

Find out start and end time of the animation animation curve.

This function retrieves the animation curve's time span.

Parameters
pTimeIntervalReference to receive start and end time.
Returns
true on success, false otherwise.

Reimplemented from FbxAnimCurveBase.

◆ CopyFrom()

virtual void CopyFrom ( FbxAnimCurve pSource,
bool  pWithKeys = true 
)
pure virtual

Copy animation curve content into current animation curve.

Parameters
pSourceAnimation curve to be copied (which will not be modified).
pWithKeysIf true, clear keys in current animation curve and copy keys from source animation curve. If false, keys in current animation curve are left as is.

◆ GetValue()

virtual float GetValue ( int  pCurveNodeIndex = 0)
pure virtual

Retrieve the value of the parent curve node channel.

Parameters
pCurveNodeIndexThe index of the parent curve node, if more than one exist.
Returns
The value of the parent curve node channel of this curve.
Remarks
In most case, the curve will have a single curve node channel as destination. However, it is possible that more are connected, hence why we provide the curve node index parameter.

◆ SetValue()

virtual void SetValue ( float  pValue,
int  pCurveNodeIndex = 0 
)
pure virtual

Set the value to the parent curve node channel.

Parameters
pValueThe value to set to the parent curve node channel of this curve.
pCurveNodeIndexThe index of the parent curve node, if more than one exist.
Remarks
In most case, the curve will have a single curve node channel as destination. However, it is possible that more are connected, hence why we provide the curve node index parameter.

Friends And Related Function Documentation

◆ fbxsdk ::FbxManager

friend class fbxsdk ::FbxManager
friend

Definition at line 781 of file fbxanimcurve.h.

Member Data Documentation

◆ ClassId

FbxClassId ClassId
static

Definition at line 781 of file fbxanimcurve.h.

◆ Allocate

FbxObjectCreateProc Allocate
staticprotected

Definition at line 781 of file fbxanimcurve.h.


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