1 //============================================================================ 2 // Copyright (c) Kitware, Inc. 3 // All rights reserved. 4 // See LICENSE.txt for details. 5 // This software is distributed WITHOUT ANY WARRANTY; without even 6 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 7 // PURPOSE. See the above copyright notice for more information. 8 // 9 // Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS). 10 // Copyright 2015 UT-Battelle, LLC. 11 // Copyright 2015 Los Alamos National Security. 12 // 13 // Under the terms of Contract DE-NA0003525 with NTESS, 14 // the U.S. Government retains certain rights in this software. 15 // 16 // Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National 17 // Laboratory (LANL), the U.S. Government retains certain rights in 18 // this software. 19 //============================================================================ 20 #ifndef vtk_m_rendering_MapperRayTracer_h 21 #define vtk_m_rendering_MapperRayTracer_h 22 23 #include <vtkm/cont/ColorTable.h> 24 #include <vtkm/rendering/Camera.h> 25 #include <vtkm/rendering/Mapper.h> 26 27 #include <memory> 28 29 namespace vtkm 30 { 31 namespace rendering 32 { 33 34 class VTKM_RENDERING_EXPORT MapperRayTracer : public Mapper 35 { 36 public: 37 MapperRayTracer(); 38 39 ~MapperRayTracer(); 40 41 void SetCanvas(vtkm::rendering::Canvas* canvas) override; 42 virtual vtkm::rendering::Canvas* GetCanvas() const override; 43 44 void RenderCells(const vtkm::cont::DynamicCellSet& cellset, 45 const vtkm::cont::CoordinateSystem& coords, 46 const vtkm::cont::Field& scalarField, 47 const vtkm::cont::ColorTable& colorTable, 48 const vtkm::rendering::Camera& camera, 49 const vtkm::Range& scalarRange) override; 50 51 virtual void StartScene() override; 52 virtual void EndScene() override; 53 void SetCompositeBackground(bool on); 54 vtkm::rendering::Mapper* NewCopy() const override; 55 void SetShadingOn(bool on); 56 57 private: 58 struct InternalsType; 59 std::shared_ptr<InternalsType> Internals; 60 61 struct RenderFunctor; 62 }; 63 } 64 } //namespace vtkm::rendering 65 66 #endif //vtk_m_rendering_MapperRayTracer_h 67