Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

KFbxAnimCurveFilter Class Reference

Search for all occurrences

Detailed Description

Base class for animation curve filters.

Animation curves can be modified through filters. The filters act on the curve keys and values. They can move keys, add or remove keys, modify key values and key tangents, depending on the desired action of the filter. Some simple examples are:

Filters can act on a single animation curve (KFbxAnimCurve), but some filters need to work on many animation curves at the same time. For this reason, the input to a filter can be an animation stack (KFbxAnimStack), an object (KFbxObject) with animated properties, an animation curve node (KFbxAnimCurveNode), or an array of animation curves (KFbxAnimCurve). For example, an unroll filter acts on 3 rotation curves (X, Y and Z) at the same time.

A filter has a start time (that can be as low as TC_MINFINITY) and a stop time (that can be as high as TC_INFINITY). The filter is only applied to the parts of the animation curves that are between the start and stop time.

Definition at line 60 of file kfbxanimcurvefilters.h.

#include <kfbxanimcurvefilters.h>

Inheritance diagram for KFbxAnimCurveFilter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  KFbxAnimCurveFilter ()
  Constructor.
virtual  ~KFbxAnimCurveFilter ()
  Destructor.

Static Public Member Functions

static bool  GetContinuousOffset (KMBRotationOrder &pOrder, double pOffset[3], double pNew[3], double pOld[3])

Protected Member Functions

void  GetKFCurvesFromAnimCurve (KFbxAnimCurve **pSrc, int pSrcCount, KFCurve **pDst, int &pDstCount)
virtual void  UpdateProgressInformation (KTime pStart, KTime pStop)
void  FillError (const char *pErrorStringArray[], int pErrorCount)

Protected Attributes

KTime  mStart
KTime  mStop
KError  mError

Member functions

virtual const char *  GetName () const
  Get the name of the filter.
KTime GetStartTime ()
  Get the start time for the application of the filter.
void  SetStartTime (KTime &pTime)
  Set the start time for the application of the filter.
KTime GetStopTime ()
  Get the stop time for the application of the filter.
void  SetStopTime (KTime &pTime)
  Set the stop time for the application of the filter.
int  GetStartKey (KFbxAnimCurve &pCurve) const
  Get the index of start key on the given curve.
int  GetStopKey (KFbxAnimCurve &pCurve) const
  Get the index of stop key on the given curve.
virtual bool  NeedApply (KFbxAnimStack *pAnimStack)
  Check if any curve on the animation stack needs an application of the filter.
virtual bool  NeedApply (KFbxObject *pObj, KFbxAnimStack *pAnimStack)
  Check if all the animated properties of the object need an application of the filter.
virtual bool  NeedApply (KFbxAnimCurveNode &pCurveNode)
  Check if the animation curve node needs an application of the filter.
virtual bool  NeedApply (KFbxAnimCurve **pCurve, int pCount)
  Check if the given animation curve need an application of the filter.
virtual bool  NeedApply (KFbxAnimCurve &pCurve)
  Check if an animation curve need an application of the filter.
virtual bool  Apply (KFbxAnimStack *pAnimStack)
  Apply filter to all the curves stored in the animation stack.
virtual bool  Apply (KFbxObject *pObj, KFbxAnimStack *pAnimStack)
  Apply filter to all the animated properties of the object.
virtual bool  Apply (KFbxAnimCurveNode &pCurveNode)
  Apply filter on all the curves of an animation curve node.
virtual bool  Apply (KFbxAnimCurve **pCurve, int pCount)
  Apply filter on an array of animation curves.
virtual bool  Apply (KFbxAnimCurve &pCurve)=0
  Apply filter on an animation curve.
virtual void  Reset ()
  Reset the filter to its default parameters.
KError GetError ()
  Retrieve error object.
int  GetLastErrorID ()
  Get last error ID.
const char *  GetLastErrorString () const
  Get last error string.

Constructor & Destructor Documentation

Constructor.

virtual ~KFbxAnimCurveFilter ( ) [inline, virtual]

Destructor.

Definition at line 67 of file kfbxanimcurvefilters.h.

{};

Member Function Documentation

virtual const char* GetName ( ) const [inline, virtual]
KTime& GetStartTime ( ) [inline]

Get the start time for the application of the filter.

The part of the animation curves before the start time will remain untouched.

Returns:
The time expressed as KTime.

Definition at line 82 of file kfbxanimcurvefilters.h.

{return mStart;}
void SetStartTime ( KTime pTime ) [inline]

Set the start time for the application of the filter.

The part of the animation curves before the start time will remain untouched.

Parameters:
pTime The time to be set.

Definition at line 88 of file kfbxanimcurvefilters.h.

{ mStart = pTime; }
KTime& GetStopTime ( ) [inline]

Get the stop time for the application of the filter.

The part of the animation curves after the stop time will remain untouched.

Returns:
The time expressed as KTime.

Definition at line 94 of file kfbxanimcurvefilters.h.

{return mStop;}
void SetStopTime ( KTime pTime ) [inline]

Set the stop time for the application of the filter.

The part of the animation curves after the stop time will remain untouched.

Parameters:
pTime The time to be set.

Definition at line 100 of file kfbxanimcurvefilters.h.

{ mStop = pTime; }
int GetStartKey ( KFbxAnimCurve pCurve ) const

Get the index of start key on the given curve.

This is the index of the first key after (or on) the filter's start time.

Parameters:
pCurve Curve on which we want to retrieve the start key.
Returns:
Index of the start key.
int GetStopKey ( KFbxAnimCurve pCurve ) const

Get the index of stop key on the given curve.

This is the index of the last key before (or on) the filter's stop time.

Parameters:
pCurve Curve on which we want to retrieve the stop key.
Returns:
The position of the stop key.
virtual bool NeedApply ( KFbxAnimStack pAnimStack ) [virtual]

Check if any curve on the animation stack needs an application of the filter.

Parameters:
pAnimStack Animation stack where to retrieve the animation curves
Returns:
true if at least one animated property needs an application of the filter.

Reimplemented in KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterUnroll, and KFbxAnimCurveFilterMatrixConverter.

virtual bool NeedApply ( KFbxObject pObj,
KFbxAnimStack pAnimStack 
) [virtual]

Check if all the animated properties of the object need an application of the filter.

Parameters:
pObj Object containing the properties to test.
pAnimStack Animation stack where to retrieve the animation curves
Returns:
true if at least one animated property needs an application of the filter.

Reimplemented in KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterUnroll, and KFbxAnimCurveFilterMatrixConverter.

virtual bool NeedApply ( KFbxAnimCurveNode pCurveNode ) [virtual]

Check if the animation curve node needs an application of the filter.

Parameters:
pCurveNode Curve node to test.
Returns:
true if the animation curve node needs an application of the filter.
Remarks:
This method collects all the KFbxAnimCurve objects connected to the curve node and calls NeedApply(KFbxAnimCurve**, int)

Reimplemented in KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeySync, and KFbxAnimCurveFilterUnroll.

virtual bool NeedApply ( KFbxAnimCurve **  pCurve,
int  pCount 
) [virtual]

Check if the given animation curve need an application of the filter.

Parameters:
pCurve Array of curves to test if they need the and application of the filter.
pCount Number of curves in array.
Returns:
true if at least one animation curve in the array needs an application of the filter.

Reimplemented in KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterUnroll, and KFbxAnimCurveFilterMatrixConverter.

virtual bool NeedApply ( KFbxAnimCurve pCurve ) [virtual]

Check if an animation curve need an application of the filter.

Parameters:
pCurve Curve to test if it needs application of filter.
Returns:
true if the animation curve needs an application of the filter.

Reimplemented in KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterUnroll, and KFbxAnimCurveFilterMatrixConverter.

virtual bool Apply ( KFbxAnimStack pAnimStack ) [virtual]

Apply filter to all the curves stored in the animation stack.

Parameters:
pAnimStack Animation stack where to retrieve the animation curves
Returns:
true if the curve filtering operation was successful, false otherwise.

Reimplemented in KFbxAnimCurveFilterConstantKeyReducer, KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeyReducer, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterResample, KFbxAnimCurveFilterScale, KFbxAnimCurveFilterTSS, KFbxAnimCurveFilterUnroll, and KFbxAnimCurveFilterMatrixConverter.

virtual bool Apply ( KFbxObject pObj,
KFbxAnimStack pAnimStack 
) [virtual]

Apply filter to all the animated properties of the object.

Parameters:
pObj Object containing the animated properties to which the filter is applied.
pAnimStack Animation stack where to retrieve the animation curves
Returns:
true if the curve filtering operation was successful, false otherwise.

Reimplemented in KFbxAnimCurveFilterConstantKeyReducer, KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeyReducer, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterResample, KFbxAnimCurveFilterScale, KFbxAnimCurveFilterTSS, KFbxAnimCurveFilterUnroll, and KFbxAnimCurveFilterMatrixConverter.

virtual bool Apply ( KFbxAnimCurveNode pCurveNode ) [virtual]

Apply filter on all the curves of an animation curve node.

Parameters:
pCurveNode Curve node to which the filter is applied.
Returns:
true if the curve filtering operation was successful, false otherwise.
Remarks:
This method collects all the KFbxAnimCurve objects connected to the curve node and calls Apply(KFbxAnimCurve**, int)

Reimplemented in KFbxAnimCurveFilterConstantKeyReducer, KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeyReducer, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterResample, KFbxAnimCurveFilterScale, KFbxAnimCurveFilterTSS, and KFbxAnimCurveFilterUnroll.

virtual bool Apply ( KFbxAnimCurve **  pCurve,
int  pCount 
) [virtual]

Apply filter on an array of animation curves.

Parameters:
pCurve Array of curves to which the filter is applied.
pCount Number of curves in the array.
Returns:
true if the curve filtering operation was successful, false otherwise.

Reimplemented in KFbxAnimCurveFilterConstantKeyReducer, KFbxAnimCurveFilterGimbleKiller, KFbxAnimCurveFilterKeyReducer, KFbxAnimCurveFilterKeySync, KFbxAnimCurveFilterResample, KFbxAnimCurveFilterScale, KFbxAnimCurveFilterTSS, KFbxAnimCurveFilterUnroll, and KFbxAnimCurveFilterMatrixConverter.

virtual bool Apply ( KFbxAnimCurve pCurve ) [pure virtual]
virtual void Reset ( ) [inline, virtual]
KError* GetError ( ) [inline]

Retrieve error object.

Returns:
Error object.

Definition at line 195 of file kfbxanimcurvefilters.h.

{ return &mError; }
int GetLastErrorID ( ) [inline]

Get last error ID.

Returns:
Last error ID.

Definition at line 200 of file kfbxanimcurvefilters.h.

{ return mError.GetLastErrorID(); }
const char* GetLastErrorString ( ) const [inline]

Get last error string.

Returns:
Last error string.

Definition at line 205 of file kfbxanimcurvefilters.h.

{ return mError.GetLastErrorString(); }
static bool GetContinuousOffset ( KMBRotationOrder &  pOrder,
double  pOffset[3],
double  pNew[3],
double  pOld[3] 
) [static]
void GetKFCurvesFromAnimCurve ( KFbxAnimCurve **  pSrc,
int  pSrcCount,
KFCurve **  pDst,
int &  pDstCount 
) [protected]
virtual void UpdateProgressInformation ( KTime  pStart,
KTime  pStop 
) [inline, protected, virtual]

Definition at line 224 of file kfbxanimcurvefilters.h.

{};
void FillError ( const char *  pErrorStringArray[],
int  pErrorCount 
) [inline, protected]

Definition at line 226 of file kfbxanimcurvefilters.h.

    {
        mError.Reset(pErrorStringArray, pErrorCount);
    };

Member Data Documentation

KTime mStart [protected]
KTime mStop [protected]
KError mError [protected]

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

KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter
KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter KFbxAnimCurveFilter