vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
htUtils.h
Go to the documentation of this file.
1 #pragma once
2 #ifndef __HEAD_TRACKING_UTILS_H
3 #define __HEAD_TRACKING_UTILS_H
4 
5 // TODO Left/right handed coordinate systems
6 
7 #include <osg/Vec3>
8 #include <osg/Vec4>
9 #include <osg/Matrix>
10 #include "Vec2i"
11 
12 namespace ht
13 {
14 
16  class Screen
17  {
18  private:
20  osg::Matrix scr_matrix;
21  osg::Matrix scr_matrix_inv;
22 
24  bool valid;
25  public:
26  Screen();
27 
36  void SetScreen(osg::Vec3 corner, osg::Vec3 width, osg::Vec3 height);
37 
45 // bool GetScreen(osg::Vec3 &corner, osg::Vec3 &width, osg::Vec3 &height) const;
46 
48  inline const osg::Matrix& GetMatrix() const
49  { return scr_matrix; }
50 
53  inline const osg::Matrix& GetMatrixInv() const
54  { return scr_matrix_inv; }
55 
57  inline bool IsValid() const
58  { return valid; }
59  };
60 
61 }
62 
63 #endif // __HEAD_TRACKING_UTILS_H