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.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Copyright 2016 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
|
2016-05-18 19:29:50 +00:00
|
|
|
// Copyright 2016 UT-Battelle, LLC.
|
|
|
|
// Copyright 2016 Los Alamos National Security.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
2016-05-18 19:29:50 +00:00
|
|
|
// 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>
|
|
|
|
|
2018-01-18 18:55:15 +00:00
|
|
|
#include <vtkm/cont/ColorTable.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
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace rendering
|
|
|
|
{
|
2016-05-18 19:29:50 +00:00
|
|
|
|
2016-10-19 18:09:15 +00:00
|
|
|
class VTKM_RENDERING_EXPORT ColorBarAnnotation
|
2016-05-18 19:29:50 +00:00
|
|
|
{
|
|
|
|
protected:
|
2018-01-18 18:55:15 +00:00
|
|
|
vtkm::cont::ColorTable ColorTable;
|
2016-08-27 02:32:15 +00:00
|
|
|
vtkm::rendering::AxisAnnotation2D Axis;
|
2018-01-18 21:21:39 +00:00
|
|
|
vtkm::Bounds Position;
|
|
|
|
bool Horizontal;
|
|
|
|
std::string FieldName;
|
2016-08-27 02:32:15 +00:00
|
|
|
|
2016-05-18 19:29:50 +00:00
|
|
|
public:
|
2016-09-08 23:08:17 +00:00
|
|
|
ColorBarAnnotation();
|
|
|
|
|
|
|
|
virtual ~ColorBarAnnotation();
|
2016-08-27 02:32:15 +00:00
|
|
|
|
2016-10-19 22:42:58 +00:00
|
|
|
VTKM_CONT
|
2018-01-18 18:55:15 +00:00
|
|
|
void SetColorTable(const vtkm::cont::ColorTable& colorTable) { this->ColorTable = colorTable; }
|
2016-05-18 19:29:50 +00:00
|
|
|
|
2018-01-18 21:21:39 +00:00
|
|
|
VTKM_CONT
|
2017-05-18 14:29:41 +00:00
|
|
|
void SetRange(const vtkm::Range& range, vtkm::IdComponent numTicks);
|
2016-08-27 02:32:15 +00:00
|
|
|
|
2018-01-18 21:21:39 +00:00
|
|
|
VTKM_CONT
|
|
|
|
void SetFieldName(const std::string& fieldName);
|
|
|
|
|
2016-10-19 22:42:58 +00:00
|
|
|
VTKM_CONT
|
2016-08-27 02:32:15 +00:00
|
|
|
void SetRange(vtkm::Float64 l, vtkm::Float64 h, vtkm::IdComponent numTicks)
|
2016-05-26 23:04:35 +00:00
|
|
|
{
|
2017-05-18 14:29:41 +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
|
|
|
|
2018-01-18 21:21:39 +00:00
|
|
|
|
|
|
|
VTKM_CONT
|
|
|
|
void SetPosition(const vtkm::Bounds& position);
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
virtual void Render(const vtkm::rendering::Camera& camera,
|
|
|
|
const vtkm::rendering::WorldAnnotator& worldAnnotator,
|
|
|
|
vtkm::rendering::Canvas& canvas);
|
2016-05-18 19:29:50 +00:00
|
|
|
};
|
2017-05-18 14:29:41 +00:00
|
|
|
}
|
|
|
|
} //namespace vtkm::rendering
|
2016-05-18 19:29:50 +00:00
|
|
|
|
|
|
|
#endif // vtk_m_rendering_ColorBarAnnotation_h
|