vtkCaveSynchronizedRenderers.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
18 #ifndef vtkCaveSynchronizedRenderers_h
19 #define vtkCaveSynchronizedRenderers_h
20 
21 #include "vtkRemotingViewsModule.h" //needed for exports
23 
24 #include <array> // For array
25 #include <vector> // For vector
26 
27 class vtkCamera;
28 class vtkMatrix4x4;
29 
31 {
32 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
37 protected:
39  ~vtkCaveSynchronizedRenderers() override = default;
40 
45  void HandleStartRender() override;
46 
51  void ProcessCaveConfiguration();
52 
56  void SetNumberOfDisplays(int numberOfDisplays);
57 
61  vtkSetMacro(EyeSeparation, double);
62 
67  vtkSetMacro(UseOffAxisProjection, bool);
68 
75  bool DefineDisplay(int idx, double origin[3], double x[3], double y[3]);
76 
82  void InitializeCamera(vtkCamera* cam);
83 
89  void SetRenderer(vtkRenderer* renderer) override;
90 
91 private:
93  void operator=(const vtkCaveSynchronizedRenderers&) = delete;
94 
95  double EyeSeparation = 0.065;
96  bool UseOffAxisProjection = true;
97  int NumberOfDisplays = 0;
98  std::vector<std::array<double, 12>> Displays;
99  std::array<double, 3> DisplayOrigin = { -0.5, -0.5, -0.5 };
100  std::array<double, 3> DisplayX = { 0.5, -0.5, -0.5 };
101  std::array<double, 3> DisplayY = { 0.5, 0.5, -0.5 };
102  bool CameraInitialized = false;
103 };
104 
105 #endif
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
virtual void HandleStartRender()
vtkSynchronizedRenderers subclass that handles adjusting of camera for cave configurations.
static vtkSynchronizedRenderers * New()
virtual void SetRenderer(vtkRenderer *)
void operator=(const vtkObjectBase &)