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 =========================================================================*/
22 #ifndef vtkOculusCamera_h
23 #define vtkOculusCamera_h
24 
25 #include "vtkRenderingOculusModule.h" // For export macro
26 #include "vtkOpenGLCamera.h"
27 #include "vtkNew.h" // ivars
28 #include "vtkTransform.h" // ivars
29 
30 class vtkOculusRenderer;
31 class vtkMatrix3x3;
32 class vtkMatrix4x4;
33 
34 class VTKRENDERINGOCULUS_EXPORT vtkOculusCamera : public vtkOpenGLCamera
35 {
36 public:
37  static vtkOculusCamera *New();
39 
43  virtual void Render(vtkRenderer *ren);
44 
45  virtual void GetKeyMatrices(vtkRenderer *ren, vtkMatrix4x4 *&WCVCMatrix,
46  vtkMatrix3x3 *&normalMatrix, vtkMatrix4x4 *&VCDCMatrix, vtkMatrix4x4 *&WCDCMatrix);
47 
52  virtual void GetTrackingToDCMatrix(vtkMatrix4x4 *&TCDCMatrix);
53 
55 
59  vtkSetVector3Macro(Translation,double);
60  vtkGetVector3Macro(Translation,double);
62 
63 protected:
65  ~vtkOculusCamera();
66 
67  // gets the pose and projections for the left and right eves from
68  // the Oculus library
69  void GetHMDEyePoses(vtkRenderer *);
70  void GetHMDEyeProjections(vtkRenderer *);
71 
76 
80 
83 
84  // used to scale and/or translate the
85  // View to the HMD space
86  double Translation[3];
88 
89 private:
90  vtkOculusCamera(const vtkOculusCamera&); // Not implemented.
91  void operator=(const vtkOculusCamera&); // Not implemented.
92 };
93 
94 #endif
static vtkOpenGLCamera * New()
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkMatrix4x4 * RightEyeProjection
abstract specification for renderers
Definition: vtkRenderer.h:57
vtkNew< vtkTransform > PoseTransform
vtkMatrix4x4 * LeftEyeProjection
void Render(vtkRenderer *ren) override
Implement base class method.
vtkMatrix4x4 * RightWCDCMatrix
virtual void GetKeyMatrices(vtkRenderer *ren, vtkMatrix4x4 *&WCVCMatrix, vtkMatrix3x3 *&normalMatrix, vtkMatrix4x4 *&VCDCMatrix, vtkMatrix4x4 *&WCDCMatrix)
Oculus camera.
vtkMatrix4x4 * RightVCDCMatrix
Oculus renderer.
vtkMatrix4x4 * RightWCVCMatrix
vtkMatrix4x4 * RightEyePose
vtkMatrix4x4 * LeftEyeTCDCMatrix
vtkMatrix4x4 * RightEyeTCDCMatrix
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:33
OpenGL camera.
vtkMatrix4x4 * LeftEyePose