VTK-m  2.0
Actor.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_Actor_h
11 #define vtk_m_rendering_Actor_h
12 
13 #include <vtkm/rendering/vtkm_rendering_export.h>
14 
15 #include <vtkm/rendering/Camera.h>
16 #include <vtkm/rendering/Canvas.h>
17 #include <vtkm/rendering/Mapper.h>
18 
19 #include <memory>
20 
21 namespace vtkm
22 {
23 namespace rendering
24 {
25 
26 class VTKM_RENDERING_EXPORT Actor
27 {
28 public:
29  Actor(const vtkm::cont::UnknownCellSet& cells,
30  const vtkm::cont::CoordinateSystem& coordinates,
31  const vtkm::cont::Field& scalarField);
32 
33  Actor(const vtkm::cont::UnknownCellSet& cells,
34  const vtkm::cont::CoordinateSystem& coordinates,
35  const vtkm::cont::Field& scalarField,
36  const vtkm::cont::ColorTable& colorTable);
37 
38  Actor(const vtkm::cont::UnknownCellSet& cells,
39  const vtkm::cont::CoordinateSystem& coordinates,
40  const vtkm::cont::Field& scalarField,
41  const vtkm::rendering::Color& color);
42 
43  void Render(vtkm::rendering::Mapper& mapper,
45  const vtkm::rendering::Camera& camera) const;
46 
47  const vtkm::cont::UnknownCellSet& GetCells() const;
48 
49  const vtkm::cont::CoordinateSystem& GetCoordinates() const;
50 
51  const vtkm::cont::Field& GetScalarField() const;
52 
53  const vtkm::cont::ColorTable& GetColorTable() const;
54 
55  const vtkm::Range& GetScalarRange() const;
56 
57  const vtkm::Bounds& GetSpatialBounds() const;
58 
59  void SetScalarRange(const vtkm::Range& scalarRange);
60 
61 private:
62  struct InternalsType;
63  std::shared_ptr<InternalsType> Internals;
64 
65  struct RangeFunctor;
66 
67  void Init(const vtkm::cont::CoordinateSystem& coordinates, const vtkm::cont::Field& scalarField);
68 };
69 }
70 } //namespace vtkm::rendering
71 
72 #endif //vtk_m_rendering_Actor_h
vtkm::rendering::Color
It's a color!
Definition: Color.h:28
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::ColorTable
Color Table for coloring arbitrary fields.
Definition: cont/ColorTable.h:89
vtkm::rendering::Actor
Definition: Actor.h:26
vtkm::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
vtkm::cont::CoordinateSystem
Definition: CoordinateSystem.h:25
vtkm::rendering::Mapper
Definition: Mapper.h:24
vtkm::rendering::Canvas
Definition: Canvas.h:34
vtkm::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: cont/Field.h:31
vtkm::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
vtkm::rendering::Actor::Internals
std::shared_ptr< InternalsType > Internals
Definition: Actor.h:62
Camera.h
vtkm::rendering::Camera
Definition: Camera.h:28
Canvas.h
Mapper.h
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31