Octree.h
Go to the documentation of this file.
void Clear()
Clears all the contents of this instance.
Definition: Octree-Impl.h:52
const BoundingBox3D & GetBoundingBox() const
Returns the bounding box of this octree.
Definition: Octree-Impl.h:244
Abstract base class for 3-D nearest neighbor query engine.
Definition: NearestNeighborQueryEngine3.h:30
size_t GetMaxDepth() const
Returns the maximum depth of the tree.
Definition: Octree-Impl.h:250
size_t GetNumberOfItems() const
Returns the number of items.
Definition: Octree-Impl.h:214
ClosestIntersectionQueryResult3< T > GetClosestIntersection(const Ray3D &ray, const GetRayIntersectionFunc3< T > &testFunc) const override
Returns the closest intersection for given ray.
Definition: Octree-Impl.h:179
const std::vector< size_t > & GetItemsAtNode(size_t nodeIdx) const
Returns the list of the items for given node index.
Definition: Octree-Impl.h:232
const T & GetItem(size_t i) const
Returns the item at i.
Definition: Octree-Impl.h:220
typename ContainerType::const_iterator ConstIterator
Definition: Octree.h:32
std::function< bool(const T &, const BoundingBox3D &)> BoxIntersectionTestFunc3
Box-item intersection test function.
Definition: IntersectionQueryEngine3.h:31
NearestNeighborQueryResult3< T > GetNearestNeighbor(const Vector3D &pt, const NearestNeighborDistanceFunc3< T > &distanceFunc) const override
Definition: Octree-Impl.h:61
std::function< double(const T &, const Ray3D &)> GetRayIntersectionFunc3
Ray-item closest intersection evaluation function.
Definition: IntersectionQueryEngine3.h:39
Definition: pybind11Utils.h:24
Closest intersection query result.
Definition: IntersectionQueryEngine3.h:19
size_t GetNumberOfNodes() const
Returns the number of octree nodes.
Definition: Octree-Impl.h:226
bool IsIntersects(const BoundingBox3D &box, const BoxIntersectionTestFunc3< T > &testFunc) const override
Returns true if given box intersects with any of the stored items.
Definition: Octree-Impl.h:149
void Build(const std::vector< T > &items, const BoundingBox3D &bound, const BoxIntersectionTestFunc3< T > &testFunc, size_t maxDepth)
Definition: Octree-Impl.h:30
size_t GetChildIndex(size_t nodeIdx, size_t childIdx) const
Returns a child's index for given node.
Definition: Octree-Impl.h:238
std::function< void(const T &)> IntersectionVisitorFunc3
Visitor function which is invoked for each intersecting item.
Definition: IntersectionQueryEngine3.h:43
std::function< bool(const T &, const Ray3D &)> RayIntersectionTestFunc3
Ray-item intersection test function.
Definition: IntersectionQueryEngine3.h:35
Nearest neighbor query result.
Definition: NearestNeighborQueryEngine3.h:18
Iterator begin()
Returns the begin iterator of the item.
Definition: Octree-Impl.h:190
void ForEachIntersectingItem(const BoundingBox3D &box, const BoxIntersectionTestFunc3< T > &testFunc, const IntersectionVisitorFunc3< T > &visitorFunc) const override
Invokes visitorFunc for every intersecting items.
Definition: Octree-Impl.h:163
Iterator end()
Returns the end iterator of the item.
Definition: Octree-Impl.h:196
Abstract base class for 3-D intersection test query engine.
Definition: IntersectionQueryEngine3.h:47
std::function< double(const T &, const Vector3D &)> NearestNeighborDistanceFunc3
Nearest neighbor distance measure function.
Definition: NearestNeighborQueryEngine3.h:26