Mercurial > hg > soniczoomios
view testApp.h @ 0:307e5fb699fb
First commit.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Mon, 19 Nov 2012 12:56:47 +0000 |
parents | |
children | 23efe1f0cd8a |
line wrap: on
line source
#pragma once #include "ofMain.h" #include "ofxiPhone.h" #include "ofxiPhoneExtras.h" #include "ofxOsc.h" #include "grid.h" #include "2dvector.h" #include "ofxUI.h" #include "eventLogger.h" #define HOST "169.254.1.1" #define PORT 12345 class testApp : public ofxiPhoneApp { public: int prevTouchX; int prevTouchY; double prevDist; // not many so dont bother with vectors/arrays? TwoVector touch0; TwoVector touch1; TwoVector prevTouch0; TwoVector prevTouch1; bool xLocked, yLocked; TwoVector moveVel; // velocity at which we were moving the grid vector <ofxUISlider *> sliders; double slowFactor; double zoomVel; // do the same double prevZoom, prevZoom2; TwoVector prevMove, prevMove2; vector<int> sliderVals; int numActiveTouches; ofxiPhoneKeyboard * keyboard; // void setup(); void update(); void draw(); void exit(); void touchDown(ofTouchEventArgs &touch); void touchMoved(ofTouchEventArgs &touch); void touchUp(ofTouchEventArgs &touch); void touchDoubleTap(ofTouchEventArgs &touch); void touchCancelled(ofTouchEventArgs &touch); vector<float> vectorFilter(vector<float> newVec); void lostFocus(); void gotFocus(); void gotMemoryWarning(); void deviceOrientationChanged(int newOrientation); ofxOscSender sender; void sendOSCParams(); // stardard GUI - knbs and sliders - hides zoomer bool standardGUIShowing; void standardGUIEvent(ofxUIEventArgs &e); void setupStandardGui(); ofxUICanvas *standardGUI; // zoom gui - the swap view button and save preset button void zoomGUIEvent(ofxUIEventArgs &e); void setupZoomGui(); void updateSliderValue(int which, float value); void setGUISliders(vector<int> vals); ofxUICanvas *zoomGUI; };