// MidiVizSpinnerGroup
// Lew Hill II

#include <GL/gl.h>
#include "MidiEvent.h"
#include "NoteColorLookupTable.h"


class MidiVizSpinnerGroup{

 public:
  
  MidiVizSpinnerGroup();
  void init();
  void draw();
  void frame();

  void processMidiEvent(MidiEvent event);
  
  void setPosition(float x, float y, float z ){
    position[0] = x;
      position[1] = y;
      position[2] = z;
  }
  
  void setRotation(float x, float y, float z){
    rotation[0] = x;
    rotation[1] = y;
    rotation[2] = z;
  }

  void setScale(float x, float y, float z){
    scale[0] = x;
    scale[1] = y;
    scale[2] = z;
    
  }

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

 private:

  float noteHeight[12];
  float deltaNoteHeight[12];
  float noteSpin[12];
  float deltaNoteSpin[12];
  
  float centerSpinSpeed;
  float centerSpinAngle;

  float position[3];
  float rotation[3];
  float scale[3];
  NoteColorLookupTable color_table; 

  float noteValues[12];

};

