Viskores  1.0
MapperPoint.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_MapperPoint_h
19 #define viskores_rendering_MapperPoint_h
20 
21 #include <viskores/Deprecated.h>
25 
26 #include <memory>
27 
28 namespace viskores
29 {
30 namespace rendering
31 {
32 
38 class VISKORES_RENDERING_EXPORT MapperPoint : public Mapper
39 {
40 public:
41  MapperPoint();
42 
43  ~MapperPoint();
44 
45  void SetCanvas(viskores::rendering::Canvas* canvas) override;
46  virtual viskores::rendering::Canvas* GetCanvas() const override;
47 
52  virtual viskores::cont::Field::Association GetAssociation() const;
54  virtual void SetAssociation(viskores::cont::Field::Association association);
56  virtual bool GetUseCells() const;
58  virtual void SetUseCells();
60  virtual bool GetUsePoints() const;
62  virtual void SetUsePoints();
63  VISKORES_DEPRECATED(2.2, "Use SetUseCells or SetAssociation.")
64  void UseCells();
65  VISKORES_DEPRECATED(2.2, "Use SetUsePoints or SetAssociation.")
66  void UseNodes();
67 
72  void UseVariableRadius(bool useVariableRadius);
73 
77  void SetRadius(const viskores::Float32& radius);
78 
85  void SetRadiusDelta(const viskores::Float32& delta);
86 
87  void SetCompositeBackground(bool on);
88  viskores::rendering::Mapper* NewCopy() const override;
89 
90 private:
91  struct InternalsType;
92  std::shared_ptr<InternalsType> Internals;
93 
94  struct RenderFunctor;
95 
96  void RenderCellsImpl(const viskores::cont::UnknownCellSet& cellset,
98  const viskores::cont::Field& scalarField,
99  const viskores::cont::ColorTable& colorTable,
100  const viskores::rendering::Camera& camera,
101  const viskores::Range& scalarRange,
102  const viskores::cont::Field& ghostField) override;
103 };
104 }
105 } //namespace viskores::rendering
106 
107 #endif //viskores_rendering_MapperPoint_h
viskores::cont::Field::Association
Association
Identifies what elements of a data set a field is associated with.
Definition: Field.h:46
viskores::cont::CoordinateSystem
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:38
ColorTable.h
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::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:165
viskores::rendering::MapperPoint
This mapper renders points from a cell set.
Definition: MapperPoint.h:38
VISKORES_DEPRECATED
#define VISKORES_DEPRECATED(...)
Definition: Deprecated.h:156
viskores::rendering::MapperPoint::Internals
std::shared_ptr< InternalsType > Internals
Definition: MapperPoint.h:91
viskores::rendering::Mapper
Converts data into commands to a rendering system.
Definition: Mapper.h:37
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
Deprecated.h
Camera.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