VTK  9.2.6
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 "vtkNew.h" // ivars
29 #include "vtkRenderingOpenVRModule.h" // For export macro
30 #include "vtkVRHMDCamera.h"
31 
32 class vtkRenderer;
33 class vtkMatrix4x4;
34 
35 class VTKRENDERINGOPENVR_EXPORT vtkOpenVRCamera : public vtkVRHMDCamera
36 {
37 public:
38  static vtkOpenVRCamera* New();
40 
44  void Render(vtkRenderer* ren) override;
45 
46 protected:
48  ~vtkOpenVRCamera() override;
49 
50  // gets the pose and projections for the left and right eyes from
51  // the openvr library
52  void UpdateHMDToEyeMatrices(vtkRenderer*);
53  void UpdateWorldToEyeMatrices(vtkRenderer*) override;
55 
56  // all the matrices below are stored in VTK convention
57  // as A = Mx where x is a column vector.
58 
59  // we get these from OpenVR
62 
63  // used as part of the calculation
65 
66 private:
67  vtkOpenVRCamera(const vtkOpenVRCamera&) = delete;
68  void operator=(const vtkOpenVRCamera&) = delete;
69 };
70 
71 #endif
vtkNew< vtkMatrix4x4 > HMDToRightEyeMatrix
OpenVR camera.
static vtkOpenGLCamera * New()
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
virtual void UpdateWorldToEyeMatrices(vtkRenderer *)=0
abstract specification for renderers
Definition: vtkRenderer.h:72
A superclass for HMD style cameras.
vtkNew< vtkMatrix4x4 > PhysicalToHMDMatrix
void Render(vtkRenderer *ren) override
Implement base class method.
virtual void UpdateEyeToProjectionMatrices(vtkRenderer *)=0
vtkNew< vtkMatrix4x4 > HMDToLeftEyeMatrix