// MidiVizParticle
// Lew Hill II
// a simple wparticle for midi viz audio levels

#ifndef _MIDI_VIZ_PARTICLE_
#define _MIDI_VIZ_PARTICLE_

#include <GL/gl.h>
#include <math.h>
#include <iostream>

#define TRAIL_LENGTH 5

using namespace std;

class MidiVizParticle {

 public:

  MidiVizParticle();
  void init();
  void step(float delta_t);
  void draw(int mode);
  void drawWater();

  void setPosition(float x, float y, float z);
  float* getPosition();

  void setVelocity(float x, float y, float z);
  float* getVelocity();

  void setAcceleration(float x, float y, float z);

  void setColor(float r, float g, float b);

  bool isMoving();
  void start();
  void stop();

  void drawbox(GLdouble x0, GLdouble x1, 
	       GLdouble y0, GLdouble y1, 
	       GLdouble z0, GLdouble z1, GLenum type);

 private:
  float pos[3];
  float vel[3];
  float accel[3];
  float trail[TRAIL_LENGTH][3];
  float color[3];

  bool moving; // status bit.. 0 = not moving.. 1 = moving.
};

#endif

