Autoware.Auto
|
|
The base class for the configuration object for the SpatialHash class. More...
#include <spatial_hash_config.hpp>
Public Member Functions | |
Config (const float32_t min_x, const float32_t max_x, const float32_t min_y, const float32_t max_y, const float32_t min_z, const float32_t max_z, const float32_t radius, const Index capacity) | |
Constructor for spatial hash. More... | |
details::BinRange | bin_range (const details::Index3 &ref, const float radius) const |
Given a reference index triple, compute the first and last bin. More... | |
bool8_t | next_bin (const details::BinRange &range, details::Index3 &idx) const |
Get next index within a given range. More... | |
Index | get_capacity () const |
Get the maximum capacity of the spatial hash. More... | |
float32_t | radius2 () const |
Getter for the side length, equivalently the lookup radius. More... | |
Index | bin (const float32_t x, const float32_t y, const float32_t z) const |
Compute the single index given a point. More... | |
bool | is_candidate_bin (const details::Index3 &ref, const details::Index3 &query, const float ref_distance2) const |
Compute whether the query bin and reference bin could possibly contain a pair of points such that their distance is within a certain threshold. More... | |
details::Index3 | index3 (const float32_t x, const float32_t y, const float32_t z) const |
Compute the decomposed index given a point. More... | |
Index | index (const details::Index3 &idx) const |
Compute the composed single index given a decomposed index. More... | |
template<typename PointT > | |
float32_t | distance_squared (const float32_t x, const float32_t y, const float32_t z, const PointT &pt) const |
Compute the squared distance between the two points. More... | |
Protected Member Functions | |
Index | x_index (const float32_t x) const |
Computes the index in the x basis direction. More... | |
Index | y_index (const float32_t y) const |
Computes the index in the y basis direction. More... | |
Index | z_index (const float32_t z) const |
Computes the index in the z basis direction. More... | |
Index | bin_impl (const Index xdx, const Index ydx) const |
Compose the provided index offsets. More... | |
Index | bin_impl (const Index xdx, const Index ydx, const Index zdx) const |
Compose the provided index offsets. More... | |
Index | bin_impl (const float32_t x, const float32_t y) const |
The index offset of a point given it's x and y values. More... | |
Index | bin_impl (const float32_t x, const float32_t y, const float32_t z) const |
The index of a point given it's x, y and z values. More... | |
float32_t | idx_distance (const Index ref_idx, const Index query_idx) const |
The distance between two indices as a float, where adjacent indices have zero distance (e.g. dist(0, 1) = 0) More... | |
float | side_length2 () const |
Get side length squared. More... | |
Protected Member Functions inherited from autoware::common::helper_functions::crtp< Derived > | |
const Derived & | impl () const |
Derived & | impl () |
The base class for the configuration object for the SpatialHash class.
Derived | The type of the derived class to support static polymorphism/CRTP |
|
inline |
Constructor for spatial hash.
[in] | min_x | The minimum x value for the spatial hash |
[in] | max_x | The maximum x value for the spatial hash |
[in] | min_y | The minimum y value for the spatial hash |
[in] | max_y | The maximum y value for the spatial hash |
[in] | min_z | The minimum z value for the spatial hash |
[in] | max_z | The maximum z value for the spatial hash |
[in] | radius | The look up radius |
[in] | capacity | The maximum number of points the spatial hash can store |
|
inline |
Compute the single index given a point.
[in] | x | The x component of the point |
[in] | y | The y component of the point |
[in] | z | The z component of the point |
|
inlineprotected |
The index offset of a point given it's x and y values.
[in] | x | The x value of a point |
[in] | y | the y value of a point |
|
inlineprotected |
The index of a point given it's x, y and z values.
[in] | x | The x value of a point |
[in] | y | the y value of a point |
[in] | z | the z value of a point |
|
inlineprotected |
Compose the provided index offsets.
|
inlineprotected |
Compose the provided index offsets.
|
inline |
Given a reference index triple, compute the first and last bin.
[in] | ref | The reference index triple |
[in] | radius | The allowable radius for any point in the reference bin to any point in the range |
|
inline |
Compute the squared distance between the two points.
PointT | A point type with float members x, y and z, or point adapters defined |
[in] | x | The x component of the first point |
[in] | y | The y component of the first point |
[in] | z | The z component of the first point |
[in] | pt | The other point being compared |
|
inline |
Get the maximum capacity of the spatial hash.
|
inlineprotected |
The distance between two indices as a float, where adjacent indices have zero distance (e.g. dist(0, 1) = 0)
Not using fabs because Index is (possibly) unsigned
|
inline |
Compute the composed single index given a decomposed index.
[in] | idx | A decomposed index triple for a bin |
|
inline |
Compute the decomposed index given a point.
[in] | x | The x component of the point |
[in] | y | The y component of the point |
[in] | z | The z component of the point |
|
inline |
Compute whether the query bin and reference bin could possibly contain a pair of points such that their distance is within a certain threshold.
[in] | ref | The index triple of the bin containing the reference point |
[in] | query | The index triple of the bin being queried |
[in] | ref_distance2 | The squared threshold distance |
|
inline |
Get next index within a given range.
[in] | range | The max and min bin indices |
[in,out] | idx | The index to be incremented, updated even if a negative result occurs |
|
inline |
Getter for the side length, equivalently the lookup radius.
|
inlineprotected |
Get side length squared.
|
inlineprotected |
Computes the index in the x basis direction.
[in] | x | The x value of a point |
|
inlineprotected |
Computes the index in the y basis direction.
[in] | y | The y value of a point |
|
inlineprotected |
Computes the index in the z basis direction.
[in] | z | The z value of a point |