root / branches / test / CCV_Select_Camera / addons / ofxNCore / src / MultiCams / CamsUtils.h @ 68

View | Annotate | Download (1.5 KB)

1
//! CamsUtils.h
2
/*!
3
*  
4
*
5
*  Created by Yishi Guo on 06/13/2011.
6
*  Copyright 2011 NUI Group. All rights reserved.
7
*
8
*/
9
// ----------------------------------------------
10
11
#ifndef CAMS_UTILS_H
12
#define CAMS_UTILS_H
13
14
// ----------------------------------------------
15
16
#include "PS3.h"
17
#include "ofxXmlSettings.h"
18
19
// ----------------------------------------------
20
21
class CamsUtils {
22
public:
23
        CamsUtils();
24
        ~CamsUtils();
25
26
        void setup( CLEyeCameraColorMode colorMode, CLEyeCameraResolution camRes, float frameRate );
27
        void update();
28
        void start();
29
        void stop();
30
31
        int getCount();
32
        int getXGrid();
33
        int getYGrid();
34
35
        PS3* getCam( int index );
36
        PS3* getCam( int x, int y );
37
        PS3* getRawCam( int index );
38
39
        PS3** getCams();
40
        PS3** getRawCams();
41
42
        bool isSelected( int rawId );
43
        void setSelected( int rawId );
44
        bool isUsed( int displayId );
45
46
        void setXY( int x, int y );
47
        void setCam( int index, PS3* cam );
48
        void setCam( int x, int y, PS3* cam );
49
        void resetAll();
50
51
        //! Save the settings to XML file
52
        void saveXML( string filename = "" );
53
54
        int camCount, selectedCamCount;
55
        int xGrid, yGrid;
56
        PS3** rawCams;
57
        PS3** displayCams;
58
        bool* camsSelected;
59
        bool* camsUsed;
60
61
private:
62
        int getDevicesCount();
63
        GUID getGUID( int camId );
64
        void createDisplayCams( int x, int y);
65
66
        CLEyeCameraColorMode colorMode;
67
        CLEyeCameraResolution camRes;
68
        float frameRate;
69
        ofxXmlSettings XML;
70
};
71
72
// ----------------------------------------------
73
74
#endif
75
76
// ----------------------------------------------