iMSTK
Interactive Medical Simulation Toolkit
Classes | Public Member Functions | List of all members
imstk::GridBasedNeighborSearch Class Reference

Class for searching neighbors using regular grid. More...

#include <imstkGridBasedNeighborSearch.h>

Public Member Functions

 GridBasedNeighborSearch (const double radius)
 Construct class with search radius. More...
 
void setSearchRadius (const double radius)
 Set the search radius. More...
 
double getSearchRadius () const
 Get the search radius.
 
std::vector< std::vector< size_t > > getNeighbors (const VecDataArray< double, 3 > &points)
 Search neighbors for each points within the search radius. More...
 
void getNeighbors (std::vector< std::vector< size_t >> &result, const VecDataArray< double, 3 > &points)
 Search neighbors for each point within the search radius. More...
 
void getNeighbors (std::vector< std::vector< size_t >> &result, const VecDataArray< double, 3 > &setA, const VecDataArray< double, 3 > &setB)
 Search neighbors from setB for each point in setA within the search radius. SetA and setB can be different. More...
 

Detailed Description

Class for searching neighbors using regular grid.

Definition at line 18 of file imstkGridBasedNeighborSearch.h.

Constructor & Destructor Documentation

◆ GridBasedNeighborSearch()

imstk::GridBasedNeighborSearch::GridBasedNeighborSearch ( const double  radius)
inline

Construct class with search radius.

Parameters
radiusThe search radius

Definition at line 27 of file imstkGridBasedNeighborSearch.h.

Here is the call graph for this function:

Member Function Documentation

◆ getNeighbors() [1/3]

std::vector< std::vector< size_t > > imstk::GridBasedNeighborSearch::getNeighbors ( const VecDataArray< double, 3 > &  points)

Search neighbors for each points within the search radius.

Parameters
pointsThe given points to search for neighbors
Returns
List of list of neighbor indices for each point

Definition at line 20 of file imstkGridBasedNeighborSearch.cpp.

Here is the caller graph for this function:

◆ getNeighbors() [2/3]

void imstk::GridBasedNeighborSearch::getNeighbors ( std::vector< std::vector< size_t >> &  result,
const VecDataArray< double, 3 > &  points 
)

Search neighbors for each point within the search radius.

Parameters
resultThe list of lists of neighbor indices for each point
pointsThe given points to search for neighbors

Definition at line 28 of file imstkGridBasedNeighborSearch.cpp.

Here is the call graph for this function:

◆ getNeighbors() [3/3]

void imstk::GridBasedNeighborSearch::getNeighbors ( std::vector< std::vector< size_t >> &  result,
const VecDataArray< double, 3 > &  setA,
const VecDataArray< double, 3 > &  setB 
)

Search neighbors from setB for each point in setA within the search radius. SetA and setB can be different.

Parameters
resultThe list of lists of neighbors for each point
setAThe point set for which performing neighbor search
setBThe point set where neighbor indices will be collected

Definition at line 34 of file imstkGridBasedNeighborSearch.cpp.

Here is the call graph for this function:

◆ setSearchRadius()

void imstk::GridBasedNeighborSearch::setSearchRadius ( const double  radius)

Set the search radius.

Parameters
radiusThe search radius

Definition at line 13 of file imstkGridBasedNeighborSearch.cpp.

Here is the caller graph for this function:

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