VTK-m  2.0
TriangleIntersector.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_TriagnleIntersector_h
11 #define vtk_m_rendering_raytracing_TriagnleIntersector_h
12 
13 #include <vtkm/cont/DataSet.h>
16 #include <vtkm/rendering/vtkm_rendering_export.h>
17 
18 namespace vtkm
19 {
20 namespace rendering
21 {
22 namespace raytracing
23 {
24 
25 class VTKM_RENDERING_EXPORT TriangleIntersector : public ShapeIntersector
26 {
27 protected:
30 
31 public:
33 
34  void SetUseWaterTight(bool useIt);
35 
36  void SetData(const vtkm::cont::CoordinateSystem& coords,
38 
40  vtkm::Id GetNumberOfShapes() const override;
41 
42 
43  VTKM_CONT void IntersectRays(Ray<vtkm::Float32>& rays, bool returnCellIndex = false) override;
44  VTKM_CONT void IntersectRays(Ray<vtkm::Float64>& rays, bool returnCellIndex = false) override;
45 
46 
47  VTKM_CONT void IntersectionData(Ray<vtkm::Float32>& rays,
48  const vtkm::cont::Field scalarField,
49  const vtkm::Range& scalarRange = vtkm::Range()) override;
50 
51  VTKM_CONT void IntersectionData(Ray<vtkm::Float64>& rays,
52  const vtkm::cont::Field scalarField,
53  const vtkm::Range& scalarRange = vtkm::Range()) override;
54 
55  template <typename Precision>
56  VTKM_CONT void IntersectRaysImp(Ray<Precision>& rays, bool returnCellIndex);
57 
58  template <typename Precision>
59  VTKM_CONT void IntersectionDataImp(Ray<Precision>& rays,
60  const vtkm::cont::Field scalarField,
61  const vtkm::Range& scalarRange);
62 
63 }; // class intersector
64 }
65 }
66 } //namespace vtkm::rendering::raytracing
67 #endif //vtk_m_rendering_raytracing_TriagnleIntersector_h
vtkm::cont::ArrayHandle< vtkm::Id4 >
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::raytracing::TriangleIntersector::Triangles
vtkm::cont::ArrayHandle< vtkm::Id4 > Triangles
Definition: TriangleIntersector.h:28
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::cont::CoordinateSystem
Definition: CoordinateSystem.h:25
vtkm::rendering::raytracing::Ray
Definition: Ray.h:37
vtkm::rendering::raytracing::TriangleIntersector::UseWaterTight
bool UseWaterTight
Definition: TriangleIntersector.h:29
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::rendering::raytracing::TriangleIntersector
Definition: TriangleIntersector.h:25
ShapeIntersector.h
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::rendering::raytracing::ShapeIntersector
Definition: ShapeIntersector.h:24
DataSet.h
Ray.h
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31