|
| template<class PairPredicate , class LeafPairCallback > |
| bool | visit_pairs (const AABBTree &A, const AABBTree &B, PairPredicate &&overlaps_pair, LeafPairCallback &&on_leaf_pair) |
| | Dual-tree simultaneous descent over two trees: overlaps_pair(loA, hiA, loB,
hiB) prunes node pairs; on_leaf_pair(ext_a, ext_b) is called for surviving leaf pairs and stops everything by returning false.
|
| |
| template<class PairPredicate , class LeafPairCallback > |
| bool | visit_self_pairs (const AABBTree &T, PairPredicate &&overlaps_pair, LeafPairCallback &&on_leaf_pair) |
| | Self-collision variant: visits each unordered pair of distinct leaves at most once.
|
| |
| std::vector< std::vector< int > > | pick_ellipsoid_batches (const EllipsoidTree &tree, const Eigen::Ref< const Eigen::MatrixXd > &anchor_points, int max_batches=-1, int num_threads=0) |
| | Partition the ellipsoids of tree (at the tree's tau) into batches of mutually non-intersecting ellipsoids.
|
| |
| std::vector< std::vector< int > > | pick_ellipsoid_batches (const EllipsoidTree &tree, int max_batches=-1, int num_threads=0) |
| | Convenience: use the ellipsoid centers as anchors.
|
| |
| std::vector< int > | geometric_sort (const Eigen::Ref< const Eigen::MatrixXd > &points) |
| | Returns a permutation of {0, ..., N-1} placing the points (columns of the input) in axis-alternating geometric order.
|
| |
| Box | bounding_box (const Eigen::Ref< const Eigen::VectorXd > &point) |
| | Degenerate bounding box of a single point (lo == hi == point).
|
| |
| Box | bounding_box (const Box &B) |
| | Bounding box of a box (the box itself).
|
| |
| Box | bounding_box (const Ball &B) |
| | Axis-aligned bounding box of a ball.
|
| |
| Box | bounding_box (const Ellipsoid &E, double tau) |
| | Tight axis-aligned bounding box of an ellipsoid at scale tau: half-width tau * sqrt(Sigma_kk) along axis k.
|
| |
| Box | bounding_box (const Simplex &S) |
| | Axis-aligned bounding box of a simplex (componentwise min/max of its vertices).
|
| |
| Box | bounding_box (const Segment &S) |
| | Axis-aligned bounding box of a segment.
|
| |
| std::pair< Eigen::MatrixXd, Eigen::VectorXd > | simplex_transform (const Eigen::Ref< const Eigen::MatrixXd > &V) |
| | Affine (barycentric) coordinate operator of a simplex.
|
| |
| ClosestPointResult | closest_point_in_simplex (const Eigen::Ref< const Eigen::VectorXd > &p, const Eigen::Ref< const Eigen::MatrixXd > &V, const Eigen::Ref< const Eigen::MatrixXd > &M) |
| | Closest point to p in the solid simplex conv(V), in the metric ||y||_M^2 = y^T M y with M symmetric positive definite.
|
| |
| ClosestPointResult | closest_point_in_simplex (const Eigen::Ref< const Eigen::VectorXd > &p, const Eigen::Ref< const Eigen::MatrixXd > &V) |
| | Euclidean special case (M = I).
|
| |
| ClosestPointResult | closest_point_in_box (const Eigen::Ref< const Eigen::VectorXd > &p, const Box &B) |
| | Closest point to p in the box, Euclidean metric: clamping, exact.
|
| |
| ClosestPointResult | closest_point_in_box (const Eigen::Ref< const Eigen::VectorXd > &p, const Box &B, const Eigen::Ref< const Eigen::MatrixXd > &M, BoxClosestPointOptions opts=BoxClosestPointOptions()) |
| | Closest point to p in the box, in the metric ||y||_M^2 = y^T M y with M symmetric positive definite.
|
| |
| bool | intersects (const Eigen::Ref< const Eigen::VectorXd > &p, const Box &B) |
| | Whether point p lies in box B (componentwise coordinate-bounds test).
|
| |
| bool | intersects (const Eigen::Ref< const Eigen::VectorXd > &p, const Ball &B) |
| | Whether point p lies in ball B (distance to center vs radius).
|
| |
| bool | intersects (const Eigen::Ref< const Eigen::VectorXd > &p, const Ellipsoid &E, double tau) |
| | Whether point p lies in ellipsoid E(tau) (Mahalanobis test via an LDLT solve).
|
| |
| bool | intersects (const Eigen::Ref< const Eigen::VectorXd > &p, const Halfspace &H) |
| | Whether point p lies in halfspace H (closed-form normal . p <= offset).
|
| |
| bool | intersects (const Box &A, const Box &B) |
| | Whether boxes A and B overlap (per-axis interval overlap).
|
| |
| bool | intersects (const Box &A, const Ball &B) |
| | Whether box A and ball B overlap (distance from the center to its clamped closest point in the box vs radius).
|
| |
| bool | intersects (const Box &A, const Halfspace &H) |
| | Whether box A meets halfspace H (support function: min of normal . x over the box vs offset).
|
| |
| bool | intersects (const Ball &A, const Ball &B) |
| | Whether balls A and B overlap (center distance vs the sum of radii).
|
| |
| bool | intersects (const Ball &A, const Halfspace &H) |
| | Whether ball A meets halfspace H (closed-form support-function comparison against the offset).
|
| |
| bool | intersects (const Ellipsoid &E, const Halfspace &H, double tau) |
| | Whether ellipsoid E(tau) meets halfspace H (support test: normal . mu - tau*sqrt(normal^T Sigma normal) vs offset).
|
| |
| bool | intersects (const Simplex &S, const Halfspace &H) |
| | Whether simplex S meets halfspace H (support function: min of normal . x over the vertices vs offset).
|
| |
| bool | intersects (const Segment &S, const Box &B) |
| | Whether segment S meets box B (slab method along the segment's parameter).
|
| |
| bool | intersects (const Segment &S, const Ball &B) |
| | Whether segment S meets ball B (distance from its closest point to the center vs radius).
|
| |
| bool | intersects (const Segment &S, const Ellipsoid &E, double tau) |
| | Whether segment S meets ellipsoid E(tau) (closed-form 1D minimization of the Mahalanobis quadratic over the segment).
|
| |
| bool | intersects (const Eigen::Ref< const Eigen::VectorXd > &p, const Simplex &S) |
| | Point in simplex.
|
| |
| bool | intersects (const Ball &B, const Simplex &S) |
| | Whether ball B and simplex S overlap (Euclidean distance from the center to the simplex, via face enumeration, vs radius).
|
| |
| bool | intersects (const Segment &seg, const Simplex &S) |
| | Whether segment seg meets simplex S (coordinate-interval feasibility for a full-dimensional simplex, else a tolerance-based 1D distance minimization).
|
| |
| bool | intersects (const Simplex &A, const Simplex &B) |
| | Simplices A and B intersect iff some point is a convex combination of both vertex sets: exists alpha, beta >= 0 with sum(alpha) = sum(beta) = 1 and V_A alpha = V_B beta — a linear feasibility problem.
|
| |
| bool | intersects (const Box &A, const Simplex &S) |
| | Box and simplex intersect iff exists alpha >= 0, sum(alpha) = 1, with lo <= V alpha <= hi; the two-sided bound becomes equalities with slack variables s, t >= 0: V alpha - s = lo, s + t = hi - lo.
|
| |
| bool | intersects (const Ellipsoid &A, const Ellipsoid &B, double tau) |
| | Exact ellipsoid-ellipsoid overlap (Gilitschenski & Hanebeck 2014): with the generalized eigendecomposition Sigma_A Phi = Sigma_B Phi Lambda, Phi^T Sigma_B Phi = I, and v = Phi^T (mu_A - mu_B), the ellipsoids overlap iff min over s in [0,1] of K(s) = 1 - s(1-s)/tau^2 * sum_i v_i^2 / (1 + s (lambda_i - 1)) is nonnegative.
|
| |
| bool | intersects (const Ball &B, const Ellipsoid &E, double tau) |
| | Whether ball B and ellipsoid E(tau) overlap: treats the ball as an ellipsoid (Sigma = (radius/tau)^2 I) and applies the Gilitschenski-Hanebeck test.
|
| |
| bool | intersects (const Box &A, const Ellipsoid &E, double tau) |
| | Whether box A and ellipsoid E(tau) overlap (closest point to mu in the box under the Sigma^{-1} metric, by projected coordinate descent, vs tau^2).
|
| |
| bool | intersects (const Ellipsoid &E, const Simplex &S, double tau) |
| | Whether ellipsoid E(tau) and simplex S overlap (closest point to mu in the simplex under the Sigma^{-1} metric, by face enumeration, vs tau^2).
|
| |
| bool | intersects (const Box &B, const Eigen::Ref< const Eigen::VectorXd > &p) |
| | Overlap test between box and point (arguments reversed).
|
| |
| bool | intersects (const Ball &B, const Eigen::Ref< const Eigen::VectorXd > &p) |
| | Overlap test between ball and point (arguments reversed).
|
| |
| bool | intersects (const Ellipsoid &E, const Eigen::Ref< const Eigen::VectorXd > &p, double tau) |
| | Overlap test between ellipsoid E(tau) and point (arguments reversed).
|
| |
| bool | intersects (const Simplex &S, const Eigen::Ref< const Eigen::VectorXd > &p) |
| | Overlap test between simplex and point (arguments reversed).
|
| |
| bool | intersects (const Halfspace &H, const Eigen::Ref< const Eigen::VectorXd > &p) |
| | Overlap test between halfspace and point (arguments reversed).
|
| |
| bool | intersects (const Ball &B, const Box &A) |
| | Overlap test between ball and box (arguments reversed).
|
| |
| bool | intersects (const Ellipsoid &E, const Box &A, double tau) |
| | Overlap test between ellipsoid E(tau) and box (arguments reversed).
|
| |
| bool | intersects (const Halfspace &H, const Box &A) |
| | Overlap test between halfspace and box (arguments reversed).
|
| |
| bool | intersects (const Box &A, const Segment &S) |
| | Overlap test between box and segment (arguments reversed).
|
| |
| bool | intersects (const Ellipsoid &E, const Ball &B, double tau) |
| | Overlap test between ellipsoid E(tau) and ball (arguments reversed).
|
| |
| bool | intersects (const Simplex &S, const Ball &B) |
| | Overlap test between simplex and ball (arguments reversed).
|
| |
| bool | intersects (const Halfspace &H, const Ball &B) |
| | Overlap test between halfspace and ball (arguments reversed).
|
| |
| bool | intersects (const Ball &B, const Segment &S) |
| | Overlap test between ball and segment (arguments reversed).
|
| |
| bool | intersects (const Simplex &S, const Ellipsoid &E, double tau) |
| | Overlap test between simplex and ellipsoid E(tau) (arguments reversed).
|
| |
| bool | intersects (const Halfspace &H, const Ellipsoid &E, double tau) |
| | Overlap test between halfspace and ellipsoid E(tau) (arguments reversed).
|
| |
| bool | intersects (const Ellipsoid &E, const Segment &S, double tau) |
| | Overlap test between ellipsoid E(tau) and segment (arguments reversed).
|
| |
| bool | intersects (const Halfspace &H, const Simplex &S) |
| | Overlap test between halfspace and simplex (arguments reversed).
|
| |
| bool | intersects (const Simplex &S, const Segment &seg) |
| | Overlap test between simplex and segment (arguments reversed).
|
| |
| bool | intersects (const Simplex &S, const Box &A) |
| | Overlap test between simplex and box (arguments reversed).
|
| |
| std::vector< std::pair< int, int > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | 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 > > | collision_pairs (const SimplexTree &A, const BoxTree &B) |
| | Every intersecting pair between the simplices and the boxes (arguments reversed).
|
| |
| Color | colormap_viridis (double t) |
| | The viridis colormap, t in [0, 1].
|
| |
| void | draw_tree (Plot2D &fig, const EllipsoidTree &T, DrawTreeOptions opts=DrawTreeOptions()) |
| | Draw an EllipsoidTree's objects and its AABB node hierarchy.
|
| |
| void | draw_tree (Plot2D &fig, const BoxTree &T, DrawTreeOptions opts=DrawTreeOptions()) |
| | Draw a BoxTree's objects and its AABB node hierarchy.
|
| |
| void | draw_tree (Plot2D &fig, const BallTree &T, DrawTreeOptions opts=DrawTreeOptions()) |
| | Draw a BallTree's objects and its AABB node hierarchy.
|
| |
| void | draw_tree (Plot2D &fig, const SimplexTree &T, DrawTreeOptions opts=DrawTreeOptions()) |
| | Draw a SimplexTree's objects and its AABB node hierarchy.
|
| |
| void | draw_elements (Plot2D &fig, const EllipsoidTree &T, const std::vector< int > &inds, const Style &style) |
| | Draw only the listed elements (e.g. the results of a collision query).
|
| |
| void | draw_elements (Plot2D &fig, const BoxTree &T, const std::vector< int > &inds, const Style &style) |
| | Draw the listed box elements in the given style.
|
| |
| void | draw_elements (Plot2D &fig, const BallTree &T, const std::vector< int > &inds, const Style &style) |
| | Draw the listed ball elements in the given style.
|
| |
| void | draw_elements (Plot2D &fig, const SimplexTree &T, const std::vector< int > &inds, const Style &style) |
| | Draw the listed simplex elements in the given style.
|
| |
| void | draw_batches (Plot2D &fig, const EllipsoidTree &T, const std::vector< std::vector< int > > &batches, double fill_alpha=0.3, double stroke_width=1.3) |
| | Ellipsoids colored by batch (from pick_ellipsoid_batches).
|
| |
| void | draw_kdtree (Plot2D &fig, const KDTree &T, DrawKDTreeOptions opts=DrawKDTreeOptions()) |
| | Draw a kd-tree: its recursive splitting lines and the stored points.
|
| |
| void | draw_cg1_field (Plot2D &fig, const SimplexMesh &mesh, const Eigen::Ref< const Eigen::VectorXd > &vertex_values, FieldOptions opts=FieldOptions()) |
| | Render a CG1 nodal field on a 2D SimplexMesh through the viridis colormap.
|
| |