//
// Bouncing ball demo. 
//
//
// Original: Brian Paul
// Conversion to GLUT by Mark J. Kilgard 
//

// Modified for use in cs4731 by Mark R. Stevens (February 16, 2000)
// contact: stevensm@cs.wpi.edu with comments / concerns

#ifndef BOUNCE
#define BOUNCE

// the base class
#include "cs4731app.h"

// The main class definition
class bounce : public cs4731app {

 public:

  // initialize
  virtual void init(minigl &mgl, miniglut &mglut);

  // draws a all of the bounce
  virtual void draw(minigl &mgl, miniglut &mglut);

  // change the window size 
  virtual void reshape(minigl &mgl, miniglut &mglut, int width, int height);

  // outputs the usage to the screen to show what the keys do
  virtual void usage();

  // receive keyboard events
  virtual void key    (minigl &mgl, miniglut &mglut, unsigned char k, int x, int y);

  // receive mouse events
  virtual void mouse (minigl &mgl, miniglut &mglut, int button, int state, int x, int y);

  virtual void special(minigl &mgl, miniglut &mglut, int k, int x, int y);

 protected:

  // draw a ball
  void drawBall(minigl &mgl);

 private:

  // parameters for the ball position
  float Zrot;
  float Zstep;
  float Xpos;
  float Ypos;
  float Xvel;
  float Yvel;
  float Xmin;
  float Xmax;
  float Ymin;
  float Ymax;
  float G;
  
};

#endif
