VTK-m  2.0
raytracing/ScalarRenderer.h
Go to the documentation of this file.
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_raytracing_ScalarRenderer_h
11 #define vtk_m_rendering_raytracing_ScalarRenderer_h
12 
13 #include <memory>
14 #include <vector>
15 
16 #include <vtkm/cont/DataSet.h>
17 
20 namespace vtkm
21 {
22 namespace rendering
23 {
24 namespace raytracing
25 {
26 
27 class VTKM_RENDERING_EXPORT ScalarRenderer
28 {
29 protected:
30  std::shared_ptr<ShapeIntersector> Intersector;
31  std::vector<vtkm::cont::Field> Fields;
33 
34  template <typename Precision>
35  void RenderOnDevice(Ray<Precision>& rays,
36  Precision missScalar,
38 
39  template <typename Precision>
40  void AddBuffer(Ray<Precision>& rays, Precision missScalar, const std::string name);
41 
42  template <typename Precision>
43  void AddDepthBuffer(Ray<Precision>& rays);
44 
45 public:
46  VTKM_CONT
48  VTKM_CONT
49  ~ScalarRenderer();
50 
51  VTKM_CONT
52  void SetShapeIntersector(std::shared_ptr<ShapeIntersector> intersector);
53 
54  VTKM_CONT
55  void AddField(const vtkm::cont::Field& scalarField);
56 
57  VTKM_CONT
59  vtkm::Float32 missScalar,
61 
62  VTKM_CONT
64  vtkm::Float64 missScalar,
66 
67 }; //class RayTracer
68 }
69 }
70 } // namespace vtkm::rendering::raytracing
71 #endif //vtk_m_rendering_raytracing_RayTracer_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::raytracing::Camera
Definition: raytracing/Camera.h:25
vtkm::rendering::raytracing::Ray
Definition: Ray.h:37
vtkm::cont::Field
A Field encapsulates an array on some piece of the mesh, such as the points, a cell set,...
Definition: cont/Field.h:31
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::rendering::raytracing::ScalarRenderer
Definition: raytracing/ScalarRenderer.h:27
vtkm::rendering::raytracing::ScalarRenderer::Intersector
std::shared_ptr< ShapeIntersector > Intersector
Definition: raytracing/ScalarRenderer.h:30
Camera.h
vtkm::Float32
float Float32
Definition: Types.h:154
vtkm::Float64
double Float64
Definition: Types.h:155
vtkm::rendering::raytracing::ScalarRenderer::IntersectorValid
bool IntersectorValid
Definition: raytracing/ScalarRenderer.h:32
vtkm::rendering::raytracing::ScalarRenderer::Fields
std::vector< vtkm::cont::Field > Fields
Definition: raytracing/ScalarRenderer.h:31
TriangleIntersector.h
DataSet.h