#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/spatial/al_HashSpace.hpp>
|
typedef std::vector< Result > | Results |
|
typedef Results::iterator | Iterator |
|
|
uint32_t | mMaxResults |
|
Results | mObjects |
|
Query functor
create and re-use a query functor to find neighbors
query.clear();
query(space,
Vec3d(0, 0, 0), 10);
for (int i=0; i<query.size(); i++) {
Object * o = query[i];
...
}
Vec< 3, double > Vec3d
double 3-vector
Query(uint32_t maxResults=128)
Definition at line 121 of file al_HashSpace.hpp.
◆ Query()
al::HashSpace::Query::Query |
( |
uint32_t |
maxResults = 128 | ) |
|
|
inline |
Constructor
- Parameters
-
maxResults | the maximum number of results to find |
Definition at line 142 of file al_HashSpace.hpp.
◆ clear()
Query& al::HashSpace::Query::clear |
( |
| ) |
|
|
inline |
clear is separated from the main query operation, to support aggregating queries in series typically however you would want to clear() and then call the query.
Definition at line 194 of file al_HashSpace.hpp.
◆ nearest()
◆ operator()() [1/2]
int al::HashSpace::Query::operator() |
( |
const HashSpace & |
space, |
|
|
const Vec3d |
center, |
|
|
double |
maxRadius, |
|
|
double |
minRadius = 0. |
|
) |
| |
|
inline |
The main method of the query object finds the neighbors of a given point, within given distances the matches will be roughly (not exactly) sorted by distance
- Parameters
-
space | the HashSpace object to search in |
center | finds objects near to this point |
obj | finds objects near to this object |
maxRadius | finds objects if they are nearer this distance the maximum permissible value of radius is space.maxRadius() |
minRadius | finds objects if they are beyond this distance |
- Returns
- the number of results found
Definition at line 374 of file al_HashSpace.hpp.
◆ operator()() [2/2]
int al::HashSpace::Query::operator() |
( |
const HashSpace & |
space, |
|
|
Vec3d |
center |
|
) |
| |
|
inline |
finds all the neighbors of the given point, up to maxResults() the matches will be roughly (not exactly) sorted by distance
- Parameters
-
space | the HashSpace object to search in |
center | finds objects near to this point |
obj | finds objects near to this object |
Definition at line 362 of file al_HashSpace.hpp.
The documentation for this struct was generated from the following file: