iMSTK
Interactive Medical Simulation Toolkit
|
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... | |
Class for searching neighbors using regular grid.
Definition at line 18 of file imstkGridBasedNeighborSearch.h.
|
inline |
Construct class with search radius.
radius | The search radius |
Definition at line 27 of file imstkGridBasedNeighborSearch.h.
std::vector< std::vector< size_t > > imstk::GridBasedNeighborSearch::getNeighbors | ( | const VecDataArray< double, 3 > & | points | ) |
Search neighbors for each points within the search radius.
points | The given points to search for neighbors |
Definition at line 20 of file imstkGridBasedNeighborSearch.cpp.
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.
result | The list of lists of neighbor indices for each point |
points | The given points to search for neighbors |
Definition at line 28 of file imstkGridBasedNeighborSearch.cpp.
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.
result | The list of lists of neighbors for each point |
setA | The point set for which performing neighbor search |
setB | The point set where neighbor indices will be collected |
Definition at line 34 of file imstkGridBasedNeighborSearch.cpp.
void imstk::GridBasedNeighborSearch::setSearchRadius | ( | const double | radius | ) |
Set the search radius.
radius | The search radius |
Definition at line 13 of file imstkGridBasedNeighborSearch.cpp.