Viskores  1.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
viskores::exec::PointLocatorSparseGrid Class Reference

Structure for locating point. More...

#include <PointLocatorSparseGrid.h>

Public Types

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Detailed Description

Structure for locating point.

Use the FindNearestNeighbor() method to identify which cell contains a point in space.

This class is provided by viskores::cont::PointLocatorSparseGrid when passed to a worklet.

Member Typedef Documentation

◆ CoordPortalType

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

◆ IdPortalType

Constructor & Destructor Documentation

◆ PointLocatorSparseGrid()

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

Member Function Documentation

◆ FindInBox()

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

◆ FindInCell()

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

◆ FindInPlane()

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

◆ FindInXPlane()

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

◆ FindInYPlane()

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

◆ FindInZPlane()

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

◆ FindNearestNeighbor()

void viskores::exec::PointLocatorSparseGrid::FindNearestNeighbor ( const viskores::Vec3f queryPoint,
viskores::Id nearestNeighborId,
viskores::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 viskores::exec::PointLocatorSparseGrid::CellLower
private

◆ CellUpper

IdPortalType viskores::exec::PointLocatorSparseGrid::CellUpper
private

◆ Coords

CoordPortalType viskores::exec::PointLocatorSparseGrid::Coords
private

◆ Dims

viskores::Id3 viskores::exec::PointLocatorSparseGrid::Dims
private

◆ Dxdydz

viskores::Vec3f viskores::exec::PointLocatorSparseGrid::Dxdydz
private

◆ Min

viskores::Vec3f viskores::exec::PointLocatorSparseGrid::Min
private

◆ PointIds

IdPortalType viskores::exec::PointLocatorSparseGrid::PointIds
private

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