Cafu Engine
AnimExprBlendT Class Reference
Inheritance diagram for AnimExprBlendT:

Public Member Functions

 AnimExprBlendT (const CafuModelT &Model, AnimExpressionPtrT A, AnimExpressionPtrT B, float Duration)
 
virtual void GetData (unsigned int JointNr, float &Weight, Vector3fT &Pos, cf::math::QuaternionfT &Quat, Vector3fT &Scale) const
 For the joint with the given JointNr, this function returns. More...
 
virtual bool AdvanceTime (float Time)
 Advances the time for this anim expression, that is, frame numbers of underlying animation sequences, cross-fades, etc. More...
 
virtual AnimExpressionPtrT Clone () const
 The virtual copy constructor. More...
 
virtual bool IsEqual (const AnimExpressionPtrT &AE) const
 Returns whether this anim expression is equal to A. More...
 
void ReInit (AnimExpressionPtrT A, AnimExpressionPtrT B, float Duration)
 Re-initializes this anim expression, so that it can be re-used with different parameters (on the same model). More...
 
AnimExpressionPtrT GetA () const
 Returns the "blend from" sub-expression. More...
 
AnimExpressionPtrT GetB () const
 Returns the "blend to" sub-expression. More...
 
float GetFrac () const
 Returns how far the blend has advanced. More...
 
- Public Member Functions inherited from AnimExpressionT
 AnimExpressionT (const CafuModelT &Model)
 The constructor. More...
 
virtual ~AnimExpressionT ()
 The (virtual) destructor. More...
 
const CafuModelTGetModel () const
 Returns the model that this is an anim expression for. More...
 
unsigned int GetRefCount () const
 Returns the number of IntrusivePtrT<>'s that currently refer to this anim expression. More...
 

Member Function Documentation

bool AnimExprBlendT::AdvanceTime ( float  Time)
virtual

Advances the time for this anim expression, that is, frame numbers of underlying animation sequences, cross-fades, etc.

Returns true if the end of an underlying animation sequence was reached (or in case of a looping sequence, if the sequence was wrapped).

Reimplemented from AnimExpressionT.

AnimExpressionPtrT AnimExprBlendT::Clone ( ) const
virtual

The virtual copy constructor.

Creates a new anim expression that is an exact copy of this, even when called via the base class pointer (the caller doesn't need to know the exact derived class).

Implements AnimExpressionT.

AnimExpressionPtrT AnimExprBlendT::GetA ( ) const
inline

Returns the "blend from" sub-expression.

AnimExpressionPtrT AnimExprBlendT::GetB ( ) const
inline

Returns the "blend to" sub-expression.

void AnimExprBlendT::GetData ( unsigned int  JointNr,
float &  Weight,
Vector3fT Pos,
cf::math::QuaternionfT Quat,
Vector3fT Scale 
) const
virtual

For the joint with the given JointNr, this function returns.

  • the joint weight,
  • the joints position, quaternion and scale values.

Implements AnimExpressionT.

float AnimExprBlendT::GetFrac ( ) const
inline

Returns how far the blend has advanced.

bool AnimExprBlendT::IsEqual ( const AnimExpressionPtrT AE) const
virtual

Returns whether this anim expression is equal to A.

Two anim expressions are equal if their GetData() methods return the same data.

Implements AnimExpressionT.

void AnimExprBlendT::ReInit ( AnimExpressionPtrT  A,
AnimExpressionPtrT  B,
float  Duration 
)

Re-initializes this anim expression, so that it can be re-used with different parameters (on the same model).

Note that resetting A, B or Duration individually is not possible, because the implementation may prune and drop A when the blend is complete.


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