VTK-m  2.2
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
vtkm::exec::PointLocatorSparseGrid Class Reference

#include <PointLocatorSparseGrid.h>

Public Types

using CoordPortalType = typename vtkm::cont::CoordinateSystem::MultiplexerArrayType::ReadPortalType
 
using IdPortalType = typename vtkm::cont::ArrayHandle< vtkm::Id >::ReadPortalType
 

Public Member Functions

 PointLocatorSparseGrid (const vtkm::Vec3f &min, const vtkm::Vec3f &max, const vtkm::Id3 &dims, const CoordPortalType &coords, const IdPortalType &pointIds, const IdPortalType &cellLower, const IdPortalType &cellUpper)
 
void FindNearestNeighbor (const vtkm::Vec3f &queryPoint, vtkm::Id &nearestNeighborId, vtkm::FloatDefault &distance2) const
 Nearest neighbor search using a Uniform Grid. More...
 

Private Member Functions

void FindInCell (const vtkm::Vec3f &queryPoint, const vtkm::Id3 &ijk, vtkm::Id &nearestNeighborId, vtkm::FloatDefault &nearestDistance2) const
 
void FindInBox (const vtkm::Vec3f &queryPoint, const vtkm::Id3 &boxCenter, vtkm::Id level, vtkm::Id &nearestNeighborId, vtkm::FloatDefault &nearestDistance2) const
 
void FindInPlane (const vtkm::Vec3f &queryPoint, const vtkm::Id3 &planeCenter, const vtkm::Id3 &div, const vtkm::Id3 &mod, const vtkm::Id3 &origin, vtkm::Id numInPlane, vtkm::Id &nearestNeighborId, vtkm::FloatDefault &nearestDistance2) const
 
void FindInXPlane (const vtkm::Vec3f &queryPoint, const vtkm::Id3 &planeCenter, vtkm::Id level, vtkm::Id &nearestNeighborId, vtkm::FloatDefault &nearestDistance2) const
 
void FindInYPlane (const vtkm::Vec3f &queryPoint, vtkm::Id3 planeCenter, vtkm::Id level, vtkm::Id &nearestNeighborId, vtkm::FloatDefault &nearestDistance2) const
 
void FindInZPlane (const vtkm::Vec3f &queryPoint, vtkm::Id3 planeCenter, vtkm::Id level, vtkm::Id &nearestNeighborId, vtkm::FloatDefault &nearestDistance2) const
 

Private Attributes

vtkm::Vec3f Min
 
vtkm::Id3 Dims
 
vtkm::Vec3f Dxdydz
 
CoordPortalType Coords
 
IdPortalType PointIds
 
IdPortalType CellLower
 
IdPortalType CellUpper
 

Member Typedef Documentation

◆ CoordPortalType

using vtkm::exec::PointLocatorSparseGrid::CoordPortalType = typename vtkm::cont::CoordinateSystem::MultiplexerArrayType::ReadPortalType

◆ IdPortalType

Constructor & Destructor Documentation

◆ PointLocatorSparseGrid()

vtkm::exec::PointLocatorSparseGrid::PointLocatorSparseGrid ( const vtkm::Vec3f min,
const vtkm::Vec3f max,
const vtkm::Id3 dims,
const CoordPortalType coords,
const IdPortalType pointIds,
const IdPortalType cellLower,
const IdPortalType cellUpper 
)
inline

Member Function Documentation

◆ FindInBox()

void vtkm::exec::PointLocatorSparseGrid::FindInBox ( const vtkm::Vec3f queryPoint,
const vtkm::Id3 boxCenter,
vtkm::Id  level,
vtkm::Id nearestNeighborId,
vtkm::FloatDefault nearestDistance2 
) const
inlineprivate

◆ FindInCell()

void vtkm::exec::PointLocatorSparseGrid::FindInCell ( const vtkm::Vec3f queryPoint,
const vtkm::Id3 ijk,
vtkm::Id nearestNeighborId,
vtkm::FloatDefault nearestDistance2 
) const
inlineprivate

◆ FindInPlane()

void vtkm::exec::PointLocatorSparseGrid::FindInPlane ( const vtkm::Vec3f queryPoint,
const vtkm::Id3 planeCenter,
const vtkm::Id3 div,
const vtkm::Id3 mod,
const vtkm::Id3 origin,
vtkm::Id  numInPlane,
vtkm::Id nearestNeighborId,
vtkm::FloatDefault nearestDistance2 
) const
inlineprivate

◆ FindInXPlane()

void vtkm::exec::PointLocatorSparseGrid::FindInXPlane ( const vtkm::Vec3f queryPoint,
const vtkm::Id3 planeCenter,
vtkm::Id  level,
vtkm::Id nearestNeighborId,
vtkm::FloatDefault nearestDistance2 
) const
inlineprivate

◆ FindInYPlane()

void vtkm::exec::PointLocatorSparseGrid::FindInYPlane ( const vtkm::Vec3f queryPoint,
vtkm::Id3  planeCenter,
vtkm::Id  level,
vtkm::Id nearestNeighborId,
vtkm::FloatDefault nearestDistance2 
) const
inlineprivate

◆ FindInZPlane()

void vtkm::exec::PointLocatorSparseGrid::FindInZPlane ( const vtkm::Vec3f queryPoint,
vtkm::Id3  planeCenter,
vtkm::Id  level,
vtkm::Id nearestNeighborId,
vtkm::FloatDefault nearestDistance2 
) const
inlineprivate

◆ FindNearestNeighbor()

void vtkm::exec::PointLocatorSparseGrid::FindNearestNeighbor ( const vtkm::Vec3f queryPoint,
vtkm::Id nearestNeighborId,
vtkm::FloatDefault distance2 
) const
inline

Nearest neighbor search using a Uniform Grid.

Parallel search of nearesat neighbor for each point in the queryPoints in the set of coords. Returns neareast neighbot in nearestNeighborIds and distances to nearest neighbor in distances.

Parameters
queryPointPoint coordinates to query for nearest neighbor.
nearestNeighborIdNeareast neighbor in the training dataset for each points in the test set
distance2Squared distance between query points and their nearest neighbors.

Member Data Documentation

◆ CellLower

IdPortalType vtkm::exec::PointLocatorSparseGrid::CellLower
private

◆ CellUpper

IdPortalType vtkm::exec::PointLocatorSparseGrid::CellUpper
private

◆ Coords

CoordPortalType vtkm::exec::PointLocatorSparseGrid::Coords
private

◆ Dims

vtkm::Id3 vtkm::exec::PointLocatorSparseGrid::Dims
private

◆ Dxdydz

vtkm::Vec3f vtkm::exec::PointLocatorSparseGrid::Dxdydz
private

◆ Min

vtkm::Vec3f vtkm::exec::PointLocatorSparseGrid::Min
private

◆ PointIds

IdPortalType vtkm::exec::PointLocatorSparseGrid::PointIds
private

The documentation for this class was generated from the following file: