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 91 of file kfbxkfcurvefilters.h.
#include <kfbxkfcurvefilters.h>
Protected Member Functions |
|
KFbxKFCurveFilter (KFbxSdkManager &pManager, char const *pName) | |
void | GetKFCurvesFromAnimCurve (KFbxAnimCurve **pSrc, int pSrcCount, KFCurve **pDst, int &pDstCount) |
Protected Attributes |
|
KTime | mTime |
Member functions |
|
virtual const char * | GetName () const |
Get the name of the filter. |
|
virtual KTime & | GetStartTime () |
Get the start time for the application of
the filter. |
|
virtual void | SetStartTime (KTime &pTime) |
Set the start time for the application of
the filter. |
|
virtual KTime & | GetStopTime () |
Get the stop time for the application of the
filter. |
|
virtual void | SetStopTime (KTime &pTime) |
Set the stop time for the application of the
filter. |
|
virtual int | GetStartKey (KFbxAnimCurve &pCurve) const |
Get the index of start key on the given
curve. |
|
virtual 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) |
Apply filter on an animation curve. |
|
virtual void | Reset () |
Reset the filter to its default parameters.
|
|
virtual KError * | GetError () |
Retrieve error object. |
|
virtual int | GetLastErrorID () |
Get last error ID. |
|
virtual char * | GetLastErrorString () |
Get last error string. |
|
Deprecated functions |
|
virtual int | GetStartKey (KFCurve &pCurve) const |
virtual int | GetStopKey (KFCurve &pCurve) const |
virtual bool | NeedApply (KFCurveNode &pCurveNode, bool pRecursive=true) |
virtual bool | NeedApply (KFCurve **pCurve, int pCount) |
virtual bool | NeedApply (KFCurve &pCurve) |
virtual bool | Apply (KFCurveNode &pCurveNode, bool pRecursive=true) |
virtual bool | Apply (KFCurve **pCurve, int pCount) |
virtual bool | Apply (KFCurve &pCurve) |
KFbxKFCurveFilter | ( | KFbxSdkManager & | pManager, |
char const * | pName | ||
) | [protected] |
virtual const char* GetName | ( | ) | const [inline, virtual] |
Get the name of the filter.
Reimplemented from KFbxObject.
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 103 of file kfbxkfcurvefilters.h.
{return NULL;}
virtual KTime& GetStartTime | ( | ) | [inline, virtual] |
Get the start time for the application of the filter.
The part of the animation curves before the start time will remain untouched.
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 109 of file kfbxkfcurvefilters.h.
{return mTime;}
virtual void SetStartTime | ( | KTime & | pTime | ) | [inline, virtual] |
Set the start time for the application of the filter.
The part of the animation curves before the start time will remain untouched.
pTime | The time to be set. |
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 115 of file kfbxkfcurvefilters.h.
{return;}
virtual KTime& GetStopTime | ( | ) | [inline, virtual] |
Get the stop time for the application of the filter.
The part of the animation curves after the stop time will remain untouched.
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 121 of file kfbxkfcurvefilters.h.
{return mTime;}
virtual void SetStopTime | ( | KTime & | pTime | ) | [inline, virtual] |
Set the stop time for the application of the filter.
The part of the animation curves after the stop time will remain untouched.
pTime | The time to be set. |
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 127 of file kfbxkfcurvefilters.h.
{return ;}
virtual int GetStartKey | ( | KFbxAnimCurve & | pCurve | ) | const [inline, virtual] |
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.
pCurve | Curve on which we want to retrieve the start key. |
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 134 of file kfbxkfcurvefilters.h.
{return 0;}
virtual int GetStopKey | ( | KFbxAnimCurve & | pCurve | ) | const [inline, virtual] |
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.
pCurve | Curve on which we want to retrieve the stop key. |
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 141 of file kfbxkfcurvefilters.h.
{return 0;}
virtual bool NeedApply | ( | KFbxAnimStack * | pAnimStack | ) | [virtual] |
Check if any curve on the animation stack needs an application of the filter.
pAnimStack | Animation stack where to retrieve the animation curves |
true
if at least one animated property needs an
application of the filter.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
virtual bool NeedApply | ( | KFbxObject * | pObj, |
KFbxAnimStack * | pAnimStack | ||
) | [virtual] |
Check if all the animated properties of the object need an application of the filter.
pObj | Object containing the properties to test. |
pAnimStack | Animation stack where to retrieve the animation curves |
true
if at least one animated property needs an
application of the filter.virtual bool NeedApply | ( | KFbxAnimCurveNode & | pCurveNode | ) | [inline, virtual] |
Check if the animation curve node needs an application of the filter.
pCurveNode | Curve node to test. |
true
if the animation curve node needs an
application of the filter.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 160 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool NeedApply | ( | KFbxAnimCurve ** | pCurve, |
int | pCount | ||
) | [inline, virtual] |
Check if the given animation curve need an application of the filter.
pCurve | Array of curves to test if they need the and application of the filter. |
pCount | Number of curves in array. |
true
if at least one animation curve in the array
needs an application of the filter.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 167 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool NeedApply | ( | KFbxAnimCurve & | pCurve | ) | [inline, virtual] |
Check if an animation curve need an application of the filter.
pCurve | Curve to test if it needs application of filter. |
true
if the animation curve needs an application
of the filter.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 173 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool Apply | ( | KFbxAnimStack * | pAnimStack | ) | [virtual] |
Apply filter to all the curves stored in the animation stack.
pAnimStack | Animation stack where to retrieve the animation curves |
true
if the curve filtering operation was
successful, false
otherwise.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
virtual bool Apply | ( | KFbxObject * | pObj, |
KFbxAnimStack * | pAnimStack | ||
) | [virtual] |
Apply filter to all the animated properties of the object.
pObj | Object containing the animated properties to which the filter is applied. |
pAnimStack | Animation stack where to retrieve the animation curves |
true
if the curve filtering operation was
successful, false
otherwise.virtual bool Apply | ( | KFbxAnimCurveNode & | pCurveNode | ) | [inline, virtual] |
Apply filter on all the curves of an animation curve node.
pCurveNode | Curve node to which the filter is applied. |
true
if the curve filtering operation was
successful, false
otherwise.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 192 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool Apply | ( | KFbxAnimCurve ** | pCurve, |
int | pCount | ||
) | [inline, virtual] |
Apply filter on an array of animation curves.
pCurve | Array of curves to which the filter is applied. |
pCount | Number of curves in the array. |
true
if the curve filtering operation was
successful, false
otherwise.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 199 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool Apply | ( | KFbxAnimCurve & | pCurve | ) | [inline, virtual] |
Apply filter on an animation curve.
pCurve | Curve to which the filter is applied. |
true
if the curve filtering operation was
successful, false
otherwise.Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 205 of file kfbxkfcurvefilters.h.
{return false;}
virtual void Reset | ( | ) | [inline, virtual] |
Reset the filter to its default parameters.
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 209 of file kfbxkfcurvefilters.h.
{return ;}
virtual KError* GetError | ( | ) | [inline, virtual] |
Retrieve error object.
Reimplemented in KFbxKFCurveFilterKeyReducer, KFbxKFCurveFilterConstantKeyReducer, KFbxKFCurveFilterMatrixConverter, KFbxKFCurveFilterResample, KFbxKFCurveFilterUnroll, KFbxKFCurveFilterGimbleKiller, KFbxKFCurveFilterTSS, KFbxKFCurveFilterKeySync, and KFbxKFCurveFilterScale.
Definition at line 214 of file kfbxkfcurvefilters.h.
{return NULL;}
virtual int GetLastErrorID | ( | ) | [inline, virtual] |
Get last error ID.
Definition at line 219 of file kfbxkfcurvefilters.h.
{return -1;}
virtual char* GetLastErrorString | ( | ) | [inline, virtual] |
Get last error string.
Definition at line 224 of file kfbxkfcurvefilters.h.
{return NULL;}
virtual int GetStartKey | ( | KFCurve & | pCurve | ) | const [inline, virtual] |
Use GetStartKey(KFbxAnimCurve&) instead.
pCurve | Curve on which we want to retrieve the start key. |
Definition at line 234 of file kfbxkfcurvefilters.h.
{return 0;}
virtual int GetStopKey | ( | KFCurve & | pCurve | ) | const [inline, virtual] |
Use GetStopKey(KFbxAnimCurve&) instead.
pCurve | Curve on which we want to retrieve the stop key. |
Definition at line 239 of file kfbxkfcurvefilters.h.
{return 0;}
virtual bool NeedApply | ( | KFCurveNode & | pCurveNode, |
bool | pRecursive =
true |
||
) | [inline, virtual] |
Use NeedApply(KFbxAnimCurveNode&) instead.
pCurveNode | Curve node to test if it needs application of filter. |
pRecursive | Apply recursively to all curve node children. |
Definition at line 245 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool NeedApply | ( | KFCurve ** | pCurve, |
int | pCount | ||
) | [inline, virtual] |
Use NeedApply(KFbxAnimCurve**)
pCurve | Array of curves to test if they need the and application of the filter. |
pCount | Number of curves in array. |
Definition at line 251 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool NeedApply | ( | KFCurve & | pCurve | ) | [inline, virtual] |
pCurve | Curve to test if it needs application of filter. |
Definition at line 256 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool Apply | ( | KFCurveNode & | pCurveNode, |
bool | pRecursive =
true |
||
) | [inline, virtual] |
pCurveNode | Curve node to which the filter is applied. |
pRecursive | Apply recursively to all curve node children. |
Definition at line 262 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool Apply | ( | KFCurve ** | pCurve, |
int | pCount | ||
) | [inline, virtual] |
Use Apply(KFbxAnimCurve**)
pCurve | Array of curves to which the filter is applied. |
pCount | Number of curves in the array. |
Definition at line 268 of file kfbxkfcurvefilters.h.
{return false;}
virtual bool Apply | ( | KFCurve & | pCurve | ) | [inline, virtual] |
pCurve | Curve to which the filter is applied. |
Definition at line 273 of file kfbxkfcurvefilters.h.
{return false;}
void GetKFCurvesFromAnimCurve | ( | KFbxAnimCurve ** | pSrc, |
int | pSrcCount, | ||
KFCurve ** | pDst, | ||
int & | pDstCount | ||
) | [protected] |
Definition at line 289 of file kfbxkfcurvefilters.h.