Share Pastebin
Guest
Public paste!

Untitled

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