Image Animation
// Image animation.
class RVAPI ImageAnim : public AnimInt
{
public:
// Check if new frame number was returned from animate.
bool IsNewFrame() const;
// Get frame count.
uint GetFrameCount() const;
// Animate image and return frame number.
uint Animate();
// Set image animation to animate [frameCount] frames organized in [colCount] columns
// at [fps] frames per second using [mode] animation mode. Set [reverse] to true to
// play animation in reverse.
void Set(const S2i &dims, uint frameCount, uint columnCount,
float fps = 30, Mode mode = Mode::CLAMP, bool reverse = false);
// Internal.
void *operator () () const { return (void *)wobj; }
// Construct image animation using animated material [animMat].
ImageAnim(AnimMat &animMat);
// Destructor.
~ImageAnim();
private:
byte wobj[128];
};