VTK  9.7.1
vtkVRRenderer.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
15 #ifndef vtkVRRenderer_h
16 #define vtkVRRenderer_h
17 
18 #include "vtkNew.h" // for ivar
19 #include "vtkOpenGLRenderer.h"
20 #include "vtkRenderingVRModule.h" // For export macro
21 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkActor;
25 
26 class VTKRENDERINGVR_EXPORT VTK_MARSHALAUTO vtkVRRenderer : public vtkOpenGLRenderer
27 {
28 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
43  void ResetCamera(const double bounds[6]) override;
44 
46 
48 
51  void ResetCameraClippingRange() override;
52  void ResetCameraClippingRange(const double bounds[6]) override;
54 
58  VTK_NEWINSTANCE vtkCamera* MakeCamera() override = 0;
59 
63  virtual void GetFloorTransform(vtkTransform* transform);
64 
68  void DeviceRender() override;
69 
71 
76  virtual void SetShowFloor(bool value);
78  vtkGetMacro(ShowFloor, bool);
80 
82 
86  virtual void SetShowLeftMarker(bool value);
87  vtkGetMacro(ShowLeftMarker, bool);
89 
91 
95  virtual void SetShowRightMarker(bool value);
96  vtkGetMacro(ShowRightMarker, bool);
98 
99 protected:
100  vtkVRRenderer();
101  ~vtkVRRenderer() override = default;
102 
103  vtkNew<vtkActor> FloorActor;
104  bool ShowFloor = false;
105 
106 private:
107  vtkVRRenderer(const vtkVRRenderer&) = delete;
108  void operator=(const vtkVRRenderer&) = delete;
109 
110  vtkNew<vtkActor> LeftMarkerActor;
111  vtkNew<vtkActor> RightMarkerActor;
112  bool ShowLeftMarker = false;
113  bool ShowRightMarker = false;
114 };
115 
116 VTK_ABI_NAMESPACE_END
117 #endif
virtual vtkCamera * MakeCamera()
Create a new Camera sutible for use with this type of Renderer.
void DeviceRender() override
Concrete open gl render method.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
Renderer class for VR/AR context.
Definition: vtkVRRenderer.h:26
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:50
virtual void ResetCameraClippingRange()
Reset the camera clipping range based on the bounds of the visible actors.
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual camera for 3D rendering
Definition: vtkCamera.h:41
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_NEWINSTANCE
#define VTK_MARSHALEXCLUDE(reason)
Allocate and hold a VTK object.
#define VTK_MARSHALAUTO
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
OpenGL renderer.
virtual bool ResetCamera()
Automatically set up the camera based on the visible actors.