![]() |
Public API Reference |
![]() |
Factory for the 'speed' animation node. More...
#include <imesh/animnode/speed.h>
Public Member Functions | |
virtual void | AddNode (iSkeletonAnimNodeFactory *factory, float speed)=0 |
Add a child animation node to this node. |
Factory for the 'speed' animation node.
This animation node takes some animations of the animesh moving at different speed (eg idle, walking, running), and blend them to achieve any custom speed.
virtual void CS::Animation::iSkeletonSpeedNodeFactory::AddNode | ( | iSkeletonAnimNodeFactory * | factory, |
float | speed | ||
) | [pure virtual] |
Add a child animation node to this node.
This child node should provide the animation of the animesh moving at the given speed.
The factory node should have been made cyclic, otherwise the 'speed' animation node will not work properly. However, as a user help, if the node is a CS::Animation::iSkeletonAnimationNodeFactory, then the call to CS::Animation::iSkeletonAnimationNodeFactory::SetCyclic() is made automatically.
Also, all animations that are added must be synchronized on their first frame, eg all animations starting when the left foot touches the ground. The animations can have different duration, but they need to have only one cycle of the animation (eg the animation stops when the left foot touches again the ground).
The speed scale is arbitrary and do not have to correspond to the effective mesh speed, it is the ratio between the various speeds that is important. A speed of 0 is absolutely allowed and will be treated differently, but a negative speed has not been tested...