summaryrefslogtreecommitdiff
path: root/src/viewport.h
blob: f635e51ebd073009f1de9a361b455349d67fa78e (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
#ifndef VIEWPORT_H
#define VIEWPORT_H


#include "ofxKinect.h"
#include "ofMain.h"
#include "keyVar.h"

#define POINTS 1
#define LINES 2
#define POLYS 3

#include "ofxMayaCam.h"


class viewport
{
    public:
	viewport();
	viewport(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy);
        void setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy);
        virtual ~viewport();
        void setKinect(ofxKinect *k);
	void setFade(int f);
    
	void setcam(map<string,float>&settings);
        double getSetting(const string& setting);
    
	void mousePressedEvent(int xs,int ys,float sc,float fs);
        
	void draw(int mode,int fade,float decimate, float feat, float xr, float yr, float zr, int range, bool dologo);
	void drawgui();
	ofFbo rb1,rb2; //can do 2d buffer effects with feedback, can pass out rb2 for preview
    
	void keyPressed(int key);
        void keyReleased(int key);
    
    ofxMayaCam camera;
    float xrot,yrot,zrot;
    
    protected:
		int x, y,w,h,ox,oy,r;
		int xshift, yshift;
		float scale,fscale;
    
		ofImage logo;
		
    
		ofxKinect *kinect; //passes in kinect data
		//passes in a playing move that can be used to generate 3D points in teh same way
    private:
		map<string,keyVar> vars; //change to midimappedkeyvars


		
        
        
};


#endif // VIEWPORT_H