VTK-m  2.2
ColorBarAnnotation.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_ColorBarAnnotation_h
11 #define vtk_m_rendering_ColorBarAnnotation_h
12 
14 
15 #include <vtkm/cont/ColorTable.h>
16 #include <vtkm/cont/DataSet.h>
18 #include <vtkm/rendering/Camera.h>
19 #include <vtkm/rendering/Canvas.h>
20 
21 namespace vtkm
22 {
23 namespace rendering
24 {
25 
27 {
28 protected:
32  bool Horizontal;
33  std::string FieldName;
34 
35 public:
37 
38  VTKM_CONT
39  void SetColorTable(const vtkm::cont::ColorTable& colorTable) { this->ColorTable = colorTable; }
40 
41  VTKM_CONT
42  void SetRange(const vtkm::Range& range, vtkm::IdComponent numTicks);
43 
44  VTKM_CONT
45  void SetFieldName(const std::string& fieldName);
46 
47  VTKM_CONT
49  {
50  this->SetRange(vtkm::Range(l, h), numTicks);
51  }
52 
53 
54  VTKM_CONT
55  void SetPosition(const vtkm::Bounds& position);
56 
57  void Render(const vtkm::rendering::Camera& camera,
58  const vtkm::rendering::WorldAnnotator& worldAnnotator,
59  vtkm::rendering::Canvas& canvas);
60 };
61 }
62 } //namespace vtkm::rendering
63 
64 #endif // vtk_m_rendering_ColorBarAnnotation_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::IdComponent
vtkm::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:194
vtkm::rendering::ColorBarAnnotation::Horizontal
bool Horizontal
Definition: ColorBarAnnotation.h:32
vtkm::rendering::ColorBarAnnotation::SetColorTable
void SetColorTable(const vtkm::cont::ColorTable &colorTable)
Definition: ColorBarAnnotation.h:39
ColorTable.h
vtkm_rendering_export.h
vtkm::rendering::Canvas
Represents the image space that is the target of rendering.
Definition: Canvas.h:35
vtkm::rendering::ColorBarAnnotation::SetRange
void SetRange(vtkm::Float64 l, vtkm::Float64 h, vtkm::IdComponent numTicks)
Definition: ColorBarAnnotation.h:48
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::rendering::ColorBarAnnotation::ColorTable
vtkm::cont::ColorTable ColorTable
Definition: ColorBarAnnotation.h:29
vtkm::rendering::ColorBarAnnotation::Position
vtkm::Bounds Position
Definition: ColorBarAnnotation.h:31
vtkm::rendering::AxisAnnotation2D
Definition: AxisAnnotation2D.h:29
vtkm::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:29
vtkm::rendering::ColorBarAnnotation::Axis
vtkm::rendering::AxisAnnotation2D Axis
Definition: ColorBarAnnotation.h:30
AxisAnnotation2D.h
vtkm::rendering::WorldAnnotator
Definition: WorldAnnotator.h:27
Camera.h
vtkm::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:161
vtkm::rendering::ColorBarAnnotation::FieldName
std::string FieldName
Definition: ColorBarAnnotation.h:33
vtkm::rendering::Camera
Specifies the viewport for a rendering.
Definition: Camera.h:37
Canvas.h
vtkm::rendering::ColorBarAnnotation
Definition: ColorBarAnnotation.h:26
DataSet.h
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31