Viskores  1.0
Actor.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_rendering_Actor_h
19 #define viskores_rendering_Actor_h
20 
22 
26 
27 #include <memory>
28 
29 namespace viskores
30 {
31 namespace rendering
32 {
33 
38 class VISKORES_RENDERING_EXPORT Actor
39 {
40 public:
41  Actor(const viskores::cont::DataSet dataSet,
42  const std::string coordinateName,
43  const std::string fieldName);
44 
45  Actor(const viskores::cont::DataSet dataSet,
46  const std::string coordinateName,
47  const std::string fieldName,
48  const viskores::cont::ColorTable& colorTable);
49 
50  Actor(const viskores::cont::DataSet dataSet,
51  const std::string coordinateName,
52  const std::string fieldName,
53  const viskores::rendering::Color& color);
54 
56  const std::string coordinateName,
57  const std::string fieldName);
58 
60  const std::string coordinateName,
61  const std::string fieldName,
62  const viskores::cont::ColorTable& colorTable);
63 
65  const std::string coordinateName,
66  const std::string fieldName,
67  const viskores::rendering::Color& color);
68 
73  const viskores::cont::CoordinateSystem& coordinates,
74  const viskores::cont::Field& scalarField);
75 
81  const viskores::cont::CoordinateSystem& coordinates,
82  const viskores::cont::Field& scalarField,
83  const viskores::cont::ColorTable& colorTable);
84 
88  // Why do you have to provide a `Field` if a constant color is provided?
90  const viskores::cont::CoordinateSystem& coordinates,
91  const viskores::cont::Field& scalarField,
92  const viskores::rendering::Color& color);
93 
94  Actor(const Actor&);
95  Actor& operator=(const Actor&);
96 
97  Actor(Actor&&) noexcept;
98  Actor& operator=(Actor&&) noexcept;
99  ~Actor();
100 
101  void Render(viskores::rendering::Mapper& mapper,
103  const viskores::rendering::Camera& camera) const;
104 
105  const viskores::cont::UnknownCellSet& GetCells() const;
106 
107  viskores::cont::CoordinateSystem GetCoordinates() const;
108 
109  const viskores::cont::Field& GetScalarField() const;
110 
111  const viskores::cont::ColorTable& GetColorTable() const;
112 
113  const viskores::Range& GetScalarRange() const;
114 
115  const viskores::Bounds& GetSpatialBounds() const;
116 
122  void SetScalarRange(const viskores::Range& scalarRange);
123 
124 private:
125  struct InternalsType;
126  std::unique_ptr<InternalsType> Internals;
127 
128  void Init(const viskores::cont::CoordinateSystem& coordinates,
129  const viskores::cont::Field& scalarField);
130 
131  void Init();
132 };
133 }
134 } //namespace viskores::rendering
135 
136 #endif //viskores_rendering_Actor_h
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::rendering::Actor::Internals
std::unique_ptr< InternalsType > Internals
Definition: Actor.h:125
viskores::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:37
viskores::cont::CoordinateSystem
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:38
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::ColorTable
Color Table for coloring arbitrary fields.
Definition: cont/ColorTable.h:97
viskores::rendering::Mapper
Converts data into commands to a rendering system.
Definition: Mapper.h:37
viskores::cont::PartitionedDataSet
Comprises a set of viskores::cont::DataSet objects.
Definition: PartitionedDataSet.h:34
viskores::Range
Represent a continuous scalar range of values.
Definition: Range.h:39
viskores::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:56
viskores::rendering::Camera
Specifies the viewport for a rendering.
Definition: Camera.h:45
viskores::rendering::Actor
An item to be rendered.
Definition: Actor.h:38
Camera.h
viskores_rendering_export.h
Canvas.h
Mapper.h
viskores::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: Field.h:39
viskores::rendering::Canvas
Represents the image space that is the target of rendering.
Definition: Canvas.h:43
viskores::rendering::Color
Representation of a color.
Definition: Color.h:37