1 //============================================================================ 2 // Copyright (c) Kitware, Inc. 3 // All rights reserved. 4 // See LICENSE.txt for details. 5 // 6 // This software is distributed WITHOUT ANY WARRANTY; without even 7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 8 // PURPOSE. See the above copyright notice for more information. 9 //============================================================================ 10 #ifndef vtk_m_rendering_Mapper_h 11 #define vtk_m_rendering_Mapper_h 12 13 #include <vtkm/Deprecated.h> 14 #include <vtkm/cont/ColorTable.h> 15 #include <vtkm/cont/CoordinateSystem.h> 16 #include <vtkm/cont/DynamicCellSet.h> 17 #include <vtkm/cont/Field.h> 18 #include <vtkm/rendering/Camera.h> 19 #include <vtkm/rendering/Canvas.h> 20 namespace vtkm 21 { 22 namespace rendering 23 { 24 25 class VTKM_RENDERING_EXPORT Mapper 26 { 27 public: 28 VTKM_CONT Mapper()29 Mapper() {} 30 31 virtual ~Mapper(); 32 33 virtual void RenderCells(const vtkm::cont::DynamicCellSet& cellset, 34 const vtkm::cont::CoordinateSystem& coords, 35 const vtkm::cont::Field& scalarField, 36 const vtkm::cont::ColorTable& colorTable, 37 const vtkm::rendering::Camera& camera, 38 const vtkm::Range& scalarRange) = 0; 39 40 virtual void SetActiveColorTable(const vtkm::cont::ColorTable& ct); 41 42 VTKM_DEPRECATED(1.6, "StartScene() does nothing") StartScene()43 void StartScene() {} 44 45 VTKM_DEPRECATED(1.6, "EndScene() does nothing") EndScene()46 void EndScene() {} 47 48 virtual void SetCanvas(vtkm::rendering::Canvas* canvas) = 0; 49 virtual vtkm::rendering::Canvas* GetCanvas() const = 0; 50 51 virtual vtkm::rendering::Mapper* NewCopy() const = 0; 52 53 virtual void SetLogarithmX(bool l); 54 virtual void SetLogarithmY(bool l); 55 56 protected: 57 vtkm::cont::ArrayHandle<vtkm::Vec4f_32> ColorMap; 58 bool LogarithmX = false; 59 bool LogarithmY = false; 60 }; 61 } 62 } //namespace vtkm::rendering 63 #endif //vtk_m_rendering_Mapper_h 64