summaryrefslogtreecommitdiff
path: root/basedProject/src/viewpoint.h
blob: 94e5fd10859a7b5749ad3f1596a9411d829cef43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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;
	

};