VTK-m  2.0
Camera.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_rendering_Camera_h
11 #define vtk_m_rendering_Camera_h
12 
13 #include <vtkm/rendering/vtkm_rendering_export.h>
14 
15 #include <vtkm/Bounds.h>
16 #include <vtkm/Math.h>
17 #include <vtkm/Matrix.h>
18 #include <vtkm/Range.h>
19 #include <vtkm/Transform3D.h>
20 #include <vtkm/VectorAnalysis.h>
22 
23 namespace vtkm
24 {
25 namespace rendering
26 {
27 
28 class VTKM_RENDERING_EXPORT Camera
29 {
31  {
32  public:
33  VTKM_CONT
35  : LookAt(0.0f, 0.0f, 0.0f)
36  , Position(0.0f, 0.0f, 1.0f)
37  , ViewUp(0.0f, 1.0f, 0.0f)
38  , FieldOfView(60.0f)
39  , XPan(0.0f)
40  , YPan(0.0f)
41  , Zoom(1.0f)
42  {
43  }
44 
45  vtkm::Matrix<vtkm::Float32, 4, 4> CreateViewMatrix() const;
46 
47  vtkm::Matrix<vtkm::Float32, 4, 4> CreateProjectionMatrix(vtkm::Id width,
48  vtkm::Id height,
49  vtkm::Float32 nearPlane,
50  vtkm::Float32 farPlane) const;
51 
59  };
60 
61  struct VTKM_RENDERING_EXPORT Camera2DStruct
62  {
63  public:
64  VTKM_CONT
66  : Left(-1.0f)
67  , Right(1.0f)
68  , Bottom(-1.0f)
69  , Top(1.0f)
70  , XScale(1.0f)
71  , XPan(0.0f)
72  , YPan(0.0f)
73  , Zoom(1.0f)
74  {
75  }
76 
77  vtkm::Matrix<vtkm::Float32, 4, 4> CreateViewMatrix() const;
78 
79  vtkm::Matrix<vtkm::Float32, 4, 4> CreateProjectionMatrix(vtkm::Float32 size,
80  vtkm::Float32 znear,
81  vtkm::Float32 zfar,
82  vtkm::Float32 aspect) const;
83 
92  };
93 
94 public:
95  enum struct Mode
96  {
97  TwoD,
98  ThreeD,
99  };
100 
101  VTKM_CONT
103  : ModeType(vtype)
104  , NearPlane(0.01f)
105  , FarPlane(1000.0f)
106  , ViewportLeft(-1.0f)
107  , ViewportRight(1.0f)
108  , ViewportBottom(-1.0f)
109  , ViewportTop(1.0f)
110  {
111  }
112 
113  vtkm::Matrix<vtkm::Float32, 4, 4> CreateViewMatrix() const;
114 
115  vtkm::Matrix<vtkm::Float32, 4, 4> CreateProjectionMatrix(vtkm::Id screenWidth,
116  vtkm::Id screenHeight) const;
117 
118  void GetRealViewport(vtkm::Id screenWidth,
119  vtkm::Id screenHeight,
120  vtkm::Float32& left,
121  vtkm::Float32& right,
122  vtkm::Float32& bottom,
123  vtkm::Float32& top) const;
124 
131  VTKM_CONT
132  vtkm::rendering::Camera::Mode GetMode() const { return this->ModeType; }
133  VTKM_CONT
134  void SetMode(vtkm::rendering::Camera::Mode mode) { this->ModeType = mode; }
135  VTKM_CONT
137  VTKM_CONT
139 
153  VTKM_CONT
154  vtkm::Range GetClippingRange() const { return vtkm::Range(this->NearPlane, this->FarPlane); }
155  VTKM_CONT
156  void SetClippingRange(vtkm::Float32 nearPlane, vtkm::Float32 farPlane)
157  {
158  this->NearPlane = nearPlane;
159  this->FarPlane = farPlane;
160  }
161  VTKM_CONT
162  void SetClippingRange(vtkm::Float64 nearPlane, vtkm::Float64 farPlane)
163  {
164  this->SetClippingRange(static_cast<vtkm::Float32>(nearPlane),
165  static_cast<vtkm::Float32>(farPlane));
166  }
167  VTKM_CONT
168  void SetClippingRange(const vtkm::Range& nearFarRange)
169  {
170  this->SetClippingRange(nearFarRange.Min, nearFarRange.Max);
171  }
172 
181  VTKM_CONT
183  vtkm::Float32& right,
184  vtkm::Float32& bottom,
185  vtkm::Float32& top) const
186  {
187  left = this->ViewportLeft;
188  right = this->ViewportRight;
189  bottom = this->ViewportBottom;
190  top = this->ViewportTop;
191  }
192  VTKM_CONT
194  vtkm::Float64& right,
195  vtkm::Float64& bottom,
196  vtkm::Float64& top) const
197  {
198  left = this->ViewportLeft;
199  right = this->ViewportRight;
200  bottom = this->ViewportBottom;
201  top = this->ViewportTop;
202  }
203  VTKM_CONT
205  {
206  return vtkm::Bounds(
207  this->ViewportLeft, this->ViewportRight, this->ViewportBottom, this->ViewportTop, 0.0, 0.0);
208  }
209  VTKM_CONT
211  {
212  this->ViewportLeft = left;
213  this->ViewportRight = right;
214  this->ViewportBottom = bottom;
215  this->ViewportTop = top;
216  }
217  VTKM_CONT
219  {
220  this->SetViewport(static_cast<vtkm::Float32>(left),
221  static_cast<vtkm::Float32>(right),
222  static_cast<vtkm::Float32>(bottom),
223  static_cast<vtkm::Float32>(top));
224  }
225  VTKM_CONT
226  void SetViewport(const vtkm::Bounds& viewportBounds)
227  {
228  this->SetViewport(
229  viewportBounds.X.Min, viewportBounds.X.Max, viewportBounds.Y.Min, viewportBounds.Y.Max);
230  }
231 
237  VTKM_CONT
238  const vtkm::Vec3f_32& GetLookAt() const { return this->Camera3D.LookAt; }
239  VTKM_CONT
240  void SetLookAt(const vtkm::Vec3f_32& lookAt)
241  {
242  this->SetModeTo3D();
243  this->Camera3D.LookAt = lookAt;
244  }
245  VTKM_CONT
246  void SetLookAt(const vtkm::Vec<Float64, 3>& lookAt)
247  {
248  this->SetLookAt(vtkm::Vec<Float32, 3>(lookAt));
249  }
250 
256  VTKM_CONT
257  const vtkm::Vec3f_32& GetPosition() const { return this->Camera3D.Position; }
258  VTKM_CONT
259  void SetPosition(const vtkm::Vec3f_32& position)
260  {
261  this->SetModeTo3D();
262  this->Camera3D.Position = position;
263  }
264  VTKM_CONT
265  void SetPosition(const vtkm::Vec3f_64& position) { this->SetPosition(vtkm::Vec3f_32(position)); }
266 
274  VTKM_CONT
275  const vtkm::Vec3f_32& GetViewUp() const { return this->Camera3D.ViewUp; }
276  VTKM_CONT
277  void SetViewUp(const vtkm::Vec3f_32& viewUp)
278  {
279  this->SetModeTo3D();
280  this->Camera3D.ViewUp = viewUp;
281  }
282  VTKM_CONT
283  void SetViewUp(const vtkm::Vec3f_64& viewUp) { this->SetViewUp(vtkm::Vec3f_32(viewUp)); }
284 
291  VTKM_CONT
292  vtkm::Float32 GetXScale() const { return this->Camera2D.XScale; }
293  VTKM_CONT
295  {
296  this->SetModeTo2D();
297  this->Camera2D.XScale = xscale;
298  }
299  VTKM_CONT
300  void SetXScale(vtkm::Float64 xscale) { this->SetXScale(static_cast<vtkm::Float32>(xscale)); }
301 
309  VTKM_CONT
310  vtkm::Float32 GetFieldOfView() const { return this->Camera3D.FieldOfView; }
311  VTKM_CONT
313  {
314  this->SetModeTo3D();
315  this->Camera3D.FieldOfView = fov;
316  }
317  VTKM_CONT
318  void SetFieldOfView(vtkm::Float64 fov) { this->SetFieldOfView(static_cast<vtkm::Float32>(fov)); }
319 
322  void Pan(vtkm::Float32 dx, vtkm::Float32 dy);
323 
326  VTKM_CONT
328  {
329  this->Pan(static_cast<vtkm::Float32>(dx), static_cast<vtkm::Float32>(dy));
330  }
331  VTKM_CONT
332  void Pan(vtkm::Vec2f_32 direction) { this->Pan(direction[0], direction[1]); }
333 
334  VTKM_CONT
335  void Pan(vtkm::Vec2f_64 direction) { this->Pan(direction[0], direction[1]); }
336 
337  VTKM_CONT
339  {
340  vtkm::Vec2f_32 pan;
341  pan[0] = this->Camera3D.XPan;
342  pan[1] = this->Camera3D.YPan;
343  return pan;
344  }
345 
346 
353  void Zoom(vtkm::Float32 zoom);
354 
355  VTKM_CONT
356  void Zoom(vtkm::Float64 zoom) { this->Zoom(static_cast<vtkm::Float32>(zoom)); }
357 
358  VTKM_CONT
359  vtkm::Float32 GetZoom() const { return this->Camera3D.Zoom; }
360 
371  void TrackballRotate(vtkm::Float32 startX,
372  vtkm::Float32 startY,
373  vtkm::Float32 endX,
374  vtkm::Float32 endY);
375 
376  VTKM_CONT
378  vtkm::Float64 startY,
379  vtkm::Float64 endX,
380  vtkm::Float64 endY)
381  {
382  this->TrackballRotate(static_cast<vtkm::Float32>(startX),
383  static_cast<vtkm::Float32>(startY),
384  static_cast<vtkm::Float32>(endX),
385  static_cast<vtkm::Float32>(endY));
386  }
387 
395  void ResetToBounds(const vtkm::Bounds& dataBounds);
396 
403  // space with the given padding percent. The view direction is preserved.
405  void ResetToBounds(const vtkm::Bounds& dataBounds, vtkm::Float64 dataViewPadding);
406  void ResetToBounds(const vtkm::Bounds& dataBounds,
407  vtkm::Float64 XDataViewPadding,
408  vtkm::Float64 YDataViewPadding,
409  vtkm::Float64 ZDataViewPadding);
410 
418  void Roll(vtkm::Float32 angleDegrees);
419 
420  VTKM_CONT
421  void Roll(vtkm::Float64 angleDegrees) { this->Roll(static_cast<vtkm::Float32>(angleDegrees)); }
422 
432  void Azimuth(vtkm::Float32 angleDegrees);
433 
434  VTKM_CONT
435  void Azimuth(vtkm::Float64 angleDegrees)
436  {
437  this->Azimuth(static_cast<vtkm::Float32>(angleDegrees));
438  }
439 
450  void Elevation(vtkm::Float32 angleDegrees);
451 
452  VTKM_CONT
453  void Elevation(vtkm::Float64 angleDegrees)
454  {
455  this->Elevation(static_cast<vtkm::Float32>(angleDegrees));
456  }
457 
468  void Dolly(vtkm::Float32 value);
469 
470  VTKM_CONT
471  void Dolly(vtkm::Float64 value) { this->Dolly(static_cast<vtkm::Float32>(value)); }
472 
482  VTKM_CONT
484  vtkm::Float32& right,
485  vtkm::Float32& bottom,
486  vtkm::Float32& top) const
487  {
488  left = this->Camera2D.Left;
489  right = this->Camera2D.Right;
490  bottom = this->Camera2D.Bottom;
491  top = this->Camera2D.Top;
492  }
493  VTKM_CONT
495  {
496  return vtkm::Bounds(this->Camera2D.Left,
497  this->Camera2D.Right,
498  this->Camera2D.Bottom,
499  this->Camera2D.Top,
500  0.0,
501  0.0);
502  }
503  VTKM_CONT
505  vtkm::Float32 right,
506  vtkm::Float32 bottom,
507  vtkm::Float32 top)
508  {
509  this->SetModeTo2D();
510  this->Camera2D.Left = left;
511  this->Camera2D.Right = right;
512  this->Camera2D.Bottom = bottom;
513  this->Camera2D.Top = top;
514 
515  this->Camera2D.XPan = 0;
516  this->Camera2D.YPan = 0;
517  this->Camera2D.Zoom = 1;
518  }
519  VTKM_CONT
521  vtkm::Float64 right,
522  vtkm::Float64 bottom,
523  vtkm::Float64 top)
524  {
525  this->SetViewRange2D(static_cast<vtkm::Float32>(left),
526  static_cast<vtkm::Float32>(right),
527  static_cast<vtkm::Float32>(bottom),
528  static_cast<vtkm::Float32>(top));
529  }
530  VTKM_CONT
531  void SetViewRange2D(const vtkm::Range& xRange, const vtkm::Range& yRange)
532  {
533  this->SetViewRange2D(xRange.Min, xRange.Max, yRange.Min, yRange.Max);
534  }
535  VTKM_CONT
536  void SetViewRange2D(const vtkm::Bounds& viewRange)
537  {
538  this->SetViewRange2D(viewRange.X, viewRange.Y);
539  }
540 
541  VTKM_CONT
542  void Print() const;
543 
544 private:
548 
551 
556 };
557 }
558 } // namespace vtkm::rendering
559 
560 #endif // vtk_m_rendering_Camera_h
vtkm::rendering::Camera::GetViewport
VTKM_CONT void GetViewport(vtkm::Float32 &left, vtkm::Float32 &right, vtkm::Float32 &bottom, vtkm::Float32 &top) const
The viewport of the projection.
Definition: Camera.h:182
vtkm::rendering::Camera::Camera2DStruct::Top
vtkm::Float32 Top
Definition: Camera.h:87
vtkm::rendering::Camera::Camera3D
Camera3DStruct Camera3D
Definition: Camera.h:546
vtkm::rendering::Camera::SetXScale
VTKM_CONT void SetXScale(vtkm::Float32 xscale)
Definition: Camera.h:294
vtkm::rendering::Camera::GetZoom
VTKM_CONT vtkm::Float32 GetZoom() const
Definition: Camera.h:359
vtkm::rendering::Camera::ViewportRight
vtkm::Float32 ViewportRight
Definition: Camera.h:553
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::Camera::NearPlane
vtkm::Float32 NearPlane
Definition: Camera.h:549
vtkm::rendering::Camera::SetViewRange2D
VTKM_CONT void SetViewRange2D(const vtkm::Bounds &viewRange)
Definition: Camera.h:536
vtkm::rendering::Camera::GetPan
VTKM_CONT vtkm::Vec2f_32 GetPan() const
Definition: Camera.h:338
vtkm::rendering::Camera::Camera3DStruct::Camera3DStruct
VTKM_CONT Camera3DStruct()
Definition: Camera.h:34
vtkm::rendering::Camera::Camera3DStruct::YPan
vtkm::Float32 YPan
Definition: Camera.h:57
MatrixHelpers.h
vtkm::rendering::Camera::ViewportBottom
vtkm::Float32 ViewportBottom
Definition: Camera.h:554
vtkm::rendering::Camera::Camera2DStruct::Bottom
vtkm::Float32 Bottom
Definition: Camera.h:86
vtkm::rendering::Camera::Camera2DStruct::XScale
vtkm::Float32 XScale
Definition: Camera.h:88
vtkm::rendering::Camera::Camera2DStruct::Left
vtkm::Float32 Left
Definition: Camera.h:84
vtkm::rendering::Camera::SetXScale
VTKM_CONT void SetXScale(vtkm::Float64 xscale)
Definition: Camera.h:300
vtkm::rendering::Camera::Camera2D
Camera2DStruct Camera2D
Definition: Camera.h:547
vtkm::rendering::Camera::ViewportTop
vtkm::Float32 ViewportTop
Definition: Camera.h:555
Matrix.h
vtkm::rendering::Camera::Azimuth
VTKM_CONT void Azimuth(vtkm::Float64 angleDegrees)
Definition: Camera.h:435
vtkm::rendering::Camera::Camera2DStruct
Definition: Camera.h:61
vtkm::rendering::Camera::SetViewRange2D
VTKM_CONT void SetViewRange2D(vtkm::Float32 left, vtkm::Float32 right, vtkm::Float32 bottom, vtkm::Float32 top)
Definition: Camera.h:504
vtkm::rendering::Camera::Camera3DStruct::LookAt
vtkm::Vec3f_32 LookAt
Definition: Camera.h:52
vtkm::rendering::Camera::Mode::TwoD
@ TwoD
vtkm::rendering::Camera::SetLookAt
VTKM_CONT void SetLookAt(const vtkm::Vec3f_32 &lookAt)
Definition: Camera.h:240
vtkm::rendering::Camera::GetXScale
VTKM_CONT vtkm::Float32 GetXScale() const
The xscale of the camera.
Definition: Camera.h:292
vtkm::rendering::Camera::SetClippingRange
VTKM_CONT void SetClippingRange(vtkm::Float64 nearPlane, vtkm::Float64 farPlane)
Definition: Camera.h:162
vtkm::rendering::Camera::Camera3DStruct::FieldOfView
vtkm::Float32 FieldOfView
Definition: Camera.h:55
vtkm::rendering::Camera::Camera3DStruct::ViewUp
vtkm::Vec3f_32 ViewUp
Definition: Camera.h:54
vtkm::rendering::Camera::GetFieldOfView
VTKM_CONT vtkm::Float32 GetFieldOfView() const
The field of view angle.
Definition: Camera.h:310
vtkm::rendering::Camera::Roll
VTKM_CONT void Roll(vtkm::Float64 angleDegrees)
Definition: Camera.h:421
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::rendering::Camera::SetPosition
VTKM_CONT void SetPosition(const vtkm::Vec3f_64 &position)
Definition: Camera.h:265
vtkm::rendering::Camera::Camera3DStruct::Zoom
vtkm::Float32 Zoom
Definition: Camera.h:58
vtkm::rendering::Camera::GetViewUp
const VTKM_CONT vtkm::Vec3f_32 & GetViewUp() const
The up orientation of the camera in 3D mode.
Definition: Camera.h:275
vtkm::rendering::Camera::SetFieldOfView
VTKM_CONT void SetFieldOfView(vtkm::Float64 fov)
Definition: Camera.h:318
vtkm::rendering::Camera::SetPosition
VTKM_CONT void SetPosition(const vtkm::Vec3f_32 &position)
Definition: Camera.h:259
vtkm::rendering::Camera::Mode::ThreeD
@ ThreeD
vtkm::rendering::Camera::GetClippingRange
VTKM_CONT vtkm::Range GetClippingRange() const
The clipping range of the camera.
Definition: Camera.h:154
VectorAnalysis.h
vtkm::rendering::Camera::Pan
VTKM_CONT void Pan(vtkm::Float64 dx, vtkm::Float64 dy)
Pans the camera.
Definition: Camera.h:327
vtkm::rendering::Camera::Camera3DStruct::Position
vtkm::Vec3f_32 Position
Definition: Camera.h:53
vtkm::rendering::Camera::SetClippingRange
VTKM_CONT void SetClippingRange(vtkm::Float32 nearPlane, vtkm::Float32 farPlane)
Definition: Camera.h:156
vtkm::rendering::Camera::GetViewport
VTKM_CONT void GetViewport(vtkm::Float64 &left, vtkm::Float64 &right, vtkm::Float64 &bottom, vtkm::Float64 &top) const
Definition: Camera.h:193
vtkm::rendering::Camera::TrackballRotate
VTKM_CONT void TrackballRotate(vtkm::Float64 startX, vtkm::Float64 startY, vtkm::Float64 endX, vtkm::Float64 endY)
Definition: Camera.h:377
vtkm::rendering::Camera::Camera2DStruct::YPan
vtkm::Float32 YPan
Definition: Camera.h:90
Bounds.h
vtkm::rendering::Camera::GetViewRange2D
VTKM_CONT vtkm::Bounds GetViewRange2D() const
Definition: Camera.h:494
Math.h
vtkm::rendering::Camera::GetLookAt
const VTKM_CONT vtkm::Vec3f_32 & GetLookAt() const
The focal point the camera is looking at in 3D mode.
Definition: Camera.h:238
vtkm::rendering::Camera::Camera2DStruct::XPan
vtkm::Float32 XPan
Definition: Camera.h:89
vtkm::rendering::Camera::GetViewRange2D
VTKM_CONT void GetViewRange2D(vtkm::Float32 &left, vtkm::Float32 &right, vtkm::Float32 &bottom, vtkm::Float32 &top) const
The viewable region in the x-y plane.
Definition: Camera.h:483
vtkm::rendering::Camera::SetViewport
VTKM_CONT void SetViewport(vtkm::Float32 left, vtkm::Float32 right, vtkm::Float32 bottom, vtkm::Float32 top)
Definition: Camera.h:210
vtkm::rendering::Camera::Camera3DStruct::XPan
vtkm::Float32 XPan
Definition: Camera.h:56
vtkm::rendering::Camera::GetPosition
const VTKM_CONT vtkm::Vec3f_32 & GetPosition() const
The spatial position of the camera in 3D mode.
Definition: Camera.h:257
Range.h
vtkm::rendering::Camera::SetModeTo2D
VTKM_CONT void SetModeTo2D()
Definition: Camera.h:138
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::rendering::Camera::Mode
Mode
Definition: Camera.h:95
vtkm::rendering::Camera::ModeType
Mode ModeType
Definition: Camera.h:545
vtkm::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
vtkm::rendering::Camera::GetMode
VTKM_CONT vtkm::rendering::Camera::Mode GetMode() const
The mode of the camera (2D or 3D).
Definition: Camera.h:132
vtkm::rendering::Camera::Zoom
VTKM_CONT void Zoom(vtkm::Float64 zoom)
Definition: Camera.h:356
vtkm::rendering::Camera::SetLookAt
VTKM_CONT void SetLookAt(const vtkm::Vec< Float64, 3 > &lookAt)
Definition: Camera.h:246
vtkm::rendering::Camera::Camera2DStruct::Right
vtkm::Float32 Right
Definition: Camera.h:85
Transform3D.h
vtkm::rendering::Camera::Camera3DStruct
Definition: Camera.h:30
vtkm::Vec< vtkm::Float32, 3 >
vtkm::Matrix< vtkm::Float32, 4, 4 >
vtkm::rendering::Camera::SetModeTo3D
VTKM_CONT void SetModeTo3D()
Definition: Camera.h:136
vtkm::rendering::Camera::SetViewRange2D
VTKM_CONT void SetViewRange2D(vtkm::Float64 left, vtkm::Float64 right, vtkm::Float64 bottom, vtkm::Float64 top)
Definition: Camera.h:520
vtkm::Range::Min
vtkm::Float64 Min
Definition: Range.h:33
vtkm::rendering::Camera::Dolly
VTKM_CONT void Dolly(vtkm::Float64 value)
Definition: Camera.h:471
vtkm::rendering::Camera::Camera2DStruct::Zoom
vtkm::Float32 Zoom
Definition: Camera.h:91
vtkm::rendering::Camera::Camera
VTKM_CONT Camera(Mode vtype=Camera::Mode::ThreeD)
Definition: Camera.h:102
vtkm::Float32
float Float32
Definition: Types.h:154
vtkm::Float64
double Float64
Definition: Types.h:155
vtkm::Bounds::X
vtkm::Range X
Definition: Bounds.h:31
vtkm::rendering::Camera::SetViewUp
VTKM_CONT void SetViewUp(const vtkm::Vec3f_64 &viewUp)
Definition: Camera.h:283
vtkm::Bounds::Y
vtkm::Range Y
Definition: Bounds.h:32
vtkm::rendering::Camera
Definition: Camera.h:28
vtkm::rendering::Camera::Elevation
VTKM_CONT void Elevation(vtkm::Float64 angleDegrees)
Definition: Camera.h:453
vtkm::rendering::Camera::ViewportLeft
vtkm::Float32 ViewportLeft
Definition: Camera.h:552
vtkm::rendering::Camera::SetViewRange2D
VTKM_CONT void SetViewRange2D(const vtkm::Range &xRange, const vtkm::Range &yRange)
Definition: Camera.h:531
vtkm::rendering::Camera::SetViewUp
VTKM_CONT void SetViewUp(const vtkm::Vec3f_32 &viewUp)
Definition: Camera.h:277
vtkm::Range::Max
vtkm::Float64 Max
Definition: Range.h:34
vtkm::rendering::Camera::SetViewport
VTKM_CONT void SetViewport(const vtkm::Bounds &viewportBounds)
Definition: Camera.h:226
vtkm::rendering::Camera::FarPlane
vtkm::Float32 FarPlane
Definition: Camera.h:550
vtkm::rendering::Camera::Pan
VTKM_CONT void Pan(vtkm::Vec2f_32 direction)
Definition: Camera.h:332
vtkm::rendering::Camera::GetViewport
VTKM_CONT vtkm::Bounds GetViewport() const
Definition: Camera.h:204
vtkm::rendering::Camera::SetMode
VTKM_CONT void SetMode(vtkm::rendering::Camera::Mode mode)
Definition: Camera.h:134
vtkm::rendering::Camera::Pan
VTKM_CONT void Pan(vtkm::Vec2f_64 direction)
Definition: Camera.h:335
vtkm::rendering::Camera::SetClippingRange
VTKM_CONT void SetClippingRange(const vtkm::Range &nearFarRange)
Definition: Camera.h:168
vtkm::rendering::Camera::SetViewport
VTKM_CONT void SetViewport(vtkm::Float64 left, vtkm::Float64 right, vtkm::Float64 bottom, vtkm::Float64 top)
Definition: Camera.h:218
vtkm::rendering::Camera::SetFieldOfView
VTKM_CONT void SetFieldOfView(vtkm::Float32 fov)
Definition: Camera.h:312
vtkm::rendering::Camera::Camera2DStruct::Camera2DStruct
VTKM_CONT Camera2DStruct()
Definition: Camera.h:65
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31