VTK  9.3.20240224
vtkOpenVRCamera.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkOpenVRCamera_h
15 #define vtkOpenVRCamera_h
16 
17 #include "vtkNew.h" // ivars
18 #include "vtkRenderingOpenVRModule.h" // For export macro
19 #include "vtkVRHMDCamera.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkRenderer;
23 class vtkMatrix4x4;
24 
25 class VTKRENDERINGOPENVR_EXPORT vtkOpenVRCamera : public vtkVRHMDCamera
26 {
27 public:
28  static vtkOpenVRCamera* New();
30 
34  void Render(vtkRenderer* ren) override;
35 
36 protected:
38  ~vtkOpenVRCamera() override;
39 
40  // gets the pose and projections for the left and right eyes from
41  // the openvr library
45 
46  // all the matrices below are stored in VTK convention
47  // as A = Mx where x is a column vector.
48 
49  // we get these from OpenVR
52 
53  // used as part of the calculation
55 
56 private:
57  vtkOpenVRCamera(const vtkOpenVRCamera&) = delete;
58  void operator=(const vtkOpenVRCamera&) = delete;
59 };
60 
61 VTK_ABI_NAMESPACE_END
62 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:140
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:171
A superclass for HMD style cameras.