VTK  9.4.20241222
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
22VTK_ABI_NAMESPACE_BEGIN
23class vtkActor;
24
25class VTKRENDERINGVR_EXPORT vtkVRRenderer : public vtkOpenGLRenderer
26{
27public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
32
42 void ResetCamera(const double bounds[6]) override;
43
45
47
50 void ResetCameraClippingRange() override;
51 void ResetCameraClippingRange(const double bounds[6]) override;
53
58
62 virtual void GetFloorTransform(vtkTransform* transform);
63
67 void DeviceRender() override;
68
70
74 virtual void SetShowFloor(bool value);
75 vtkGetMacro(ShowFloor, bool);
77
79
83 virtual void SetShowLeftMarker(bool value);
84 vtkGetMacro(ShowLeftMarker, bool);
86
88
92 virtual void SetShowRightMarker(bool value);
93 vtkGetMacro(ShowRightMarker, bool);
95
96protected:
98 ~vtkVRRenderer() override = default;
99
101 bool ShowFloor = false;
102
103private:
104 vtkVRRenderer(const vtkVRRenderer&) = delete;
105 void operator=(const vtkVRRenderer&) = delete;
106
107 vtkNew<vtkActor> LeftMarkerActor;
108 vtkNew<vtkActor> RightMarkerActor;
109 bool ShowLeftMarker = false;
110 bool ShowRightMarker = false;
111};
112
113VTK_ABI_NAMESPACE_END
114#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
a virtual camera for 3D rendering
Definition vtkCamera.h:151
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:167
OpenGL renderer.
virtual void ResetCameraClippingRange()
Reset the camera clipping range based on the bounds of the visible actors.
virtual void ResetCamera()
Automatically set up the camera based on the visible actors.
describes linear transformations via a 4x4 matrix
Renderer class for VR/AR context.
virtual void SetShowRightMarker(bool value)
Set/get whether to display a white cross marker at the tip of the right controller.
void DeviceRender() override
Render the floor using GetFloorTransform.
vtkNew< vtkActor > FloorActor
vtkCamera * MakeCamera() override=0
Abstract function that creates a new Camera suitable for use with this type of Renderer.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ResetCameraClippingRange(const double bounds[6]) override
Reset the camera clipping range based on a bounding box.
~vtkVRRenderer() override=default
virtual void GetFloorTransform(vtkTransform *transform)
Store in transform the floor transform.
virtual void SetShowLeftMarker(bool value)
Set/get whether to display a white cross marker at the tip of the left controller.
void ResetCamera(const double bounds[6]) override
Automatically set up the camera based on a specified bounding box (xmin,xmax, ymin,...
void ResetCameraClippingRange() override
Reset the camera clipping range based on a bounding box.
virtual void SetShowFloor(bool value)
Set/get whether to show a white floor corresponding to the physical floor.
#define VTK_NEWINSTANCE