#pragma once

#define OF_ADDON_USING_OFXVECTORMATH
#define OF_ADDON_USING_OFXXMLSETTINGS

#include "ofAddons.h"
#include "ofMain.h"

#include "baseCardScene.h"
#include "arPlane.h"
#include "sonarResponder.h"



class sonarScene : public baseCardScene{
		
	public:
		//----------------------------------
		sonarScene();
		void setupScene();
		void render();		
		void update();
		//void exit();
		
		void keyPressed( int key );
		void keyReleased( int key );
		
		void mouseMoved( int x, int y );
		void mouseDragged( int x, int y, int button );
		void mousePressed( int x, int y, int button );
		void mouseReleased(int x, int y, int button );
	
		//void audioReceived( float * input, int bufferSize, int nChannels );
		//void audioRequested( float * output, int bufferSize, int nChannels );
		
		bool recordingPts;
		int whichPt;
		ofPoint planePts[4];
		arPlane plane;
		ofxXmlSettings xml;
	
		float mx;
		float my;

		float angleOfScanner;
	
		ofxMidiOut midi;
		arFakeMarker fakeMarker;
		ofImage hsvImg;
	
		vector <sonarResponder> responders;
		ofxVec3f colors[13];

		vector <sonarResponder> feedback; // these are the animators 
	
		vector <float>	prevAnglesOfScanner; // scanner angles;
		ofSoundPlayer snds[70];
	
	
	
	
};