Site Hosted by: Logo

Support This Project

ad::Blend Class Reference

Hierarchial blend node. More...

#include <animation.h>

Inherits ad::BlendBase.

Inheritance diagram for ad::Blend:

Inheritance graph
Collaboration diagram for ad::Blend:

Collaboration graph
List of all members.

Public Member Functions

 Blend (unsigned int numBones, BlendBase *from=0, BlendBase *to=0)
 Construct a blend between from and to.
 ~Blend ()
 Destroy the Blend.
void Calculate (Pose *out_pose, HiBoneMask *optionalMask=0)
 Hierarchial calculate function.

Public Attributes

float weight
 Blend weight between the from and to poses.
 Source pose for blending.
 Source pose for blending.

Detailed Description

Hierarchial blend node.

This class allows you to blend between other blends like itself, AnimPlayer, or any other class derived from BlendBase. To use this class, simply construct it with pointers to two instances of any classes derived from BlendBase. Set the weight in the range of 0 to 1, to set how much to blend between the from and to poses. Then call the Calculate() function and pass it a pose to write the results to, for example, the final render pose. It is only necessary to call calculate on the top most Blend in a hierarchy.

The source pose blends can be set directly as long as the blend was initialized with a numBones large enough to hold the results of the new source blend.

See also:
ad::BlendBase, ad::AnimPlayer, ad::HiBoneMask

Constructor & Destructor Documentation

ad::Blend::Blend unsigned int  numBones,
BlendBase from = 0,
BlendBase to = 0

Construct a blend between from and to.

This creates the blend, and allocates temporaries for intermediate calculate calls for the from and two poses. The from and to poses are optional but the source poses must be set before the calculate function is called.

numBones This is used to create temporary poses with numBones number of bones, which needs to be large enough to store the results of the source pose blends.

Member Function Documentation

void ad::Blend::Calculate Pose out_pose,
HiBoneMask optionalMask = 0

Hierarchial calculate function.

This will call the calculate for the two source blends, and blend between the resulting poses. The result is stored in out_pose, and a selection mask can be provided to limit the calculations to only the selected bones.

Implements ad::BlendBase.

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

© Copyright 2005 John Butterfield.
All Rights Reserved.