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
|
|
|
|
|
2020-03-12 23:38:27 +00:00
|
|
|
#include <vtkm/Deprecated.h>
|
|
|
|
#include <vtkm/ErrorCode.h>
|
2018-06-25 00:16:46 +00:00
|
|
|
#include <vtkm/Types.h>
|
|
|
|
#include <vtkm/VirtualObjectBase.h>
|
|
|
|
#include <vtkm/exec/FunctorBase.h>
|
|
|
|
|
2020-09-22 15:32:01 +00:00
|
|
|
#ifdef VTKM_NO_DEPRECATED_VIRTUAL
|
|
|
|
#error "CellLocator with virtual methods is removed. Do not include CellLocator.h"
|
|
|
|
#endif
|
|
|
|
|
2021-04-23 20:07:11 +00:00
|
|
|
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
|
|
|
|
2018-06-25 00:16:46 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace exec
|
|
|
|
{
|
|
|
|
|
2020-09-22 15:32:01 +00:00
|
|
|
class VTKM_DEPRECATED(
|
|
|
|
1.6,
|
|
|
|
"CellLocator with virtual methods no longer supported. Use CellLocatorGeneral.")
|
|
|
|
VTKM_ALWAYS_EXPORT CellLocator : public vtkm::VirtualObjectBase
|
2018-06-25 00:16:46 +00:00
|
|
|
{
|
2020-10-07 19:43:21 +00:00
|
|
|
VTKM_DEPRECATED_SUPPRESS_BEGIN
|
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
|
2020-03-12 23:38:27 +00:00
|
|
|
virtual vtkm::ErrorCode FindCell(const vtkm::Vec3f& point,
|
|
|
|
vtkm::Id& cellId,
|
|
|
|
vtkm::Vec3f& parametric) const = 0;
|
2020-03-11 23:56:05 +00:00
|
|
|
|
2020-03-12 23:38:27 +00:00
|
|
|
VTKM_DEPRECATED(1.6, "FindCell no longer takes worklet argument.")
|
2020-09-23 14:02:37 +00:00
|
|
|
VTKM_EXEC
|
2020-03-11 23:56:05 +00:00
|
|
|
void FindCell(const vtkm::Vec3f& point,
|
|
|
|
vtkm::Id& cellId,
|
|
|
|
vtkm::Vec3f& parametric,
|
|
|
|
const vtkm::exec::FunctorBase& worklet) const
|
|
|
|
{
|
2020-03-12 23:38:27 +00:00
|
|
|
vtkm::ErrorCode status = this->FindCell(point, cellId, parametric);
|
|
|
|
if (status != vtkm::ErrorCode::Success)
|
|
|
|
{
|
|
|
|
worklet.RaiseError(vtkm::ErrorString(status));
|
|
|
|
}
|
2020-03-11 23:56:05 +00:00
|
|
|
}
|
2020-10-07 19:43:21 +00:00
|
|
|
VTKM_DEPRECATED_SUPPRESS_END
|
2018-06-25 00:16:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace exec
|
|
|
|
} // namespace vtkm
|
|
|
|
|
2021-04-23 20:07:11 +00:00
|
|
|
VTKM_DEPRECATED_SUPPRESS_END
|
|
|
|
|
2018-06-25 00:16:46 +00:00
|
|
|
#endif // vtk_m_exec_CellLocator_h
|