VTK
vtkOpenVRCamera.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 vtkOpenVRCamera_h
26 #define vtkOpenVRCamera_h
27 
28 #include "vtkRenderingOpenVRModule.h" // For export macro
29 #include "vtkOpenGLCamera.h"
30 #include "vtkNew.h" // ivars
31 #include "vtkTransform.h" // ivars
32 
33 class vtkOpenVRRenderer;
34 class vtkMatrix3x3;
35 class vtkMatrix4x4;
36 
37 class VTKRENDERINGOPENVR_EXPORT vtkOpenVRCamera : public vtkOpenGLCamera
38 {
39 public:
40  static vtkOpenVRCamera *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:
69 
70  // gets the pose and projections for the left and right eves from
71  // the openvr library
74 
79 
83 
86 
87  // used to translate the
88  // View to the HMD space
89  double Translation[3];
91 
92 private:
93  vtkOpenVRCamera(const vtkOpenVRCamera&); // Not implemented.
94  void operator=(const vtkOpenVRCamera&); // Not implemented.
95 };
96 
97 #endif
represent and manipulate 3x3 transformation matrices
Definition: vtkMatrix3x3.h:37
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
OpenGL camera.
OpenVR camera.
vtkMatrix4x4 * LeftEyeProjection
vtkMatrix4x4 * RightEyeTCDCMatrix
vtkMatrix4x4 * RightWCVCMatrix
vtkNew< vtkTransform > PoseTransform
static vtkOpenVRCamera * New()
virtual void GetKeyMatrices(vtkRenderer *ren, vtkMatrix4x4 *&WCVCMatrix, vtkMatrix3x3 *&normalMatrix, vtkMatrix4x4 *&VCDCMatrix, vtkMatrix4x4 *&WCDCMatrix)
vtkMatrix4x4 * RightWCDCMatrix
vtkMatrix4x4 * RightEyePose
vtkMatrix4x4 * LeftEyePose
vtkMatrix4x4 * LeftEyeTCDCMatrix
void GetHMDEyePoses(vtkRenderer *)
vtkMatrix4x4 * RightVCDCMatrix
virtual void Render(vtkRenderer *ren)
Implement base class method.
vtkMatrix4x4 * RightEyeProjection
virtual void GetTrackingToDCMatrix(vtkMatrix4x4 *&TCDCMatrix)
Provides a matrix to go from absolute OpenVR tracking coordinates to device coordinates.
void GetHMDEyeProjections(vtkRenderer *)
OpenVR renderer.
abstract specification for renderers
Definition: vtkRenderer.h:64