VTK
vtkOculusCamera.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4 
5  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
25 #ifndef vtkOculusCamera_h
26 #define vtkOculusCamera_h
27 
28 #include "vtkRenderingOculusModule.h" // For export macro
29 #include "vtkOpenGLCamera.h"
30 #include "vtkNew.h" // ivars
31 #include "vtkTransform.h" // ivars
32 
33 class vtkOculusRenderer;
34 class vtkMatrix3x3;
35 class vtkMatrix4x4;
36 
37 class VTKRENDERINGOCULUS_EXPORT vtkOculusCamera : public vtkOpenGLCamera
38 {
39 public:
40  static vtkOculusCamera *New();
42 
46  virtual void Render(vtkRenderer *ren);
47 
48  virtual void GetKeyMatrices(vtkRenderer *ren, vtkMatrix4x4 *&WCVCMatrix,
49  vtkMatrix3x3 *&normalMatrix, vtkMatrix4x4 *&VCDCMatrix, vtkMatrix4x4 *&WCDCMatrix);
50 
55  virtual void GetTrackingToDCMatrix(vtkMatrix4x4 *&TCDCMatrix);
56 
58 
62  vtkSetVector3Macro(Translation,double);
63  vtkGetVector3Macro(Translation,double);
65 
66 protected:
68  ~vtkOculusCamera();
69 
70  // gets the pose and projections for the left and right eves from
71  // the Oculus library
72  void GetHMDEyePoses(vtkRenderer *);
73  void GetHMDEyeProjections(vtkRenderer *);
74 
79 
83 
86 
87  // used to scale and/or translate the
88  // View to the HMD space
89  double Translation[3];
91 
92 private:
93  vtkOculusCamera(const vtkOculusCamera&); // Not implemented.
94  void operator=(const vtkOculusCamera&); // Not implemented.
95 };
96 
97 #endif
static vtkOpenGLCamera * New()
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
vtkMatrix4x4 * RightEyeProjection
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkNew< vtkTransform > PoseTransform
vtkMatrix4x4 * LeftEyeProjection
vtkMatrix4x4 * RightWCDCMatrix
virtual void GetKeyMatrices(vtkRenderer *ren, vtkMatrix4x4 *&WCVCMatrix, vtkMatrix3x3 *&normalMatrix, vtkMatrix4x4 *&VCDCMatrix, vtkMatrix4x4 *&WCDCMatrix)
Oculus camera.
vtkMatrix4x4 * RightVCDCMatrix
Oculus renderer.
void Render(vtkRenderer *ren)
Implement base class method.
vtkMatrix4x4 * RightWCVCMatrix
vtkMatrix4x4 * RightEyePose
vtkMatrix4x4 * LeftEyeTCDCMatrix
vtkMatrix4x4 * RightEyeTCDCMatrix
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:36
OpenGL camera.
vtkMatrix4x4 * LeftEyePose