Animation expressions describe the "skeleton pose" of a model. More...
#include "AnimExpr.hpp"
Public Member Functions | |
AnimExpressionT (const CafuModelT &Model) | |
The constructor. More... | |
virtual | ~AnimExpressionT () |
The (virtual) destructor. More... | |
const CafuModelT & | GetModel () 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... | |
virtual void | GetData (unsigned int JointNr, float &Weight, Vector3fT &Pos, cf::math::QuaternionfT &Quat, Vector3fT &Scale) const =0 |
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 =0 |
The virtual copy constructor. More... | |
virtual bool | IsEqual (const AnimExpressionPtrT &AE) const =0 |
Returns whether this anim expression is equal to A . More... | |
Friends | |
template<class T > | |
class | IntrusivePtrT |
Animation expressions describe the "skeleton pose" of a model.
They are used as an input to AnimPoseT instances, which use the "skeleton pose" expressed by an anim expression in order to derive the "full pose", including meshes and other features such as collision detection. In other words, AnimPoseT's refer to an AnimExpressionT for the "configuration" of its pose.
AnimExpressionT's can be hierarchically composed, just like mathematical expressions, which is in fact their strongest and most important feature. They are also very easy and care-free to use and have very good performance, because when obtained from an AnimExprPoolT, the pool minimizes both the number of instances as well as the penalties from memory allocations and deletes.
AnimExpressionT::AnimExpressionT | ( | const CafuModelT & | Model | ) |
The constructor.
(It's ok to have this in "public" instead of "protected": we have pure virtual methods as well.)
|
inlinevirtual |
The (virtual) destructor.
|
inlinevirtual |
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 in AnimExprBlendT, AnimExprCombineT, AnimExprFilterT, and AnimExprStandardT.
|
pure 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).
Implemented in AnimExprBlendT, AnimExprCombineT, AnimExprFilterT, and AnimExprStandardT.
|
pure virtual |
For the joint with the given JointNr, this function returns.
Implemented in AnimExprBlendT, AnimExprCombineT, AnimExprFilterT, and AnimExprStandardT.
|
inline |
Returns the model that this is an anim expression for.
|
inline |
Returns the number of IntrusivePtrT<>'s that currently refer to this anim expression.
This is especially useful for the implementation of "pools" of AnimExpressionT's, so that the pool implementation can learn if this instance is available for being re-used.
|
pure virtual |
Returns whether this anim expression is equal to A
.
Two anim expressions are equal if their GetData() methods return the same data.
Implemented in AnimExprBlendT, AnimExprCombineT, AnimExprFilterT, and AnimExprStandardT.