VTK-m  2.0
MapperCylinder.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_MapperCylinder_h
11 #define vtk_m_rendering_MapperCylinder_h
12 
13 #include <vtkm/cont/ColorTable.h>
14 #include <vtkm/rendering/Camera.h>
15 #include <vtkm/rendering/Mapper.h>
16 
17 #include <memory>
18 
19 namespace vtkm
20 {
21 namespace rendering
22 {
23 
29 class VTKM_RENDERING_EXPORT MapperCylinder : public Mapper
30 {
31 public:
33 
34  ~MapperCylinder();
35 
36  void SetCanvas(vtkm::rendering::Canvas* canvas) override;
37 
38  virtual vtkm::rendering::Canvas* GetCanvas() const override;
39 
45  void UseVariableRadius(bool useVariableRadius);
46 
52  void SetRadius(const vtkm::Float32& radius);
53 
62  void SetRadiusDelta(const vtkm::Float32& delta);
63 
64  void RenderCells(const vtkm::cont::UnknownCellSet& cellset,
65  const vtkm::cont::CoordinateSystem& coords,
66  const vtkm::cont::Field& scalarField,
67  const vtkm::cont::ColorTable& colorTable,
68  const vtkm::rendering::Camera& camera,
69  const vtkm::Range& scalarRange) override;
70 
71  void SetCompositeBackground(bool on);
72  vtkm::rendering::Mapper* NewCopy() const override;
73 
74 private:
75  struct InternalsType;
76  std::shared_ptr<InternalsType> Internals;
77 
78  struct RenderFunctor;
79 };
80 }
81 } //namespace vtkm::rendering
82 
83 #endif //vtk_m_rendering_MapperCylinder_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::MapperCylinder
MapperCylinder renderers edges from a cell set and renders them as cylinders via ray tracing.
Definition: MapperCylinder.h:29
vtkm::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
ColorTable.h
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::rendering::MapperCylinder::Internals
std::shared_ptr< InternalsType > Internals
Definition: MapperCylinder.h:75
vtkm::Float32
float Float32
Definition: Types.h:154
Camera.h
vtkm::rendering::Camera
Definition: Camera.h:28
Mapper.h
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31