Loading...
Searching...
No Matches
Quadtree-Impl.hpp
Go to the documentation of this file.
VectorType MidPoint() const
Returns the mid-point of this box.
Definition BoundingBox-Impl.hpp:194
VectorType Corner(size_t idx) const
Returns corner position. Index starts from x-first order.
Definition BoundingBox-Impl.hpp:240
ValueType DistanceSquaredTo(const MatrixExpression< T, R, C, E > &other) const
Returns the squared distance to the other vector.
Definition Matrix.hpp:30
size_t GetMaxDepth() const
Returns the maximum depth of the tree.
Definition Quadtree-Impl.hpp:246
void Build(const std::vector< T > &items, const BoundingBox2D &bound, const BoxIntersectionTestFunc2< T > &testFunc, size_t maxDepth)
Definition Quadtree-Impl.hpp:26
size_t GetNumberOfItems() const
Returns the number of items.
Definition Quadtree-Impl.hpp:210
Iterator begin()
Returns the begin iterator of the item.
Definition Quadtree-Impl.hpp:186
NearestNeighborQueryResult2< T > Nearest(const Vector2D &pt, const NearestNeighborDistanceFunc2< T > &distanceFunc) const override
Definition Quadtree-Impl.hpp:59
bool Intersects(const BoundingBox2D &box, const BoxIntersectionTestFunc2< T > &testFunc) const override
Returns true if given box intersects with any of the stored items.
Definition Quadtree-Impl.hpp:145
size_t GetNumberOfNodes() const
Returns the number of quadtree nodes.
Definition Quadtree-Impl.hpp:222
size_t GetChildIndex(size_t nodeIdx, size_t childIdx) const
Returns a child's index for given node.
Definition Quadtree-Impl.hpp:234
ClosestIntersectionQueryResult2< T > ClosestIntersection(const Ray2D &ray, const GetRayIntersectionFunc2< T > &testFunc) const override
Returns the closest intersection for given ray.
Definition Quadtree-Impl.hpp:175
const std::vector< size_t > & GetItemsAtNode(size_t nodeIdx) const
Returns the list of the items for given node index.
Definition Quadtree-Impl.hpp:228
const BoundingBox2D & GetBoundingBox() const
Returns the bounding box of this quadtree.
Definition Quadtree-Impl.hpp:240
void ForEachIntersectingItem(const BoundingBox2D &box, const BoxIntersectionTestFunc2< T > &testFunc, const IntersectionVisitorFunc< T > &visitorFunc) const override
Invokes visitorFunc for every intersecting items.
Definition Quadtree-Impl.hpp:159
void Clear()
Clears all the contents of this instance.
Definition Quadtree-Impl.hpp:50
typename ContainerType::const_iterator ConstIterator
Definition Quadtree.hpp:35
Iterator end()
Returns the end iterator of the item.
Definition Quadtree-Impl.hpp:192
const T & GetItem(size_t i) const
Returns the item at i.
Definition Quadtree-Impl.hpp:216
Definition pybind11Utils.hpp:21
1.9.8