VTK-m  2.2
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 
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 
38 {
40  {
41  public:
42  VTKM_CONT
44  : LookAt(0.0f, 0.0f, 0.0f)
45  , Position(0.0f, 0.0f, 1.0f)
46  , ViewUp(0.0f, 1.0f, 0.0f)
47  , FieldOfView(60.0f)
48  , XPan(0.0f)
49  , YPan(0.0f)
50  , Zoom(1.0f)
51  {
52  }
53 
54  vtkm::Matrix<vtkm::Float32, 4, 4> CreateViewMatrix() const;
55 
56  vtkm::Matrix<vtkm::Float32, 4, 4> CreateProjectionMatrix(vtkm::Id width,
57  vtkm::Id height,
58  vtkm::Float32 nearPlane,
59  vtkm::Float32 farPlane) const;
60 
68  };
69 
71  {
72  public:
73  VTKM_CONT
75  : Left(-1.0f)
76  , Right(1.0f)
77  , Bottom(-1.0f)
78  , Top(1.0f)
79  , XScale(1.0f)
80  , XPan(0.0f)
81  , YPan(0.0f)
82  , Zoom(1.0f)
83  {
84  }
85 
86  vtkm::Matrix<vtkm::Float32, 4, 4> CreateViewMatrix() const;
87 
88  vtkm::Matrix<vtkm::Float32, 4, 4> CreateProjectionMatrix(vtkm::Float32 size,
89  vtkm::Float32 znear,
90  vtkm::Float32 zfar,
91  vtkm::Float32 aspect) const;
92 
101  };
102 
103 public:
104  enum struct Mode
105  {
106  TwoD,
107  ThreeD,
108  };
109 
110  VTKM_CONT
112  : ModeType(vtype)
113  , NearPlane(0.01f)
114  , FarPlane(1000.0f)
115  , ViewportLeft(-1.0f)
116  , ViewportRight(1.0f)
117  , ViewportBottom(-1.0f)
118  , ViewportTop(1.0f)
119  {
120  }
121 
122  vtkm::Matrix<vtkm::Float32, 4, 4> CreateViewMatrix() const;
123 
124  vtkm::Matrix<vtkm::Float32, 4, 4> CreateProjectionMatrix(vtkm::Id screenWidth,
125  vtkm::Id screenHeight) const;
126 
127  void GetRealViewport(vtkm::Id screenWidth,
128  vtkm::Id screenHeight,
129  vtkm::Float32& left,
130  vtkm::Float32& right,
131  vtkm::Float32& bottom,
132  vtkm::Float32& top) const;
133 
140  VTKM_CONT
141  vtkm::rendering::Camera::Mode GetMode() const { return this->ModeType; }
143  VTKM_CONT
144  void SetMode(vtkm::rendering::Camera::Mode mode) { this->ModeType = mode; }
146  VTKM_CONT
149  VTKM_CONT
151 
165  VTKM_CONT
166  vtkm::Range GetClippingRange() const { return vtkm::Range(this->NearPlane, this->FarPlane); }
168  VTKM_CONT
169  void SetClippingRange(vtkm::Float32 nearPlane, vtkm::Float32 farPlane)
170  {
171  this->NearPlane = nearPlane;
172  this->FarPlane = farPlane;
173  }
175  VTKM_CONT
176  void SetClippingRange(vtkm::Float64 nearPlane, vtkm::Float64 farPlane)
177  {
178  this->SetClippingRange(static_cast<vtkm::Float32>(nearPlane),
179  static_cast<vtkm::Float32>(farPlane));
180  }
182  VTKM_CONT
183  void SetClippingRange(const vtkm::Range& nearFarRange)
184  {
185  this->SetClippingRange(nearFarRange.Min, nearFarRange.Max);
186  }
187 
196  VTKM_CONT
198  vtkm::Float32& right,
199  vtkm::Float32& bottom,
200  vtkm::Float32& top) const
201  {
202  left = this->ViewportLeft;
203  right = this->ViewportRight;
204  bottom = this->ViewportBottom;
205  top = this->ViewportTop;
206  }
208  VTKM_CONT
210  vtkm::Float64& right,
211  vtkm::Float64& bottom,
212  vtkm::Float64& top) const
213  {
214  left = this->ViewportLeft;
215  right = this->ViewportRight;
216  bottom = this->ViewportBottom;
217  top = this->ViewportTop;
218  }
220  VTKM_CONT
222  {
223  return vtkm::Bounds(
224  this->ViewportLeft, this->ViewportRight, this->ViewportBottom, this->ViewportTop, 0.0, 0.0);
225  }
227  VTKM_CONT
229  {
230  this->ViewportLeft = left;
231  this->ViewportRight = right;
232  this->ViewportBottom = bottom;
233  this->ViewportTop = top;
234  }
236  VTKM_CONT
238  {
239  this->SetViewport(static_cast<vtkm::Float32>(left),
240  static_cast<vtkm::Float32>(right),
241  static_cast<vtkm::Float32>(bottom),
242  static_cast<vtkm::Float32>(top));
243  }
245  VTKM_CONT
246  void SetViewport(const vtkm::Bounds& viewportBounds)
247  {
248  this->SetViewport(
249  viewportBounds.X.Min, viewportBounds.X.Max, viewportBounds.Y.Min, viewportBounds.Y.Max);
250  }
251 
257  VTKM_CONT
258  const vtkm::Vec3f_32& GetLookAt() const { return this->Camera3D.LookAt; }
260  VTKM_CONT
261  void SetLookAt(const vtkm::Vec3f_32& lookAt)
262  {
263  this->SetModeTo3D();
264  this->Camera3D.LookAt = lookAt;
265  }
267  VTKM_CONT
268  void SetLookAt(const vtkm::Vec<Float64, 3>& lookAt)
269  {
270  this->SetLookAt(vtkm::Vec<Float32, 3>(lookAt));
271  }
272 
278  VTKM_CONT
279  const vtkm::Vec3f_32& GetPosition() const { return this->Camera3D.Position; }
281  VTKM_CONT
282  void SetPosition(const vtkm::Vec3f_32& position)
283  {
284  this->SetModeTo3D();
285  this->Camera3D.Position = position;
286  }
288  VTKM_CONT
289  void SetPosition(const vtkm::Vec3f_64& position) { this->SetPosition(vtkm::Vec3f_32(position)); }
290 
298  VTKM_CONT
299  const vtkm::Vec3f_32& GetViewUp() const { return this->Camera3D.ViewUp; }
301  VTKM_CONT
302  void SetViewUp(const vtkm::Vec3f_32& viewUp)
303  {
304  this->SetModeTo3D();
305  this->Camera3D.ViewUp = viewUp;
306  }
308  VTKM_CONT
309  void SetViewUp(const vtkm::Vec3f_64& viewUp) { this->SetViewUp(vtkm::Vec3f_32(viewUp)); }
310 
317  VTKM_CONT
318  vtkm::Float32 GetXScale() const { return this->Camera2D.XScale; }
320  VTKM_CONT
322  {
323  this->SetModeTo2D();
324  this->Camera2D.XScale = xscale;
325  }
327  VTKM_CONT
328  void SetXScale(vtkm::Float64 xscale) { this->SetXScale(static_cast<vtkm::Float32>(xscale)); }
329 
337  VTKM_CONT
338  vtkm::Float32 GetFieldOfView() const { return this->Camera3D.FieldOfView; }
340  VTKM_CONT
342  {
343  this->SetModeTo3D();
344  this->Camera3D.FieldOfView = fov;
345  }
347  VTKM_CONT
348  void SetFieldOfView(vtkm::Float64 fov) { this->SetFieldOfView(static_cast<vtkm::Float32>(fov)); }
349 
356  void Pan(vtkm::Float32 dx, vtkm::Float32 dy);
358  VTKM_CONT
360  {
361  this->Pan(static_cast<vtkm::Float32>(dx), static_cast<vtkm::Float32>(dy));
362  }
364  VTKM_CONT
365  void Pan(vtkm::Vec2f_32 direction) { this->Pan(direction[0], direction[1]); }
367  VTKM_CONT
368  void Pan(vtkm::Vec2f_64 direction) { this->Pan(direction[0], direction[1]); }
370  VTKM_CONT
372  {
373  vtkm::Vec2f_32 pan;
374  // Note that the 2D and 3D pan are always set the same.
375  pan[0] = this->Camera3D.XPan;
376  pan[1] = this->Camera3D.YPan;
377  return pan;
378  }
379 
380 
388  void Zoom(vtkm::Float32 zoom);
390  VTKM_CONT
391  void Zoom(vtkm::Float64 zoom) { this->Zoom(static_cast<vtkm::Float32>(zoom)); }
393  VTKM_CONT
394  vtkm::Float32 GetZoom() const { return this->Camera3D.Zoom; }
395 
406  void TrackballRotate(vtkm::Float32 startX,
407  vtkm::Float32 startY,
408  vtkm::Float32 endX,
409  vtkm::Float32 endY);
411  VTKM_CONT
413  vtkm::Float64 startY,
414  vtkm::Float64 endX,
415  vtkm::Float64 endY)
416  {
417  this->TrackballRotate(static_cast<vtkm::Float32>(startX),
418  static_cast<vtkm::Float32>(startY),
419  static_cast<vtkm::Float32>(endX),
420  static_cast<vtkm::Float32>(endY));
421  }
422 
432  void ResetToBounds(const vtkm::Bounds& dataBounds);
434  void ResetToBounds(const vtkm::Bounds& dataBounds, vtkm::Float64 dataViewPadding);
436  void ResetToBounds(const vtkm::Bounds& dataBounds,
437  vtkm::Float64 XDataViewPadding,
438  vtkm::Float64 YDataViewPadding,
439  vtkm::Float64 ZDataViewPadding);
440 
448  void Roll(vtkm::Float32 angleDegrees);
450  VTKM_CONT
451  void Roll(vtkm::Float64 angleDegrees) { this->Roll(static_cast<vtkm::Float32>(angleDegrees)); }
452 
462  void Azimuth(vtkm::Float32 angleDegrees);
464  VTKM_CONT
465  void Azimuth(vtkm::Float64 angleDegrees)
466  {
467  this->Azimuth(static_cast<vtkm::Float32>(angleDegrees));
468  }
469 
480  void Elevation(vtkm::Float32 angleDegrees);
482  VTKM_CONT
483  void Elevation(vtkm::Float64 angleDegrees)
484  {
485  this->Elevation(static_cast<vtkm::Float32>(angleDegrees));
486  }
487 
504  void Dolly(vtkm::Float32 value);
506  VTKM_CONT
507  void Dolly(vtkm::Float64 value) { this->Dolly(static_cast<vtkm::Float32>(value)); }
508 
518  VTKM_CONT
520  vtkm::Float32& right,
521  vtkm::Float32& bottom,
522  vtkm::Float32& top) const
523  {
524  left = this->Camera2D.Left;
525  right = this->Camera2D.Right;
526  bottom = this->Camera2D.Bottom;
527  top = this->Camera2D.Top;
528  }
530  VTKM_CONT
532  {
533  return vtkm::Bounds(this->Camera2D.Left,
534  this->Camera2D.Right,
535  this->Camera2D.Bottom,
536  this->Camera2D.Top,
537  0.0,
538  0.0);
539  }
541  VTKM_CONT
543  vtkm::Float32 right,
544  vtkm::Float32 bottom,
545  vtkm::Float32 top)
546  {
547  this->SetModeTo2D();
548  this->Camera2D.Left = left;
549  this->Camera2D.Right = right;
550  this->Camera2D.Bottom = bottom;
551  this->Camera2D.Top = top;
552 
553  this->Camera2D.XPan = 0;
554  this->Camera2D.YPan = 0;
555  this->Camera2D.Zoom = 1;
556  }
558  VTKM_CONT
560  vtkm::Float64 right,
561  vtkm::Float64 bottom,
562  vtkm::Float64 top)
563  {
564  this->SetViewRange2D(static_cast<vtkm::Float32>(left),
565  static_cast<vtkm::Float32>(right),
566  static_cast<vtkm::Float32>(bottom),
567  static_cast<vtkm::Float32>(top));
568  }
570  VTKM_CONT
571  void SetViewRange2D(const vtkm::Range& xRange, const vtkm::Range& yRange)
572  {
573  this->SetViewRange2D(xRange.Min, xRange.Max, yRange.Min, yRange.Max);
574  }
575  VTKM_CONT
576  void SetViewRange2D(const vtkm::Bounds& viewRange)
577  {
578  this->SetViewRange2D(viewRange.X, viewRange.Y);
579  }
580 
581  VTKM_CONT
582  void Print() const;
583 
584 private:
588 
591 
596 };
597 }
598 } // namespace vtkm::rendering
599 
600 #endif // vtk_m_rendering_Camera_h
vtkm::rendering::Camera::SetLookAt
void SetLookAt(const vtkm::Vec3f_32 &lookAt)
The focal point the camera is looking at in 3D mode.
Definition: Camera.h:261
vtkm::rendering::Camera::Camera2DStruct::Top
vtkm::Float32 Top
Definition: Camera.h:96
vtkm::rendering::Camera::Camera3D
Camera3DStruct Camera3D
Definition: Camera.h:586
vtkm::rendering::Camera::SetViewUp
void SetViewUp(const vtkm::Vec3f_64 &viewUp)
The up orientation of the camera in 3D mode.
Definition: Camera.h:309
vtkm::rendering::Camera::SetClippingRange
void SetClippingRange(const vtkm::Range &nearFarRange)
The clipping range of the camera.
Definition: Camera.h:183
vtkm::rendering::Camera::GetZoom
vtkm::Float32 GetZoom() const
Zooms the camera in or out.
Definition: Camera.h:394
vtkm::rendering::Camera::TrackballRotate
void TrackballRotate(vtkm::Float64 startX, vtkm::Float64 startY, vtkm::Float64 endX, vtkm::Float64 endY)
Moves the camera as if a point was dragged along a sphere.
Definition: Camera.h:412
vtkm::rendering::Camera::ViewportRight
vtkm::Float32 ViewportRight
Definition: Camera.h:593
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_RENDERING_EXPORT
#define VTKM_RENDERING_EXPORT
Definition: vtkm_rendering_export.h:44
vtkm::rendering::Camera::NearPlane
vtkm::Float32 NearPlane
Definition: Camera.h:589
vtkm::rendering::Camera::SetXScale
void SetXScale(vtkm::Float32 xscale)
The xscale of the camera.
Definition: Camera.h:321
vtkm::rendering::Camera::Camera3DStruct::YPan
vtkm::Float32 YPan
Definition: Camera.h:66
MatrixHelpers.h
vtkm::rendering::Camera::SetViewport
void SetViewport(vtkm::Float64 left, vtkm::Float64 right, vtkm::Float64 bottom, vtkm::Float64 top)
The viewport of the projection.
Definition: Camera.h:237
vtkm::rendering::Camera::ViewportBottom
vtkm::Float32 ViewportBottom
Definition: Camera.h:594
vtkm::rendering::Camera::SetModeTo3D
void SetModeTo3D()
The mode of the camera (2D or 3D).
Definition: Camera.h:147
vtkm::rendering::Camera::Camera2DStruct::Bottom
vtkm::Float32 Bottom
Definition: Camera.h:95
vtkm::rendering::Camera::Camera2DStruct::XScale
vtkm::Float32 XScale
Definition: Camera.h:97
vtkm::rendering::Camera::Camera
Camera(Mode vtype=Camera::Mode::ThreeD)
Definition: Camera.h:111
vtkm::rendering::Camera::GetClippingRange
vtkm::Range GetClippingRange() const
The clipping range of the camera.
Definition: Camera.h:166
vtkm::rendering::Camera::SetViewUp
void SetViewUp(const vtkm::Vec3f_32 &viewUp)
The up orientation of the camera in 3D mode.
Definition: Camera.h:302
vtkm::rendering::Camera::SetXScale
void SetXScale(vtkm::Float64 xscale)
The xscale of the camera.
Definition: Camera.h:328
vtkm::rendering::Camera::Camera2DStruct::Left
vtkm::Float32 Left
Definition: Camera.h:93
vtkm::rendering::Camera::SetViewRange2D
void SetViewRange2D(vtkm::Float64 left, vtkm::Float64 right, vtkm::Float64 bottom, vtkm::Float64 top)
The viewable region in the x-y plane.
Definition: Camera.h:559
vtkm::rendering::Camera::SetClippingRange
void SetClippingRange(vtkm::Float64 nearPlane, vtkm::Float64 farPlane)
The clipping range of the camera.
Definition: Camera.h:176
vtkm::rendering::Camera::Camera2DStruct::Camera2DStruct
Camera2DStruct()
Definition: Camera.h:74
vtkm::rendering::Camera::SetModeTo2D
void SetModeTo2D()
The mode of the camera (2D or 3D).
Definition: Camera.h:150
vtkm::rendering::Camera::Pan
void Pan(vtkm::Vec2f_64 direction)
Pans the camera.
Definition: Camera.h:368
vtkm::rendering::Camera::Camera2D
Camera2DStruct Camera2D
Definition: Camera.h:587
vtkm::rendering::Camera::ViewportTop
vtkm::Float32 ViewportTop
Definition: Camera.h:595
Matrix.h
vtkm::rendering::Camera::Camera2DStruct
Definition: Camera.h:70
vtkm::rendering::Camera::Camera3DStruct::LookAt
vtkm::Vec3f_32 LookAt
Definition: Camera.h:61
vtkm::rendering::Camera::Mode::TwoD
@ TwoD
vtkm::rendering::Camera::Camera3DStruct::Camera3DStruct
Camera3DStruct()
Definition: Camera.h:43
vtkm::rendering::Camera::Azimuth
void Azimuth(vtkm::Float64 angleDegrees)
Rotate the camera about the view up vector centered at the focal point.
Definition: Camera.h:465
vtkm::rendering::Camera::GetFieldOfView
vtkm::Float32 GetFieldOfView() const
The field of view angle.
Definition: Camera.h:338
vtkm::rendering::Camera::SetMode
void SetMode(vtkm::rendering::Camera::Mode mode)
The mode of the camera (2D or 3D).
Definition: Camera.h:144
vtkm::rendering::Camera::Camera3DStruct::FieldOfView
vtkm::Float32 FieldOfView
Definition: Camera.h:64
vtkm::rendering::Camera::Camera3DStruct::ViewUp
vtkm::Vec3f_32 ViewUp
Definition: Camera.h:63
vtkm::rendering::Camera::Camera3DStruct::Zoom
vtkm::Float32 Zoom
Definition: Camera.h:67
vtkm::rendering::Camera::Mode::ThreeD
@ ThreeD
vtkm::rendering::Camera::GetXScale
vtkm::Float32 GetXScale() const
The xscale of the camera.
Definition: Camera.h:318
VectorAnalysis.h
vtkm_rendering_export.h
vtkm::rendering::Camera::Zoom
void Zoom(vtkm::Float64 zoom)
Zooms the camera in or out.
Definition: Camera.h:391
vtkm::rendering::Camera::Camera3DStruct::Position
vtkm::Vec3f_32 Position
Definition: Camera.h:62
vtkm::rendering::Camera::Camera2DStruct::YPan
vtkm::Float32 YPan
Definition: Camera.h:99
Bounds.h
vtkm::rendering::Camera::SetFieldOfView
void SetFieldOfView(vtkm::Float32 fov)
The field of view angle.
Definition: Camera.h:341
Math.h
vtkm::rendering::Camera::Pan
void Pan(vtkm::Vec2f_32 direction)
Pans the camera.
Definition: Camera.h:365
vtkm::rendering::Camera::Camera2DStruct::XPan
vtkm::Float32 XPan
Definition: Camera.h:98
vtkm::rendering::Camera::GetPan
vtkm::Vec2f_32 GetPan() const
Pans the camera.
Definition: Camera.h:371
vtkm::rendering::Camera::Camera3DStruct::XPan
vtkm::Float32 XPan
Definition: Camera.h:65
vtkm::rendering::Camera::GetViewport
vtkm::Bounds GetViewport() const
The viewport of the projection.
Definition: Camera.h:221
vtkm::rendering::Camera::GetViewRange2D
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:519
Range.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
vtkm::rendering::Camera::Mode
Mode
Definition: Camera.h:104
vtkm::rendering::Camera::Dolly
void Dolly(vtkm::Float64 value)
Move the camera toward or away from the focal point.
Definition: Camera.h:507
vtkm::rendering::Camera::SetViewRange2D
void SetViewRange2D(const vtkm::Bounds &viewRange)
Definition: Camera.h:576
vtkm::rendering::Camera::ModeType
Mode ModeType
Definition: Camera.h:585
vtkm::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
vtkm::rendering::Camera::GetLookAt
const vtkm::Vec3f_32 & GetLookAt() const
The focal point the camera is looking at in 3D mode.
Definition: Camera.h:258
vtkm::rendering::Camera::Camera2DStruct::Right
vtkm::Float32 Right
Definition: Camera.h:94
vtkm::rendering::Camera::SetViewport
void SetViewport(vtkm::Float32 left, vtkm::Float32 right, vtkm::Float32 bottom, vtkm::Float32 top)
The viewport of the projection.
Definition: Camera.h:228
Transform3D.h
vtkm::rendering::Camera::SetLookAt
void SetLookAt(const vtkm::Vec< Float64, 3 > &lookAt)
The focal point the camera is looking at in 3D mode.
Definition: Camera.h:268
vtkm::rendering::Camera::Camera3DStruct
Definition: Camera.h:39
vtkm::rendering::Camera::GetMode
vtkm::rendering::Camera::Mode GetMode() const
The mode of the camera (2D or 3D).
Definition: Camera.h:141
vtkm::rendering::Camera::SetPosition
void SetPosition(const vtkm::Vec3f_32 &position)
The spatial position of the camera in 3D mode.
Definition: Camera.h:282
vtkm::rendering::Camera::SetViewRange2D
void SetViewRange2D(const vtkm::Range &xRange, const vtkm::Range &yRange)
The viewable region in the x-y plane.
Definition: Camera.h:571
vtkm::Vec< vtkm::Float32, 3 >
vtkm::Matrix< vtkm::Float32, 4, 4 >
vtkm::Range::Min
vtkm::Float64 Min
The minumum value of the range (inclusive).
Definition: Range.h:34
vtkm::rendering::Camera::SetViewport
void SetViewport(const vtkm::Bounds &viewportBounds)
The viewport of the projection.
Definition: Camera.h:246
vtkm::rendering::Camera::Camera2DStruct::Zoom
vtkm::Float32 Zoom
Definition: Camera.h:100
vtkm::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:157
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
vtkm::rendering::Camera::SetClippingRange
void SetClippingRange(vtkm::Float32 nearPlane, vtkm::Float32 farPlane)
The clipping range of the camera.
Definition: Camera.h:169
vtkm::rendering::Camera::GetViewport
void GetViewport(vtkm::Float32 &left, vtkm::Float32 &right, vtkm::Float32 &bottom, vtkm::Float32 &top) const
The viewport of the projection.
Definition: Camera.h:197
vtkm::Bounds::X
vtkm::Range X
The range of values in the X direction.
Definition: Bounds.h:33
vtkm::Bounds::Y
vtkm::Range Y
The range of values in the Y direction.
Definition: Bounds.h:36
vtkm::rendering::Camera
Specifies the viewport for a rendering.
Definition: Camera.h:37
vtkm::rendering::Camera::ViewportLeft
vtkm::Float32 ViewportLeft
Definition: Camera.h:592
vtkm::rendering::Camera::SetFieldOfView
void SetFieldOfView(vtkm::Float64 fov)
The field of view angle.
Definition: Camera.h:348
vtkm::Range::Max
vtkm::Float64 Max
Tha maximum value of the range (inclusive).
Definition: Range.h:36
vtkm::rendering::Camera::GetViewUp
const vtkm::Vec3f_32 & GetViewUp() const
The up orientation of the camera in 3D mode.
Definition: Camera.h:299
vtkm::rendering::Camera::FarPlane
vtkm::Float32 FarPlane
Definition: Camera.h:590
vtkm::rendering::Camera::SetPosition
void SetPosition(const vtkm::Vec3f_64 &position)
The spatial position of the camera in 3D mode.
Definition: Camera.h:289
vtkm::rendering::Camera::Pan
void Pan(vtkm::Float64 dx, vtkm::Float64 dy)
Pans the camera.
Definition: Camera.h:359
vtkm::rendering::Camera::SetViewRange2D
void SetViewRange2D(vtkm::Float32 left, vtkm::Float32 right, vtkm::Float32 bottom, vtkm::Float32 top)
The viewable region in the x-y plane.
Definition: Camera.h:542
vtkm::rendering::Camera::GetViewport
void GetViewport(vtkm::Float64 &left, vtkm::Float64 &right, vtkm::Float64 &bottom, vtkm::Float64 &top) const
The viewport of the projection.
Definition: Camera.h:209
vtkm::rendering::Camera::GetPosition
const vtkm::Vec3f_32 & GetPosition() const
The spatial position of the camera in 3D mode.
Definition: Camera.h:279
vtkm::rendering::Camera::Roll
void Roll(vtkm::Float64 angleDegrees)
Roll the camera.
Definition: Camera.h:451
vtkm::rendering::Camera::Elevation
void Elevation(vtkm::Float64 angleDegrees)
Rotate the camera vertically around the focal point.
Definition: Camera.h:483
vtkm::rendering::Camera::GetViewRange2D
vtkm::Bounds GetViewRange2D() const
The viewable region in the x-y plane.
Definition: Camera.h:531
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31