// MidiVizControllerBank
// Lew Hill II

#ifndef _MIDI_VIZ_CONTRLLER_SPHERE_
#define _MIDI_VIZ_CONTRLLER_SPHERE_

#include <GL/gl.h>
#include "MidiEvent.h"
#include "SynesthesiaColorLookupTable.h"
#include <math.h>

#define MV_PI 3.1428571
#define MV_PI_RAD  MV_PI/180.0


// controller locations are 
// knob_1-knob_8        cells 0-7;


class MidiVizControllerSphere{

 public:
  
  MidiVizControllerSphere();
  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 controllerValues[8];
  float rotaryAngles[8];

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

  float orbitCoordinates[360][2];

};


#endif

