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