From 0e436679aa8c09a08e20849f204c969eb2d875b8 Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 26 Feb 2014 10:57:16 +0000 Subject: initial commit --- basedProject/src/viewpoint.h | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 basedProject/src/viewpoint.h (limited to 'basedProject/src/viewpoint.h') diff --git a/basedProject/src/viewpoint.h b/basedProject/src/viewpoint.h new file mode 100644 index 0000000..94e5fd1 --- /dev/null +++ b/basedProject/src/viewpoint.h @@ -0,0 +1,66 @@ +/* + * 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; + + +}; -- cgit v1.2.3