Apollo
6.0
Open source self driving car software
|
The class of KD-tree of Aligned Axis Bounding Box(AABox). More...
#include <aaboxkdtree2d.h>
Public Types | |
using | ObjectPtr = const ObjectType * |
Public Member Functions | |
AABoxKDTree2d (const std::vector< ObjectType > &objects, const AABoxKDTreeParams ¶ms) | |
Constructor which takes a vector of objects and parameters. More... | |
ObjectPtr | GetNearestObject (const Vec2d &point) const |
Get the nearest object to a target point. More... | |
std::vector< ObjectPtr > | GetObjects (const Vec2d &point, const double distance) const |
Get objects within a distance to a point. More... | |
AABox2d | GetBoundingBox () const |
Get the axis-aligned bounding box of the objects. More... | |
The class of KD-tree of Aligned Axis Bounding Box(AABox).
using apollo::common::math::AABoxKDTree2d< ObjectType >::ObjectPtr = const ObjectType * |
|
inline |
Constructor which takes a vector of objects and parameters.
params | Parameters to build the KD-tree. |
|
inline |
Get the axis-aligned bounding box of the objects.
|
inline |
Get the nearest object to a target point.
point | The target point. Search it's nearest object. |
|
inline |
Get objects within a distance to a point.
point | The center point of the range to search objects. |
distance | The radius of the range to search objects. |