VTK-m  2.1
MapperPoint.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_MapperPoint_h
11 #define vtk_m_rendering_MapperPoint_h
12 
13 #include <vtkm/Deprecated.h>
14 #include <vtkm/cont/ColorTable.h>
15 #include <vtkm/rendering/Camera.h>
16 #include <vtkm/rendering/Mapper.h>
17 
18 #include <memory>
19 
20 namespace vtkm
21 {
22 namespace rendering
23 {
24 
31 {
32 public:
33  MapperPoint();
34 
35  ~MapperPoint();
36 
37  void SetCanvas(vtkm::rendering::Canvas* canvas) override;
38  virtual vtkm::rendering::Canvas* GetCanvas() const override;
39 
44  virtual vtkm::cont::Field::Association GetAssociation() const;
46  virtual void SetAssociation(vtkm::cont::Field::Association association);
48  virtual bool GetUseCells() const;
50  virtual void SetUseCells();
52  virtual bool GetUsePoints() const;
54  virtual void SetUsePoints();
55  VTKM_DEPRECATED(2.2, "Use SetUseCells or SetAssociation.")
56  void UseCells();
57  VTKM_DEPRECATED(2.2, "Use SetUsePoints or SetAssociation.")
58  void UseNodes();
59 
64  void UseVariableRadius(bool useVariableRadius);
65 
69  void SetRadius(const vtkm::Float32& radius);
70 
77  void SetRadiusDelta(const vtkm::Float32& delta);
78 
79  void SetCompositeBackground(bool on);
80  vtkm::rendering::Mapper* NewCopy() const override;
81 
82 private:
83  struct InternalsType;
84  std::shared_ptr<InternalsType> Internals;
85 
86  struct RenderFunctor;
87 
88  void RenderCellsImpl(const vtkm::cont::UnknownCellSet& cellset,
89  const vtkm::cont::CoordinateSystem& coords,
90  const vtkm::cont::Field& scalarField,
91  const vtkm::cont::ColorTable& colorTable,
92  const vtkm::rendering::Camera& camera,
93  const vtkm::Range& scalarRange,
94  const vtkm::cont::Field& ghostField) override;
95 };
96 }
97 } //namespace vtkm::rendering
98 
99 #endif //vtk_m_rendering_MapperPoint_h
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_EXPORT
#define VTKM_RENDERING_EXPORT
Definition: vtkm_rendering_export.h:44
vtkm::cont::Field::Association
Association
Identifies what elements of a data set a field is associated with.
Definition: Field.h:38
vtkm::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
ColorTable.h
vtkm::cont::CoordinateSystem
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:30
vtkm::rendering::Mapper
Converts data into commands to a rendering system.
Definition: Mapper.h:29
vtkm::rendering::MapperPoint
This mapper renders points from a cell set.
Definition: MapperPoint.h:30
vtkm::rendering::Canvas
Represents the image space that is the target of rendering.
Definition: Canvas.h:35
vtkm::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: Field.h:31
Deprecated.h
vtkm::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:157
Camera.h
vtkm::rendering::Camera
Specifies the viewport for a rendering.
Definition: Camera.h:37
Mapper.h
vtkm::rendering::MapperPoint::Internals
std::shared_ptr< InternalsType > Internals
Definition: MapperPoint.h:83
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31