Viskores  1.0
MapperGlyphBase.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_MapperGlyphBase_h
19 #define viskores_rendering_MapperGlyphBase_h
20 
21 #include <viskores/Deprecated.h>
25 
26 #include <memory>
27 
28 namespace viskores
29 {
30 namespace rendering
31 {
32 
33 class CanvasRayTracer;
34 
39 class VISKORES_RENDERING_EXPORT MapperGlyphBase : public Mapper
40 {
41 public:
43 
44  virtual ~MapperGlyphBase();
45 
46  void SetCanvas(viskores::rendering::Canvas* canvas) override;
47  virtual viskores::rendering::Canvas* GetCanvas() const override;
48 
54  virtual viskores::cont::Field::Association GetAssociation() const;
56  virtual void SetAssociation(viskores::cont::Field::Association association);
58  virtual bool GetUseCells() const;
60  virtual void SetUseCells();
62  virtual bool GetUsePoints() const;
64  virtual void SetUsePoints();
65  VISKORES_DEPRECATED(2.2, "Use GetUsePoints() or GetAssociation().")
66  virtual bool GetUseNodes() const;
67  VISKORES_DEPRECATED(2.2, "Use SetUsePoints() or SetAssociation().")
68  virtual void SetUseNodes();
69 
70  // These options do not seem to be supported yet.
71  // I'm not sure why you would need UseStride. Just use Stride = 1.
72  virtual bool GetUseStride() const;
73  virtual void SetUseStride(bool on);
74  virtual viskores::Id GetStride() const;
75  virtual void SetStride(viskores::Id stride);
76 
81  virtual viskores::Float32 GetBaseSize() const;
83  virtual void SetBaseSize(viskores::Float32 size);
84 
86  virtual bool GetScaleByValue() const;
88  virtual void SetScaleByValue(bool on);
89 
98  virtual viskores::Float32 GetScaleDelta() const;
100  virtual void SetScaleDelta(viskores::Float32 delta);
101 
102  virtual void SetCompositeBackground(bool on);
103 
104 protected:
105  virtual viskores::cont::DataSet FilterPoints(const viskores::cont::UnknownCellSet& cellSet,
106  const viskores::cont::CoordinateSystem& coords,
107  const viskores::cont::Field& scalarField) const;
108 
109 
111  bool CompositeBackground = true;
112 
114 
115  bool UseStride = false;
116  viskores::Id Stride = 1;
117 
118  bool ScaleByValue = false;
119  viskores::Float32 BaseSize = -1.f;
120  viskores::Float32 ScaleDelta = 0.5f;
121 };
122 }
123 } //namespace viskores::rendering
124 
125 #endif //viskores_rendering_MapperGlyphBase_h
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::cont::Field::Association
Association
Identifies what elements of a data set a field is associated with.
Definition: Field.h:46
viskores::rendering::MapperGlyphBase
Base class for glyph mappers.
Definition: MapperGlyphBase.h:39
viskores::cont::CoordinateSystem
Manages a coordinate system for a DataSet.
Definition: CoordinateSystem.h:38
ColorTable.h
viskores::rendering::CanvasRayTracer
Represents the image space that is the target of rendering using the internal ray tracing code.
Definition: CanvasRayTracer.h:33
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:165
VISKORES_DEPRECATED
#define VISKORES_DEPRECATED(...)
Definition: Deprecated.h:156
viskores::rendering::Mapper
Converts data into commands to a rendering system.
Definition: Mapper.h:37
viskores::cont::UnknownCellSet
A CellSet of an unknown type.
Definition: UnknownCellSet.h:56
Deprecated.h
Camera.h
Mapper.h
viskores::cont::Field::Association::Points
@ Points
A field that applies to points.
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