2016-05-18 19:29:50 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//
|
|
|
|
// Copyright 2016 Sandia Corporation.
|
|
|
|
// Copyright 2016 UT-Battelle, LLC.
|
|
|
|
// Copyright 2016 Los Alamos National Security.
|
|
|
|
//
|
|
|
|
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
|
|
|
// the U.S. Government retains certain rights in this software.
|
|
|
|
//
|
|
|
|
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
|
|
|
// Laboratory (LANL), the U.S. Government retains certain rights in
|
|
|
|
// this software.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtk_m_rendering_ColorBarAnnotation_h
|
|
|
|
#define vtk_m_rendering_ColorBarAnnotation_h
|
|
|
|
|
2016-08-27 02:32:15 +00:00
|
|
|
#include <vtkm/rendering/vtkm_rendering_export.h>
|
|
|
|
|
2016-05-18 19:29:50 +00:00
|
|
|
#include <vtkm/cont/DataSet.h>
|
2016-05-25 21:32:10 +00:00
|
|
|
#include <vtkm/rendering/AxisAnnotation2D.h>
|
2016-06-02 19:04:01 +00:00
|
|
|
#include <vtkm/rendering/Camera.h>
|
2016-06-02 22:02:17 +00:00
|
|
|
#include <vtkm/rendering/Canvas.h>
|
2016-05-18 19:29:50 +00:00
|
|
|
#include <vtkm/rendering/ColorTable.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace vtkm {
|
|
|
|
namespace rendering {
|
|
|
|
|
|
|
|
class ColorBarAnnotation
|
|
|
|
{
|
|
|
|
protected:
|
2016-08-27 02:32:15 +00:00
|
|
|
vtkm::rendering::ColorTable ColorTable;
|
|
|
|
vtkm::rendering::AxisAnnotation2D Axis;
|
|
|
|
|
2016-05-18 19:29:50 +00:00
|
|
|
public:
|
2016-09-08 23:08:17 +00:00
|
|
|
VTKM_RENDERING_EXPORT
|
|
|
|
ColorBarAnnotation();
|
|
|
|
|
|
|
|
VTKM_RENDERING_EXPORT
|
|
|
|
virtual ~ColorBarAnnotation();
|
2016-08-27 02:32:15 +00:00
|
|
|
|
|
|
|
VTKM_CONT_EXPORT
|
|
|
|
void SetColorTable(const vtkm::rendering::ColorTable &colorTable)
|
2016-05-18 19:29:50 +00:00
|
|
|
{
|
2016-08-27 02:32:15 +00:00
|
|
|
this->ColorTable = colorTable;
|
2016-05-18 19:29:50 +00:00
|
|
|
}
|
|
|
|
|
2016-08-27 02:32:15 +00:00
|
|
|
VTKM_RENDERING_EXPORT
|
|
|
|
void SetRange(const vtkm::Range &range, vtkm::IdComponent numTicks);
|
|
|
|
|
|
|
|
VTKM_CONT_EXPORT
|
|
|
|
void SetRange(vtkm::Float64 l, vtkm::Float64 h, vtkm::IdComponent numTicks)
|
2016-05-26 23:04:35 +00:00
|
|
|
{
|
2016-08-27 02:32:15 +00:00
|
|
|
this->SetRange(vtkm::Range(l,h), numTicks);
|
2016-05-26 23:04:35 +00:00
|
|
|
}
|
2016-05-18 19:29:50 +00:00
|
|
|
|
2016-08-27 02:32:15 +00:00
|
|
|
VTKM_RENDERING_EXPORT
|
2016-06-06 14:29:17 +00:00
|
|
|
virtual void Render(const vtkm::rendering::Camera &camera,
|
|
|
|
const vtkm::rendering::WorldAnnotator &worldAnnotator,
|
2016-08-27 02:32:15 +00:00
|
|
|
vtkm::rendering::Canvas &canvas);
|
2016-05-18 19:29:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}} //namespace vtkm::rendering
|
|
|
|
|
|
|
|
#endif // vtk_m_rendering_ColorBarAnnotation_h
|