summaryrefslogtreecommitdiffstats
path: root/matchblox/engine/typedefs.h
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-05-20 17:15:44 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-05-20 17:15:44 (GMT)
commite58a5c5e7bf915703556013a8323953866f0adb8 (patch)
tree10a9a50217ec92a3270c74c7bf3d917c8d62ac93 /matchblox/engine/typedefs.h
parentc7c995631d14d5c65d538422159b782752e9357c (diff)
download2iv55-e58a5c5e7bf915703556013a8323953866f0adb8.zip
2iv55-e58a5c5e7bf915703556013a8323953866f0adb8.tar.gz
2iv55-e58a5c5e7bf915703556013a8323953866f0adb8.tar.bz2
+ wiimote init
Diffstat (limited to 'matchblox/engine/typedefs.h')
-rw-r--r--matchblox/engine/typedefs.h38
1 files changed, 36 insertions, 2 deletions
diff --git a/matchblox/engine/typedefs.h b/matchblox/engine/typedefs.h
index 7acb776..3821bc6 100644
--- a/matchblox/engine/typedefs.h
+++ b/matchblox/engine/typedefs.h
@@ -2,9 +2,11 @@
#define TYPEDEFS_H
+#include <wiimote.h>
#include <vector>
-#include <limits>
+#include <limits>
+#undef max
typedef struct vec3d
{
@@ -150,7 +152,39 @@ typedef struct geom
m_norms,
m_texs;
std::vector<Triangle_t> m_triangles;
-} Geometry_t;
+} Geometry_t;
+
+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; //handle to the grayscale shader program
+ GLint m_GSConvScaleLoc; //handle to the g_ConversionScale variable in the shader
+ GLfloat m_GSConvScale[3]; //grayscale conversion scale (default 0.299, 0.587, 0.114)
+} GameState_t;
#endif //TYPEDEFS_H