2018-06-25 00:16:46 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2018-06-25 00:16:46 +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_exec_CellLocator_h
|
|
|
|
#define vtk_m_exec_CellLocator_h
|
|
|
|
|
|
|
|
#include <vtkm/Types.h>
|
|
|
|
#include <vtkm/VirtualObjectBase.h>
|
|
|
|
#include <vtkm/exec/FunctorBase.h>
|
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace exec
|
|
|
|
{
|
|
|
|
|
2019-06-17 12:44:33 +00:00
|
|
|
class VTKM_ALWAYS_EXPORT CellLocator : public vtkm::VirtualObjectBase
|
2018-06-25 00:16:46 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-04-26 14:10:21 +00:00
|
|
|
VTKM_EXEC_CONT virtual ~CellLocator() noexcept
|
|
|
|
{
|
|
|
|
// This must not be defaulted, since defaulted virtual destructors are
|
|
|
|
// troublesome with CUDA __host__ __device__ markup.
|
|
|
|
}
|
|
|
|
|
2018-06-25 00:16:46 +00:00
|
|
|
VTKM_EXEC
|
2019-07-31 16:20:38 +00:00
|
|
|
virtual void FindCell(const vtkm::Vec3f& point,
|
2018-06-25 00:16:46 +00:00
|
|
|
vtkm::Id& cellId,
|
2019-07-31 16:20:38 +00:00
|
|
|
vtkm::Vec3f& parametric,
|
2020-03-11 23:56:05 +00:00
|
|
|
const vtkm::exec::FunctorBase* worklet) const = 0;
|
|
|
|
|
|
|
|
VTKM_EXEC
|
|
|
|
void FindCell(const vtkm::Vec3f& point,
|
|
|
|
vtkm::Id& cellId,
|
|
|
|
vtkm::Vec3f& parametric,
|
|
|
|
const vtkm::exec::FunctorBase& worklet) const
|
|
|
|
{
|
|
|
|
this->FindCell(point, cellId, parametric, &worklet);
|
|
|
|
}
|
|
|
|
|
|
|
|
VTKM_EXEC
|
|
|
|
void FindCell(const vtkm::Vec3f& point, vtkm::Id& cellId, vtkm::Vec3f& parametric) const
|
|
|
|
{
|
|
|
|
this->FindCell(point, cellId, parametric, nullptr);
|
|
|
|
}
|
2018-06-25 00:16:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace exec
|
|
|
|
} // namespace vtkm
|
|
|
|
|
|
|
|
#endif // vtk_m_exec_CellLocator_h
|