|
ellipsoid_tree 0.1.0
Exact intersection tests for ellipsoids and friends
|
Concrete spatial indexes over the geometric types: BoxTree, BallTree, EllipsoidTree, SimplexTree. More...
#include <cstddef>#include <stdexcept>#include <utility>#include <vector>#include <Eigen/Dense>#include "ellipsoid_tree/geometry.hpp"#include "ellipsoid_tree/intersections.hpp"#include "ellipsoid_tree/aabb_tree.hpp"#include "ellipsoid_tree/detail/parallel_for.hpp"Classes | |
| class | ellipsoid_tree::BoxTree |
| Spatial index over a collection of axis-aligned boxes. More... | |
| class | ellipsoid_tree::BallTree |
| Spatial index over a collection of balls. More... | |
| class | ellipsoid_tree::EllipsoidTree |
| Spatial index over a collection of ellipsoids sharing a fixed scale tau. More... | |
| class | ellipsoid_tree::SimplexTree |
| Spatial index over a collection of simplices (e.g. a mesh). More... | |
Namespaces | |
| namespace | ellipsoid_tree |
Functions | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const EllipsoidTree &A, const EllipsoidTree &B) |
| Each tree's tau is folded into the covariances so differing scales are handled exactly. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const SimplexTree &A, const EllipsoidTree &B) |
| Every intersecting simplex-ellipsoid pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BallTree &A, const EllipsoidTree &B) |
| Every intersecting ball-ellipsoid pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BoxTree &A, const EllipsoidTree &B) |
| Every intersecting box-ellipsoid pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BoxTree &A, const BoxTree &B) |
| Every intersecting box-box pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BallTree &A, const BallTree &B) |
| Every intersecting ball-ball pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BoxTree &A, const BallTree &B) |
| Every intersecting box-ball pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BallTree &A, const SimplexTree &B) |
| Every intersecting ball-simplex pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const SimplexTree &A, const SimplexTree &B) |
| Every intersecting simplex-simplex pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BoxTree &A, const SimplexTree &B) |
| Every intersecting box-simplex pair between the two families, found in one simultaneous descent of both trees. | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const EllipsoidTree &A, const SimplexTree &B) |
| Every intersecting pair between the ellipsoids and the simplices (arguments reversed). | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const EllipsoidTree &A, const BallTree &B) |
| Every intersecting pair between the ellipsoids and the balls (arguments reversed). | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const EllipsoidTree &A, const BoxTree &B) |
| Every intersecting pair between the ellipsoids and the boxes (arguments reversed). | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const BallTree &A, const BoxTree &B) |
| Every intersecting pair between the balls and the boxes (arguments reversed). | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const SimplexTree &A, const BallTree &B) |
| Every intersecting pair between the simplices and the balls (arguments reversed). | |
| std::vector< std::pair< int, int > > | ellipsoid_tree::collision_pairs (const SimplexTree &A, const BoxTree &B) |
| Every intersecting pair between the simplices and the boxes (arguments reversed). | |
Concrete spatial indexes over the geometric types: BoxTree, BallTree, EllipsoidTree, SimplexTree.
Each is a thin façade over one shared pattern: contiguous element storage
collisions(query [, tau]) returns the indices of elements intersecting the query (order unspecified). collisions_batch(...) runs many queries with parallel_for. collision_pairs(treeA, treeB) and self_collision_pairs() use dual-tree traversal.
Per-element data that the free predicates would recompute per call is hoisted at build time: EllipsoidTree stores each Sigma^{-1}, SimplexTree stores each affine-coordinate transform. Ellipsoid queries use tiered pruning: a cheap bounding-box test at every node, then (by default) the exact ellipsoid-box QP on survivors — toggle with exact_ellipsoid_pruning.
tau semantics: EllipsoidTree fixes tau for its elements at construction (leaf boxes depend on it). Queries default to that tau; passing a smaller tau is allowed (pruning stays conservative), a larger one throws — call rebuild(new_tau) instead. Trees of non-ellipsoid elements take tau explicitly on ellipsoid queries.