summaryrefslogtreecommitdiffstats
path: root/headtrack_stereo_demo/src/typedefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'headtrack_stereo_demo/src/typedefs.h')
-rw-r--r--headtrack_stereo_demo/src/typedefs.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/headtrack_stereo_demo/src/typedefs.h b/headtrack_stereo_demo/src/typedefs.h
new file mode 100644
index 0000000..55e2da5
--- /dev/null
+++ b/headtrack_stereo_demo/src/typedefs.h
@@ -0,0 +1,36 @@
+#ifndef TYPEDEFS_HEADER_FILE
+
+#define TYPEDEFS_HEADER_FILE
+
+#include <wiimote.h>
+
+typedef struct FrustumParms
+{
+ double m_dHeadTrackLedDist; //distance between leds on head in millimeters
+ double m_dRadPerCameraPixel; //radians per camera pixel
+ double m_dCameraXCenter; //the coordinates of the center of the camera
+ double m_dCameraYCenter; //
+ double m_dYAngleCorrection; //the correction added to the verticle angle measured by the camera (in radians)
+ double m_dCameraYOffset; //the offset in Y direction of the camera relative to the center of the screen (in mm)
+ double m_dScreenHeightMM; //the height of the screen (in mm)
+ double m_dScreenAspect; //the aspect ratio of the screen (width/height)
+ double m_dScreenHeightWorld; //the height of the screen (in world coordinates)
+ double m_dEyeDistMM; //distance between the eyes (in mm)
+ double m_dDefHeadDistMM; //default distance between head and display (in mm)
+} FrustumParms_t;
+
+typedef enum EyeOrigin {
+ STEREO_LEFT_EYE = 0,
+ STEREO_RIGHT_EYE = 1,
+ MONO_CENTER = 2
+} EyeOrigin_t;
+
+typedef struct GameState
+{
+ FrustumParms_t m_FrustumParms;
+ bool m_bHeadTrackingEnabled;
+ bool m_bStereoEnabled;
+ wiimote *m_pTrackingWiimote;
+ GLuint m_GreyScaleShaderProgram;
+} GameState_t;
+#endif //TYPEDEFS_HEADER_FILE \ No newline at end of file