Viskores  1.0
ColorBarAnnotation.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_ColorBarAnnotation_h
19 #define viskores_rendering_ColorBarAnnotation_h
20 
22 
24 #include <viskores/cont/DataSet.h>
28 
29 namespace viskores
30 {
31 namespace rendering
32 {
33 
34 class VISKORES_RENDERING_EXPORT ColorBarAnnotation
35 {
36 protected:
40  bool Horizontal;
41  std::string FieldName;
42 
43 public:
45 
47  void SetColorTable(const viskores::cont::ColorTable& colorTable)
48  {
49  this->ColorTable = colorTable;
50  }
51 
53  void SetRange(const viskores::Range& range, viskores::IdComponent numTicks);
54 
56  void SetFieldName(const std::string& fieldName);
57 
60  {
61  this->SetRange(viskores::Range(l, h), numTicks);
62  }
63 
64 
66  void SetPosition(const viskores::Bounds& position);
67 
68  void Render(const viskores::rendering::Camera& camera,
69  const viskores::rendering::WorldAnnotator& worldAnnotator,
71 };
72 }
73 } //namespace viskores::rendering
74 
75 #endif // viskores_rendering_ColorBarAnnotation_h
viskores::Bounds
Represent an axis-aligned 3D bounds in space.
Definition: Bounds.h:37
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
ColorTable.h
viskores::rendering::ColorBarAnnotation::SetColorTable
void SetColorTable(const viskores::cont::ColorTable &colorTable)
Definition: ColorBarAnnotation.h:47
viskores::rendering::ColorBarAnnotation::FieldName
std::string FieldName
Definition: ColorBarAnnotation.h:41
viskores::rendering::ColorBarAnnotation::Horizontal
bool Horizontal
Definition: ColorBarAnnotation.h:40
viskores::rendering::ColorBarAnnotation::Position
viskores::Bounds Position
Definition: ColorBarAnnotation.h:39
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::ColorTable
Color Table for coloring arbitrary fields.
Definition: cont/ColorTable.h:97
AxisAnnotation2D.h
viskores::Range
Represent a continuous scalar range of values.
Definition: Range.h:39
viskores::rendering::Camera
Specifies the viewport for a rendering.
Definition: Camera.h:45
viskores::rendering::ColorBarAnnotation::Axis
viskores::rendering::AxisAnnotation2D Axis
Definition: ColorBarAnnotation.h:38
Camera.h
viskores::rendering::ColorBarAnnotation::ColorTable
viskores::cont::ColorTable ColorTable
Definition: ColorBarAnnotation.h:37
viskores_rendering_export.h
Canvas.h
viskores::rendering::WorldAnnotator
Definition: WorldAnnotator.h:35
viskores::rendering::ColorBarAnnotation
Definition: ColorBarAnnotation.h:34
viskores::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:169
DataSet.h
viskores::rendering::Canvas
Represents the image space that is the target of rendering.
Definition: Canvas.h:43
viskores::rendering::ColorBarAnnotation::SetRange
void SetRange(viskores::Float64 l, viskores::Float64 h, viskores::IdComponent numTicks)
Definition: ColorBarAnnotation.h:59
viskores::rendering::AxisAnnotation2D
Definition: AxisAnnotation2D.h:37