Public Types | Public Member Functions

KFbxAnimCurveFilterMatrixConverter Class Reference

Search for all occurrences

Detailed Description

Matrix conversion filter.

Remarks:
The current implementation of this filter expects to process 9 curves. If the ApplyUnroll flag is enabled, set with a call to SetApplyUnroll(), the internal unroll filter will automatically be configured to convert USER and BREAK tangents to AUTO (refer to the KFbxAnimCurveFilterUnroll documentation).

Definition at line 1094 of file kfbxanimcurvefilters.h.

#include <kfbxanimcurvefilters.h>

Inheritance diagram for KFbxAnimCurveFilterMatrixConverter:
Inheritance graph
[legend]

List of all members.

Public Types

enum   EMatrixID {
  ePreGlobal, ePreTranslate, ePostTranslate, ePreRotate,
  ePostRotate, ePreScale, ePostScale, ePostGlobal,
  eScaleOffset, eInactivePre, eInactivePost, eRotationPivot,
  eScalingPivot, eMatrixCount
}
 

Matrix ID

  • ePreGlobal
  • ePreTranslate
  • ePostTranslate
  • ePreRotate
  • ePreScale
  • ePostGlobal
  • eScaleOffset
  • eInactivePre
  • eInactivePost
  • eRotationPivot
  • eScalingPivot
  • eMatrixCount.
More...

Public Member Functions

  KFbxAnimCurveFilterMatrixConverter ()
  Constructor.
virtual  ~KFbxAnimCurveFilterMatrixConverter ()
  Destructor.
virtual const char *  GetName () const
  Get the name of the filter.
virtual bool  NeedApply (KFbxAnimStack *pAnimStack)
  This filter expects to works with interdependent curves.
virtual bool  NeedApply (KFbxObject *pObj, KFbxAnimStack *pAnimStack)
  This filter expects to works with 3 interdependent curves.
virtual bool  NeedApply (KFbxAnimCurveNode *pCurveNode[3])
  Check if the animation curve nodes need an application of the filter.
virtual bool  NeedApply (KFbxAnimCurve &pCurve)
  This filter expects to works with interdependent curves.
virtual bool  Apply (KFbxAnimStack *pAnimStack)
  This filter expects to works with interdependent curves.
virtual bool  Apply (KFbxObject *pObj, KFbxAnimStack *pAnimStack)
  This filter expects to works with 3 interdependent curves.
virtual bool  Apply (KFbxAnimCurveNode *pCurveNode[3])
  Apply filter on all the curves of the animation curve nodes.
virtual bool  Apply (KFbxAnimCurve **pCurve, int pCount)
  Apply filter on the given animation curve.
bool  Apply (KFbxAnimCurve **pCurve, double *pVals)
  Apply filter on the given animation curve.
virtual bool  Apply (KFbxAnimCurve &pCurve)
  This filter expects to works with interdependent curves.
virtual void  Reset ()
  Reset the filter to its default parameters.
void  GetSourceMatrix (EMatrixID pIndex, KFbxXMatrix &pMatrix) const
  Get the Translation Rotation Scaling source matrix.
void  SetSourceMatrix (EMatrixID pIndex, KFbxXMatrix &pMatrix)
  Set the Translation Rotation Scaling source matrix.
void  SetSourceMatrix (EMatrixID pIndex, KgeAMatrix &pMatrix)
void  GetDestMatrix (EMatrixID pIndex, KFbxXMatrix &pMatrix) const
  Get the Translation Rotation Scaling destination matrix.
void  SetDestMatrix (EMatrixID pIndex, KFbxXMatrix &pMatrix)
  Set the Translation Rotation Scaling destination matrix.
void  SetDestMatrix (EMatrixID pIndex, KgeAMatrix &pMatrix)
KTime  GetResamplingPeriod () const
  Get the resampling period.
void  SetResamplingPeriod (KTime &pResamplingPeriod)
  Set the resampling period.
bool  GetGenerateLastKeyExactlyAtEndTime () const
  Check if the last key is exactly at the end time.
void  SetGenerateLastKeyExactlyAtEndTime (bool pFlag)
  Set the last key to be is exactly at end time or not.
bool  GetResamplingOnFrameRateMultiple () const
  Check if resampling is on frame rate multiple.
void  SetResamplingOnFrameRateMultiple (bool pFlag)
  Set the resample on a frame rate multiple.
bool  GetApplyUnroll () const
  Get the current state of the ApplyUnroll flag.
void  SetApplyUnroll (bool pFlag)
  Set the state of the ApplyUnroll flag.
bool  GetApplyConstantKeyReducer () const
  Get if constant key reducer is used.
void  SetApplyConstantKeyReducer (bool pFlag)
  Set if constant key reducer is used.
bool  GetResampleTranslation () const
  Get if the resample translation is used.
void  SetResampleTranslation (bool pFlag)
  Set the resample translation data.
void  SetSrcRotateOrder (int pOrder)
  Set the rotation order of the source.
void  SetDestRotateOrder (int pOrder)
  Set the rotation order of the destination.
void  SetForceApply (bool pVal)
  Set to force apply even if source and destination matrices are equivalent.
bool  GetForceApply () const
  Get if the force apply is used.

Exposed parent class methods

virtual bool  NeedApply (KFbxAnimCurve **pCurve, int pCount)
  Check if the given animation curve need an application of the filter.

Member Enumeration Documentation

Matrix ID

  • ePreGlobal
  • ePreTranslate
  • ePostTranslate
  • ePreRotate
  • ePreScale
  • ePostGlobal
  • eScaleOffset
  • eInactivePre
  • eInactivePost
  • eRotationPivot
  • eScalingPivot
  • eMatrixCount.
Enumerator:
ePreGlobal 
ePreTranslate 
ePostTranslate 
ePreRotate 
ePostRotate 
ePreScale 
ePostScale 
ePostGlobal 
eScaleOffset 
eInactivePre 
eInactivePost 
eRotationPivot 
eScalingPivot 
eMatrixCount 

Definition at line 1218 of file kfbxanimcurvefilters.h.


Constructor & Destructor Documentation

Constructor.

virtual ~KFbxAnimCurveFilterMatrixConverter ( ) [virtual]

Destructor.


Member Function Documentation

virtual const char* GetName ( ) const [virtual]

Get the name of the filter.

Returns:
Pointer to name.

Reimplemented from KFbxAnimCurveFilter.

virtual bool NeedApply ( KFbxAnimCurve **  pCurve,
int  pCount 
) [inline, 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 from KFbxAnimCurveFilter.

Definition at line 1112 of file kfbxanimcurvefilters.h.

{ return KFbxAnimCurveFilter::NeedApply(pCurve, pCount); }
virtual bool NeedApply ( KFbxAnimStack pAnimStack ) [inline, virtual]

This filter expects to works with interdependent curves.

Passing the animation stack makes no sense since this object would not know which curves to handle.

Parameters:
pAnimStack Animation stack.
Returns:
false

Reimplemented from KFbxAnimCurveFilter.

Definition at line 1120 of file kfbxanimcurvefilters.h.

{ return false; }
virtual bool NeedApply ( KFbxObject pObj,
KFbxAnimStack pAnimStack 
) [inline, virtual]

This filter expects to works with 3 interdependent curves.

Collecting all the animation curves from the properties defined in pObj could not guarantee that we are manipulating 3 interdependent curves.

Parameters:
pObj Object containing the properties to test.
pAnimStack Animation stack where to retrieve the animation curves
Returns:
false

Reimplemented from KFbxAnimCurveFilter.

Definition at line 1128 of file kfbxanimcurvefilters.h.

{ return false; }
virtual bool NeedApply ( KFbxAnimCurveNode pCurveNode[3] ) [virtual]

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

Parameters:
pCurveNode Curves to test if they needs application of filter
Returns:
true if the animation curve nodes needs an application of the filter and false if they don't or an incompatible configuration is detected.
Remarks:
This method assumes that pCurveNode[0] holds the translation curve, pCurveNode[1] holds the rotation curves and pCurveNode[2] holds the scaling curves.
virtual bool NeedApply ( KFbxAnimCurve pCurve ) [inline, virtual]

This filter expects to works with interdependent curves.

Receiving one single curve is useless.

Returns:
false

Reimplemented from KFbxAnimCurveFilter.

Definition at line 1143 of file kfbxanimcurvefilters.h.

{ return false; }
virtual bool Apply ( KFbxAnimStack pAnimStack ) [inline, virtual]

This filter expects to works with interdependent curves.

Passing the animation stack makes no sense since this object would not know which curves to handle.

Parameters:
pAnimStack Animation stack
Returns:
false.

Reimplemented from KFbxAnimCurveFilter.

Definition at line 1150 of file kfbxanimcurvefilters.h.

{ return false; }
virtual bool Apply ( KFbxObject pObj,
KFbxAnimStack pAnimStack 
) [inline, virtual]

This filter expects to works with 3 interdependent curves.

Collecting all the animation curves from the properties defined in pObj could not guarantee that we are manipulating 3 interdependent curves.

Parameters:
pObj Object containing the properties to test.
pAnimStack Animation stack where to retrieve the animation curves
Returns:
false

Reimplemented from KFbxAnimCurveFilter.

Definition at line 1158 of file kfbxanimcurvefilters.h.

{ return false; }
virtual bool Apply ( KFbxAnimCurveNode pCurveNode[3] ) [virtual]

Apply filter on all the curves of the animation curve nodes.

Parameters:
pCurveNode Curve nodes to which the filter is applied.
Returns:
true if the curve filtering operation was successful, false otherwise.
Remarks:
This method assumes that pCurveNode[0] holds the translation curve, pCurveNode[1] holds the rotation curves and pCurveNode[2] holds the scaling curves.
virtual bool Apply ( KFbxAnimCurve **  pCurve,
int  pCount 
) [virtual]

Apply filter on the given animation curve.

Parameters:
pCurve Array of curve to which the filter is applied.
pCount Number of curves in array.
Returns:
true if the curve filtering operation was successful, false otherwise.
Remarks:
pCount must be equal to 9
Because this method only manipulates KFbxAnimCurve objects, it cannot set/get the channels value. If the calling application wishes to use this flavor of the Apply() method, it is strongly suggested to use the method: KFbxAnimCurveFilterMatrixConverter::Apply(KFbxAnimCurve** pCurve, double& pVals[9]); The Apply(KFbxAnimCurveNode*) method is not affected by this limitation since the channels values can be accessed via the node.

Reimplemented from KFbxAnimCurveFilter.

bool Apply ( KFbxAnimCurve **  pCurve,
double *  pVals 
)

Apply filter on the given animation curve.

Parameters:
pCurve Array of curve to which the filter is applied.
pVals Array of channels values (same size as pCurve).
Returns:
true if the curve filtering operation was successful, false otherwise.
Remarks:
This method assumes that pCurve contains exactly 9 curves.
pVals must be correctly initialized with the channels values and, if the method calculates new values, they will be returned in this array.
The curves are assumed to represent: Translation X,Y and Z, Rotation X,Y and Z and Scaling X,Y and Z in this order.
virtual bool Apply ( KFbxAnimCurve pCurve ) [inline, virtual]

This filter expects to works with interdependent curves.

Receiving one single curve is useless.

Returns:
false

Implements KFbxAnimCurveFilter.

Definition at line 1198 of file kfbxanimcurvefilters.h.

{ return false; };
virtual void Reset ( ) [virtual]

Reset the filter to its default parameters.

Reimplemented from KFbxAnimCurveFilter.

void GetSourceMatrix ( EMatrixID  pIndex,
KFbxXMatrix pMatrix 
) const

Get the Translation Rotation Scaling source matrix.

Parameters:
pIndex The matrix ID.
pMatrix The matrix used to receive the source matrix.
void SetSourceMatrix ( EMatrixID  pIndex,
KFbxXMatrix pMatrix 
)

Set the Translation Rotation Scaling source matrix.

Parameters:
pIndex The matrix ID.
pMatrix The matrix used to set the source matrix.
void SetSourceMatrix ( EMatrixID  pIndex,
KgeAMatrix &  pMatrix 
)
void GetDestMatrix ( EMatrixID  pIndex,
KFbxXMatrix pMatrix 
) const

Get the Translation Rotation Scaling destination matrix.

Parameters:
pIndex The matrix ID.
pMatrix The matrix used to receive the destination matrix.
void SetDestMatrix ( EMatrixID  pIndex,
KFbxXMatrix pMatrix 
)

Set the Translation Rotation Scaling destination matrix.

Parameters:
pIndex The matrix ID.
pMatrix The matrix used to set the destination matrix.
void SetDestMatrix ( EMatrixID  pIndex,
KgeAMatrix &  pMatrix 
)
KTime GetResamplingPeriod ( ) const

Get the resampling period.

Returns:
the resampling period.
void SetResamplingPeriod ( KTime pResamplingPeriod )

Set the resampling period.

Parameters:
pResamplingPeriod The resampling period to be set.
bool GetGenerateLastKeyExactlyAtEndTime ( ) const

Check if the last key is exactly at the end time.

Returns:
true if last key is set exactly at end time.
void SetGenerateLastKeyExactlyAtEndTime ( bool  pFlag )

Set the last key to be is exactly at end time or not.

Parameters:
pFlag value to set if last key is set exactly at end time.
bool GetResamplingOnFrameRateMultiple ( ) const

Check if resampling is on frame rate multiple.

Returns:
true if resampling is on a frame rate multiple.
void SetResamplingOnFrameRateMultiple ( bool  pFlag )

Set the resample on a frame rate multiple.

Parameters:
pFlag The value to be set
Remarks:
It might be necessary that the starting time of the converted animation starts at an multiple of frame period starting from time 0. Most softwares play their animation at a definite frame rate, starting from time 0. As resampling occurs when we can't guarantee interpolation, keys must match with the moment when the curve is evaluated.
bool GetApplyUnroll ( ) const

Get the current state of the ApplyUnroll flag.

Returns:
true if the internal unroll filter is applied.
void SetApplyUnroll ( bool  pFlag )

Set the state of the ApplyUnroll flag.

Parameters:
pFlag New value of the flag. If set to true, an unroll is applied to the rotation curves.
bool GetApplyConstantKeyReducer ( ) const

Get if constant key reducer is used.

Returns:
true if constant key reducer is applied.
void SetApplyConstantKeyReducer ( bool  pFlag )

Set if constant key reducer is used.

Parameters:
pFlag value to set
bool GetResampleTranslation ( ) const

Get if the resample translation is used.

Returns:
true if translation data is resampled upon conversion.
Remarks:
If this flag isn't set, translation data must be calculated after the conversion process, overriding the resampling process.
void SetResampleTranslation ( bool  pFlag )

Set the resample translation data.

Parameters:
pFlag Value to be set.
Remarks:
If this flag isn't set, translation data must be calculated after the conversion process, overriding the resampling process.
void SetSrcRotateOrder ( int  pOrder )

Set the rotation order of the source.

Parameters:
pOrder The order to be set.
void SetDestRotateOrder ( int  pOrder )

Set the rotation order of the destination.

Parameters:
pOrder The order to be set.
void SetForceApply ( bool  pVal )

Set to force apply even if source and destination matrices are equivalent.

Parameters:
pVal If the forces apply is to be used
bool GetForceApply ( ) const

Get if the force apply is used.

Returns:
true if the force apply is used

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

KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter
KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter KFbxAnimCurveFilterMatrixConverter