2016-09-01 18:33:28 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2016-09-01 18:33:28 +00:00
|
|
|
// 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.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtk_m_rendering_View2D_h
|
|
|
|
#define vtk_m_rendering_View2D_h
|
|
|
|
|
|
|
|
#include <vtkm/rendering/View.h>
|
|
|
|
|
|
|
|
#include <vtkm/rendering/AxisAnnotation2D.h>
|
|
|
|
#include <vtkm/rendering/ColorBarAnnotation.h>
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace rendering
|
|
|
|
{
|
2016-09-01 18:33:28 +00:00
|
|
|
|
2016-10-19 18:09:15 +00:00
|
|
|
class VTKM_RENDERING_EXPORT View2D : public vtkm::rendering::View
|
2016-09-01 18:33:28 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-05-26 17:53:28 +00:00
|
|
|
View2D(const vtkm::rendering::Scene& scene,
|
|
|
|
const vtkm::rendering::Mapper& mapper,
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::rendering::Canvas& canvas,
|
2017-12-05 04:46:38 +00:00
|
|
|
const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1),
|
|
|
|
const vtkm::rendering::Color& foregroundColor = vtkm::rendering::Color(1, 1, 1, 1));
|
2016-09-01 18:33:28 +00:00
|
|
|
|
2017-05-26 17:53:28 +00:00
|
|
|
View2D(const vtkm::rendering::Scene& scene,
|
|
|
|
const vtkm::rendering::Mapper& mapper,
|
|
|
|
const vtkm::rendering::Canvas& canvas,
|
|
|
|
const vtkm::rendering::Camera& camera,
|
2017-12-05 04:46:38 +00:00
|
|
|
const vtkm::rendering::Color& backgroundColor = vtkm::rendering::Color(0, 0, 0, 1),
|
|
|
|
const vtkm::rendering::Color& foregroundColor = vtkm::rendering::Color(1, 1, 1, 1));
|
2016-09-08 23:08:17 +00:00
|
|
|
|
|
|
|
~View2D();
|
2016-09-01 18:33:28 +00:00
|
|
|
|
2017-11-02 12:36:05 +00:00
|
|
|
void Paint() override;
|
2016-09-01 18:33:28 +00:00
|
|
|
|
2017-11-02 12:36:05 +00:00
|
|
|
void RenderScreenAnnotations() override;
|
2016-09-01 18:33:28 +00:00
|
|
|
|
2017-11-02 12:36:05 +00:00
|
|
|
void RenderWorldAnnotations() override;
|
2016-09-01 18:33:28 +00:00
|
|
|
|
|
|
|
private:
|
2017-08-10 13:26:16 +00:00
|
|
|
void UpdateCameraProperties();
|
|
|
|
|
2016-09-01 18:33:28 +00:00
|
|
|
// 2D-specific annotations
|
|
|
|
vtkm::rendering::AxisAnnotation2D HorizontalAxisAnnotation;
|
|
|
|
vtkm::rendering::AxisAnnotation2D VerticalAxisAnnotation;
|
|
|
|
vtkm::rendering::ColorBarAnnotation ColorBarAnnotation;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
} // namespace vtkm::rendering
|
|
|
|
|
|
|
|
#endif //vtk_m_rendering_View2D_h
|