VTK  9.2.20221001
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 VTK_ABI_NAMESPACE_BEGIN
33 class vtkRenderer;
34 class vtkMatrix4x4;
35 
36 class VTKRENDERINGOPENVR_EXPORT vtkOpenVRCamera : public vtkVRHMDCamera
37 {
38 public:
39  static vtkOpenVRCamera* New();
41 
45  void Render(vtkRenderer* ren) override;
46 
47 protected:
49  ~vtkOpenVRCamera() override;
50 
51  // gets the pose and projections for the left and right eyes from
52  // the openvr library
56 
57  // all the matrices below are stored in VTK convention
58  // as A = Mx where x is a column vector.
59 
60  // we get these from OpenVR
63 
64  // used as part of the calculation
66 
67 private:
68  vtkOpenVRCamera(const vtkOpenVRCamera&) = delete;
69  void operator=(const vtkOpenVRCamera&) = delete;
70 };
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:152
OpenVR camera.
void Render(vtkRenderer *ren) override
Implement base class method.
void UpdateEyeToProjectionMatrices(vtkRenderer *) override
vtkNew< vtkMatrix4x4 > HMDToRightEyeMatrix
static vtkOpenVRCamera * New()
vtkNew< vtkMatrix4x4 > HMDToLeftEyeMatrix
vtkNew< vtkMatrix4x4 > PhysicalToHMDMatrix
void UpdateWorldToEyeMatrices(vtkRenderer *) override
void UpdateHMDToEyeMatrices(vtkRenderer *)
~vtkOpenVRCamera() override
abstract specification for renderers
Definition: vtkRenderer.h:183
A superclass for HMD style cameras.