/* * viewpoint.h * 3dnav * * Created by Tim Redfern on 20/12/2011. * one projector's viewpoint * */ #include "ofMain.h" #include "mapUtils.h" #include "keyVar.h" class viewpoint { public: void setup(map&settings); double getSetting(const string& setting); void begin(); void end(bool showStats=false); void begin2d(); void end2d(); void setDefaults(); void keyPressed(int key); void keyReleased(int key); void setLight(); ofFbo renderFBO; float distortFactor; bool vertigo; float getWidth(){ return ofGetWidth()*w; }; float getHeight(){ return ofGetHeight()*h; }; float getX(){ return ofGetWidth()*x; }; float getY(){ return ofGetHeight()*y; }; private: ofRectangle window; double fov,aspect,near,far; ofCamera camera; ofNode target; keyVar* vars; //int lightNum; //GLfloat lightColour[]; //GLfloat* getLightPosition; //ofLight light; float x,y,w,h; };