2016-01-20 22:40:54 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2016-01-20 22:40:54 +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.
|
|
|
|
//============================================================================
|
2016-06-02 19:41:14 +00:00
|
|
|
#ifndef vtk_m_rendering_Mapper_h
|
|
|
|
#define vtk_m_rendering_Mapper_h
|
2016-01-20 22:40:54 +00:00
|
|
|
|
2020-06-14 15:27:45 +00:00
|
|
|
#include <vtkm/Deprecated.h>
|
2018-01-18 18:55:15 +00:00
|
|
|
#include <vtkm/cont/ColorTable.h>
|
2017-02-09 19:02:03 +00:00
|
|
|
#include <vtkm/cont/CoordinateSystem.h>
|
|
|
|
#include <vtkm/cont/Field.h>
|
2022-01-04 22:38:18 +00:00
|
|
|
#include <vtkm/cont/UnknownCellSet.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>
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace rendering
|
|
|
|
{
|
2016-01-20 22:40:54 +00:00
|
|
|
|
2016-10-19 18:09:15 +00:00
|
|
|
class VTKM_RENDERING_EXPORT Mapper
|
2016-01-20 22:40:54 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-10-19 22:42:58 +00:00
|
|
|
VTKM_CONT
|
2017-05-18 14:29:41 +00:00
|
|
|
Mapper() {}
|
2016-01-20 22:40:54 +00:00
|
|
|
|
2016-08-29 21:50:47 +00:00
|
|
|
virtual ~Mapper();
|
|
|
|
|
2022-01-04 22:38:18 +00:00
|
|
|
virtual void RenderCells(const vtkm::cont::UnknownCellSet& cellset,
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::cont::CoordinateSystem& coords,
|
|
|
|
const vtkm::cont::Field& scalarField,
|
2018-01-18 18:55:15 +00:00
|
|
|
const vtkm::cont::ColorTable& colorTable,
|
2017-05-18 14:29:41 +00:00
|
|
|
const vtkm::rendering::Camera& camera,
|
|
|
|
const vtkm::Range& scalarRange) = 0;
|
2016-01-20 22:40:54 +00:00
|
|
|
|
2018-01-18 18:55:15 +00:00
|
|
|
virtual void SetActiveColorTable(const vtkm::cont::ColorTable& ct);
|
2016-08-29 21:50:47 +00:00
|
|
|
|
2020-06-14 15:27:45 +00:00
|
|
|
VTKM_DEPRECATED(1.6, "StartScene() does nothing")
|
2020-06-17 23:58:07 +00:00
|
|
|
void StartScene() {}
|
2020-06-14 15:27:45 +00:00
|
|
|
|
|
|
|
VTKM_DEPRECATED(1.6, "EndScene() does nothing")
|
2020-06-17 23:58:07 +00:00
|
|
|
void EndScene() {}
|
2020-06-14 15:27:45 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
virtual void SetCanvas(vtkm::rendering::Canvas* canvas) = 0;
|
2016-11-28 14:41:01 +00:00
|
|
|
virtual vtkm::rendering::Canvas* GetCanvas() const = 0;
|
2016-01-20 22:40:54 +00:00
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
virtual vtkm::rendering::Mapper* NewCopy() const = 0;
|
2016-09-01 18:33:28 +00:00
|
|
|
|
2017-08-07 14:45:03 +00:00
|
|
|
virtual void SetLogarithmX(bool l);
|
|
|
|
virtual void SetLogarithmY(bool l);
|
|
|
|
|
2016-01-20 22:40:54 +00:00
|
|
|
protected:
|
2019-07-31 16:20:38 +00:00
|
|
|
vtkm::cont::ArrayHandle<vtkm::Vec4f_32> ColorMap;
|
2017-08-07 14:45:03 +00:00
|
|
|
bool LogarithmX = false;
|
|
|
|
bool LogarithmY = false;
|
2016-01-20 22:40:54 +00:00
|
|
|
};
|
2017-05-18 14:29:41 +00:00
|
|
|
}
|
|
|
|
} //namespace vtkm::rendering
|
2016-06-02 19:41:14 +00:00
|
|
|
#endif //vtk_m_rendering_Mapper_h
|