Untitled
By: a guest | Feb 9th, 2010 | Syntax:
C++ | Size: 1.22 KB | Hits: 24 | Expires: Never
// here we set / get the weight of the animation on this channel
// for example if we have a walk leg animation and a upper body gun fire
// animation we set both to weight 1
// but if we have a transition between a walk animation in channel 0
// and a running animation in channel 1 we lerp the weights
void setChannelWeight(int channel, float weight);
float getChannelWeight(int channel) const;
// here we control what animation will run at which channel
// by default the animation will start instantly when mounted and
// demount itself when done
// but this can be changed so it loop indefinetly or a set amount of times
bool mountChannelAnimation(int channel, const std::string & name);
void demountChannelAnimation(int channel);
// here we can control the state of a channel
// for example we can change at which frame a channel is at,
// by default the speed is 1 frame each update cycle but this
// can be controlled by a float value
void setChannelFrame(int channel, int frame);
void setChannelSpeed(int channel, float speed);
// this only works after something has been mounted on this channel
// and it returns the number of frames in the animation
int getChannelLength(int channel) const;