VTK-m  2.0
SphereIntersector.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_Sphere_Intersector_h
11 #define vtk_m_rendering_raytracing_Sphere_Intersector_h
12 
14 
15 namespace vtkm
16 {
17 namespace rendering
18 {
19 namespace raytracing
20 {
21 
23 {
24 protected:
27 
28 public:
30  virtual ~SphereIntersector() override;
31 
32  void SetData(const vtkm::cont::CoordinateSystem& coords,
35 
36  void IntersectRays(Ray<vtkm::Float32>& rays, bool returnCellIndex = false) override;
37 
38 
39  void IntersectRays(Ray<vtkm::Float64>& rays, bool returnCellIndex = false) override;
40 
41  template <typename Precision>
42  void IntersectRaysImp(Ray<Precision>& rays, bool returnCellIndex);
43 
44 
45  template <typename Precision>
47  const vtkm::cont::Field scalarField,
48  const vtkm::Range& scalarRange);
49 
51  const vtkm::cont::Field scalarField,
52  const vtkm::Range& scalarRange) override;
53 
55  const vtkm::cont::Field scalarField,
56  const vtkm::Range& scalarRange) override;
57 
58  vtkm::Id GetNumberOfShapes() const override;
59 }; // class ShapeIntersector
60 }
61 }
62 } //namespace vtkm::rendering::raytracing
63 #endif //vtk_m_rendering_raytracing_Shape_Intersector_h
vtkm::rendering::raytracing::SphereIntersector::IntersectRaysImp
void IntersectRaysImp(Ray< Precision > &rays, bool returnCellIndex)
vtkm::cont::ArrayHandle< vtkm::Id >
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::rendering::raytracing::SphereIntersector::GetNumberOfShapes
vtkm::Id GetNumberOfShapes() const override
vtkm::rendering::raytracing::SphereIntersector::Radii
vtkm::cont::ArrayHandle< vtkm::Float32 > Radii
Definition: SphereIntersector.h:26
vtkm::rendering::raytracing::SphereIntersector::IntersectRays
void IntersectRays(Ray< vtkm::Float32 > &rays, bool returnCellIndex=false) override
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::SphereIntersector::~SphereIntersector
virtual ~SphereIntersector() override
vtkm::rendering::raytracing::SphereIntersector::IntersectionDataImp
void IntersectionDataImp(Ray< Precision > &rays, const vtkm::cont::Field scalarField, const vtkm::Range &scalarRange)
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::SphereIntersector::PointIds
vtkm::cont::ArrayHandle< vtkm::Id > PointIds
Definition: SphereIntersector.h:25
ShapeIntersector.h
vtkm::rendering::raytracing::SphereIntersector::IntersectionData
void IntersectionData(Ray< vtkm::Float32 > &rays, const vtkm::cont::Field scalarField, const vtkm::Range &scalarRange) override
vtkm::rendering::raytracing::SphereIntersector::SetData
void SetData(const vtkm::cont::CoordinateSystem &coords, vtkm::cont::ArrayHandle< vtkm::Id > pointIds, vtkm::cont::ArrayHandle< vtkm::Float32 > radii)
vtkm::rendering::raytracing::ShapeIntersector
Definition: ShapeIntersector.h:24
vtkm::rendering::raytracing::SphereIntersector::SphereIntersector
SphereIntersector()
vtkm::rendering::raytracing::SphereIntersector
Definition: SphereIntersector.h:22
vtkm::Range
Represent a continuous scalar range of values.
Definition: Range.h:31