2018-08-30 02:46:49 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2018-08-30 02:46:49 +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.
|
|
|
|
//============================================================================
|
2019-03-28 12:27:37 +00:00
|
|
|
#ifndef vtkm_cont_CellLocatorUniformGrid_h
|
|
|
|
#define vtkm_cont_CellLocatorUniformGrid_h
|
2018-08-30 02:25:01 +00:00
|
|
|
|
|
|
|
#include <vtkm/cont/CellLocator.h>
|
2019-03-28 12:27:37 +00:00
|
|
|
#include <vtkm/cont/VirtualObjectHandle.h>
|
2018-08-30 02:25:01 +00:00
|
|
|
|
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace cont
|
|
|
|
{
|
|
|
|
|
2019-03-20 23:38:50 +00:00
|
|
|
class VTKM_CONT_EXPORT CellLocatorUniformGrid : public vtkm::cont::CellLocator
|
2018-08-30 02:25:01 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-03-20 23:38:50 +00:00
|
|
|
VTKM_CONT CellLocatorUniformGrid();
|
2018-08-30 02:25:01 +00:00
|
|
|
|
2019-03-20 23:38:50 +00:00
|
|
|
VTKM_CONT ~CellLocatorUniformGrid() override;
|
2018-08-30 02:25:01 +00:00
|
|
|
|
2019-03-28 12:27:37 +00:00
|
|
|
VTKM_CONT const vtkm::exec::CellLocator* PrepareForExecution(
|
2020-01-21 20:18:03 +00:00
|
|
|
vtkm::cont::DeviceAdapterId device,
|
|
|
|
vtkm::cont::Token& token) const override;
|
2018-08-30 02:25:01 +00:00
|
|
|
|
2019-03-28 12:27:37 +00:00
|
|
|
protected:
|
|
|
|
VTKM_CONT void Build() override;
|
2018-08-30 02:25:01 +00:00
|
|
|
|
|
|
|
private:
|
2019-07-31 16:20:38 +00:00
|
|
|
vtkm::Id3 CellDims;
|
2019-08-07 16:30:01 +00:00
|
|
|
vtkm::Id3 PointDims;
|
2019-08-08 16:15:28 +00:00
|
|
|
vtkm::Vec3f Origin;
|
|
|
|
vtkm::Vec3f InvSpacing;
|
|
|
|
vtkm::Vec3f MaxPoint;
|
2019-08-06 16:52:10 +00:00
|
|
|
bool Is3D = true;
|
2019-03-28 12:27:37 +00:00
|
|
|
|
|
|
|
mutable vtkm::cont::VirtualObjectHandle<vtkm::exec::CellLocator> ExecutionObjectHandle;
|
2018-08-30 02:25:01 +00:00
|
|
|
};
|
|
|
|
}
|
2019-03-28 12:27:37 +00:00
|
|
|
} // vtkm::cont
|
2018-08-30 02:25:01 +00:00
|
|
|
|
2019-03-28 12:27:37 +00:00
|
|
|
#endif //vtkm_cont_CellLocatorUniformGrid_h
|