BVH2.h
Go to the documentation of this file.
Abstract base class for 2-D intersection test query engine.
Definition: IntersectionQueryEngine2.h:47
Closest intersection query result.
Definition: IntersectionQueryEngine2.h:19
void Clear()
Clears all the contents of this instance.
Definition: BVH2-Impl.h:76
BoundingBox2< double > BoundingBox2D
Double-type 2-D BoundingBox.
Definition: BoundingBox2.h:126
std::function< bool(const T &, const BoundingBox2D &)> BoxIntersectionTestFunc2
Box-item intersection test function.
Definition: IntersectionQueryEngine2.h:31
Nearest neighbor query result.
Definition: NearestNeighborQueryEngine2.h:18
typename ContainerType::const_iterator ConstIterator
Definition: BVH2.h:31
const T & GetItem(size_t i) const
Returns the item at i.
Definition: BVH2-Impl.h:595
void ForEachIntersectingItem(const BoundingBox2D &box, const BoxIntersectionTestFunc2< T > &testFunc, const IntersectionVisitorFunc2< T > &visitorFunc) const override
Invokes visitorFunc for every intersecting items.
Definition: BVH2-Impl.h:335
Definition: pybind11Utils.h:24
std::function< void(const T &)> IntersectionVisitorFunc2
Visitor function which is invoked for each intersecting item.
Definition: IntersectionQueryEngine2.h:43
NearestNeighborQueryResult2< T > GetNearestNeighbor(const Vector2D &pt, const NearestNeighborDistanceFunc2< T > &distanceFunc) const override
Definition: BVH2-Impl.h:85
std::vector< Surface2Ptr > ContainerType
Definition: BVH2.h:29
bool IsIntersects(const BoundingBox2D &box, const BoxIntersectionTestFunc2< T > &testFunc) const override
Returns true if given box intersects with any of the stored items.
Definition: BVH2-Impl.h:192
Iterator begin()
Returns the begin iterator of the item.
Definition: BVH2-Impl.h:565
void Build(const std::vector< T > &items, const std::vector< BoundingBox2D > &itemsBounds)
Builds bounding volume hierarchy.
Definition: BVH2-Impl.h:51
Abstract base class for 2-D nearest neighbor query engine.
Definition: NearestNeighborQueryEngine2.h:30
ClosestIntersectionQueryResult2< T > GetClosestIntersection(const Ray2D &ray, const GetRayIntersectionFunc2< T > &testFunc) const override
Returns the closest intersection for given ray.
Definition: BVH2-Impl.h:476
const BoundingBox2D & GetBoundingBox() const
Returns bounding box of every items.
Definition: BVH2-Impl.h:559
std::function< double(const T &, const Ray2D &)> GetRayIntersectionFunc2
Ray-item closest intersection evaluation function.
Definition: IntersectionQueryEngine2.h:39
typename ContainerType::iterator Iterator
Definition: BVH2.h:30
size_t GetNumberOfItems() const
Returns the number of items.
Definition: BVH2-Impl.h:589
std::function< bool(const T &, const Ray2D &)> RayIntersectionTestFunc2
Ray-item intersection test function.
Definition: IntersectionQueryEngine2.h:35
std::function< double(const T &, const Vector2D &)> NearestNeighborDistanceFunc2
Nearest neighbor distance measure function.
Definition: NearestNeighborQueryEngine2.h:26