Merge branch 'master' of goat:git/laserbrain_demo
[laserbrain_demo] / src / avatar.h
diff --git a/src/avatar.h b/src/avatar.h
new file mode 100644 (file)
index 0000000..6c3521e
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef AVATAR_H_
+#define AVATAR_H_
+
+#include <gmath/gmath.h>
+
+/* when head-tracking is available, head_tilt is ignored, and the
+ * body_rot (controlled by mouse/gamepad) is independent of head_rot.
+ *
+ * without head-tracking, head_rot is derived from body_rot and head_tilt
+ */
+class Avatar {
+public:
+       Vec3 pos;
+       float body_rot;
+       Quat head_rot;          // used when head-tracking
+       float head_tilt;        // used for mouselook
+
+       Avatar();
+       ~Avatar();
+
+       void draw() const;
+};
+
+#endif // AVATAR_H_