vtk-m/vtkm/rendering/raytracing/CylinderIntersector.h

68 lines
2.2 KiB
C
Raw Permalink Normal View History

2018-09-11 03:00:04 +00:00
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
2019-04-15 23:24:21 +00:00
//
2018-09-11 03:00:04 +00:00
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#ifndef vtk_m_rendering_raytracing_Cylinder_Intersector_h
#define vtk_m_rendering_raytracing_Cylinder_Intersector_h
#include <vtkm/cont/Algorithm.h>
#include <vtkm/rendering/raytracing/ShapeIntersector.h>
namespace vtkm
{
namespace rendering
{
namespace raytracing
{
namespace detail
{
}
class CylinderIntersector : public ShapeIntersector
{
protected:
vtkm::cont::ArrayHandle<vtkm::Id3> CylIds;
vtkm::cont::ArrayHandle<vtkm::Float32> Radii;
public:
CylinderIntersector();
virtual ~CylinderIntersector() override;
void SetData(const vtkm::cont::CoordinateSystem& coords,
vtkm::cont::ArrayHandle<vtkm::Id3> cylIds,
2018-10-30 14:46:42 +00:00
vtkm::cont::ArrayHandle<vtkm::Float32> radii);
2018-09-11 03:00:04 +00:00
void IntersectRays(Ray<vtkm::Float32>& rays, bool returnCellIndex = false) override;
void IntersectRays(Ray<vtkm::Float64>& rays, bool returnCellIndex = false) override;
2018-10-30 14:46:42 +00:00
template <typename Precision>
void IntersectRaysImp(Ray<Precision>& rays, bool returnCellIndex);
2018-09-11 03:00:04 +00:00
template <typename Precision>
void IntersectionDataImp(Ray<Precision>& rays,
2019-02-22 16:22:29 +00:00
const vtkm::cont::Field scalarField,
2018-09-11 03:00:04 +00:00
const vtkm::Range& scalarRange);
void IntersectionData(Ray<vtkm::Float32>& rays,
2019-02-22 16:22:29 +00:00
const vtkm::cont::Field scalarField,
2020-04-23 17:31:39 +00:00
const vtkm::Range& scalarRange = vtkm::Range()) override;
2018-09-11 03:00:04 +00:00
void IntersectionData(Ray<vtkm::Float64>& rays,
2019-02-22 16:22:29 +00:00
const vtkm::cont::Field scalarField,
2020-04-23 17:31:39 +00:00
const vtkm::Range& scalarRange = vtkm::Range()) override;
2018-09-11 03:00:04 +00:00
vtkm::Id GetNumberOfShapes() const override;
}; // class ShapeIntersector
}
}
} //namespace vtkm::rendering::raytracing
#endif //vtk_m_rendering_raytracing_Shape_Intersector_h