VTK-m  2.2
MapperGlyphBase.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_MapperGlyphBase_h
11 #define vtk_m_rendering_MapperGlyphBase_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 
25 class CanvasRayTracer;
26 
32 {
33 public:
35 
36  virtual ~MapperGlyphBase();
37 
38  void SetCanvas(vtkm::rendering::Canvas* canvas) override;
39  virtual vtkm::rendering::Canvas* GetCanvas() const override;
40 
46  virtual vtkm::cont::Field::Association GetAssociation() const;
48  virtual void SetAssociation(vtkm::cont::Field::Association association);
50  virtual bool GetUseCells() const;
52  virtual void SetUseCells();
54  virtual bool GetUsePoints() const;
56  virtual void SetUsePoints();
57  VTKM_DEPRECATED(2.2, "Use GetUsePoints() or GetAssociation().")
58  virtual bool GetUseNodes() const;
59  VTKM_DEPRECATED(2.2, "Use SetUsePoints() or SetAssociation().")
60  virtual void SetUseNodes();
61 
62  // These options do not seem to be supported yet.
63  // I'm not sure why you would need UseStride. Just use Stride = 1.
64  virtual bool GetUseStride() const;
65  virtual void SetUseStride(bool on);
66  virtual vtkm::Id GetStride() const;
67  virtual void SetStride(vtkm::Id stride);
68 
73  virtual vtkm::Float32 GetBaseSize() const;
75  virtual void SetBaseSize(vtkm::Float32 size);
76 
78  virtual bool GetScaleByValue() const;
80  virtual void SetScaleByValue(bool on);
81 
90  virtual vtkm::Float32 GetScaleDelta() const;
92  virtual void SetScaleDelta(vtkm::Float32 delta);
93 
94  virtual void SetCompositeBackground(bool on);
95 
96 protected:
97  virtual vtkm::cont::DataSet FilterPoints(const vtkm::cont::UnknownCellSet& cellSet,
98  const vtkm::cont::CoordinateSystem& coords,
99  const vtkm::cont::Field& scalarField) const;
100 
101 
103  bool CompositeBackground = true;
104 
106 
107  bool UseStride = false;
108  vtkm::Id Stride = 1;
109 
110  bool ScaleByValue = false;
111  vtkm::Float32 BaseSize = -1.f;
112  vtkm::Float32 ScaleDelta = 0.5f;
113 };
114 }
115 } //namespace vtkm::rendering
116 
117 #endif //vtk_m_rendering_MapperGlyphBase_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
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::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::rendering::MapperGlyphBase
Base class for glyph mappers.
Definition: MapperGlyphBase.h:31
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::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
vtkm::cont::Field::Association::Points
@ Points
A field that applies to points.
vtkm::Id
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
Deprecated.h
vtkm::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:157
Camera.h
vtkm::rendering::CanvasRayTracer
Represents the image space that is the target of rendering using the internal ray tracing code.
Definition: CanvasRayTracer.h:25
Mapper.h
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145