summaryrefslogtreecommitdiff
path: root/basedProject/src/viewpoint.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2014-02-26 10:57:16 +0000
committerComment <tim@gray.(none)>2014-02-26 10:57:16 +0000
commit0e436679aa8c09a08e20849f204c969eb2d875b8 (patch)
tree2619f53f16c571dc19326d395aa420ceb0a29de7 /basedProject/src/viewpoint.h
initial commit
Diffstat (limited to 'basedProject/src/viewpoint.h')
-rw-r--r--basedProject/src/viewpoint.h66
1 files changed, 66 insertions, 0 deletions
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<string,string>&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;
+
+
+};