ellipsoid_tree 0.1.0
Exact intersection tests for ellipsoids and friends
Loading...
Searching...
No Matches
ellipsoid_tree::EllipsoidTree Class Reference

Spatial index over a collection of ellipsoids sharing a fixed scale tau. More...

#include <ellipsoid_tree/object_tree.hpp>

Inheritance diagram for ellipsoid_tree::EllipsoidTree:

Public Member Functions

 EllipsoidTree ()=default
 Empty tree (indexes no ellipsoids).
 
 EllipsoidTree (std::vector< Ellipsoid > ellipsoids, double tau, int num_threads=0)
 Index a family of ellipsoids at the shared scale tau, precomputing each Sigma^{-1} and building the tree over their tau-scaled bounding boxes.
 
int size () const
 Number of indexed ellipsoids.
 
int dim () const
 Spatial dimension of the indexed ellipsoids.
 
double tau () const
 The shared ellipsoid scale tau fixed at construction (used for the leaf boxes).
 
const Ellipsoidobject (int ii) const
 The ii-th indexed ellipsoid.
 
const std::vector< Ellipsoid > & objects () const
 All indexed ellipsoids, in index order.
 
const AABBTreetree () const
 The underlying AABB tree over the elements' bounding boxes.
 
const Eigen::MatrixXd & sigma_inverse (int ii) const
 The precomputed inverse Sigma^{-1} of the ii-th ellipsoid's covariance.
 
void rebuild (double new_tau)
 Rebuild the leaf boxes (and tree) at a new scale; Sigma^{-1} is unchanged.
 
std::vector< int > collisions (const Eigen::Ref< const Eigen::VectorXd > &p) const
 Indices of the ellipsoids (at the build tau) that contain the query point.
 
std::vector< int > collisions (const Eigen::Ref< const Eigen::VectorXd > &p, double tau) const
 Indices of the ellipsoids at scale tau (at most the build tau) that contain the query point.
 
std::vector< int > collisions (const Box &q) const
 Indices of the ellipsoids (at the build tau) intersecting the query box.
 
std::vector< int > collisions (const Box &q, double tau) const
 Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query box.
 
std::vector< int > collisions (const Ball &q) const
 Indices of the ellipsoids (at the build tau) intersecting the query ball.
 
std::vector< int > collisions (const Ball &q, double tau) const
 Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query ball.
 
std::vector< int > collisions (const Ellipsoid &q) const
 Indices of the ellipsoids (at the build tau) intersecting the query ellipsoid at that same scale.
 
std::vector< int > collisions (const Ellipsoid &q, double tau) const
 Indices of the ellipsoids intersecting the query ellipsoid, both taken at scale tau (at most the build tau).
 
std::vector< int > collisions (const Simplex &q) const
 Indices of the ellipsoids (at the build tau) intersecting the query simplex.
 
std::vector< int > collisions (const Simplex &q, double tau) const
 Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query simplex.
 
std::vector< int > collisions (const Segment &q) const
 Indices of the ellipsoids (at the build tau) intersecting the query segment.
 
std::vector< int > collisions (const Segment &q, double tau) const
 Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query segment.
 
std::vector< int > collisions (const Halfspace &q) const
 Indices of the ellipsoids (at the build tau) intersecting the query halfspace.
 
std::vector< int > collisions (const Halfspace &q, double tau) const
 Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query halfspace.
 
std::vector< std::pair< int, int > > self_collision_pairs () const
 Every intersecting pair within the family of ellipsoids at the build tau (the overlap graph).
 

Public Attributes

bool exact_ellipsoid_pruning = true
 Enable the exact ellipsoid-box test during node pruning (vs. bounding-box only).
 

Detailed Description

Spatial index over a collection of ellipsoids sharing a fixed scale tau.

Constructor & Destructor Documentation

◆ EllipsoidTree() [1/2]

ellipsoid_tree::EllipsoidTree::EllipsoidTree ( )
default

Empty tree (indexes no ellipsoids).

◆ EllipsoidTree() [2/2]

ellipsoid_tree::EllipsoidTree::EllipsoidTree ( std::vector< Ellipsoid ellipsoids,
double  tau,
int  num_threads = 0 
)
inline

Index a family of ellipsoids at the shared scale tau, precomputing each Sigma^{-1} and building the tree over their tau-scaled bounding boxes.

Member Function Documentation

◆ size()

int ellipsoid_tree::EllipsoidTree::size ( ) const
inline

Number of indexed ellipsoids.

◆ dim()

int ellipsoid_tree::EllipsoidTree::dim ( ) const
inline

Spatial dimension of the indexed ellipsoids.

◆ tau()

double ellipsoid_tree::EllipsoidTree::tau ( ) const
inline

The shared ellipsoid scale tau fixed at construction (used for the leaf boxes).

◆ object()

const Ellipsoid & ellipsoid_tree::EllipsoidTree::object ( int  ii) const
inline

The ii-th indexed ellipsoid.

◆ objects()

const std::vector< Ellipsoid > & ellipsoid_tree::EllipsoidTree::objects ( ) const
inline

All indexed ellipsoids, in index order.

◆ tree()

const AABBTree & ellipsoid_tree::EllipsoidTree::tree ( ) const
inline

The underlying AABB tree over the elements' bounding boxes.

◆ sigma_inverse()

const Eigen::MatrixXd & ellipsoid_tree::EllipsoidTree::sigma_inverse ( int  ii) const
inline

The precomputed inverse Sigma^{-1} of the ii-th ellipsoid's covariance.

◆ rebuild()

void ellipsoid_tree::EllipsoidTree::rebuild ( double  new_tau)
inline

Rebuild the leaf boxes (and tree) at a new scale; Sigma^{-1} is unchanged.

◆ collisions() [1/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Eigen::Ref< const Eigen::VectorXd > &  p) const
inline

Indices of the ellipsoids (at the build tau) that contain the query point.

◆ collisions() [2/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Eigen::Ref< const Eigen::VectorXd > &  p,
double  tau 
) const
inline

Indices of the ellipsoids at scale tau (at most the build tau) that contain the query point.

◆ collisions() [3/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Box q) const
inline

Indices of the ellipsoids (at the build tau) intersecting the query box.

◆ collisions() [4/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Box q,
double  tau 
) const
inline

Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query box.

◆ collisions() [5/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Ball q) const
inline

Indices of the ellipsoids (at the build tau) intersecting the query ball.

◆ collisions() [6/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Ball q,
double  tau 
) const
inline

Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query ball.

◆ collisions() [7/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Ellipsoid q) const
inline

Indices of the ellipsoids (at the build tau) intersecting the query ellipsoid at that same scale.

◆ collisions() [8/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Ellipsoid q,
double  tau 
) const
inline

Indices of the ellipsoids intersecting the query ellipsoid, both taken at scale tau (at most the build tau).

◆ collisions() [9/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Simplex q) const
inline

Indices of the ellipsoids (at the build tau) intersecting the query simplex.

◆ collisions() [10/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Simplex q,
double  tau 
) const
inline

Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query simplex.

◆ collisions() [11/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Segment q) const
inline

Indices of the ellipsoids (at the build tau) intersecting the query segment.

◆ collisions() [12/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Segment q,
double  tau 
) const
inline

Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query segment.

◆ collisions() [13/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Halfspace q) const
inline

Indices of the ellipsoids (at the build tau) intersecting the query halfspace.

◆ collisions() [14/14]

std::vector< int > ellipsoid_tree::EllipsoidTree::collisions ( const Halfspace q,
double  tau 
) const
inline

Indices of the ellipsoids at scale tau (at most the build tau) intersecting the query halfspace.

◆ self_collision_pairs()

std::vector< std::pair< int, int > > ellipsoid_tree::EllipsoidTree::self_collision_pairs ( ) const
inline

Every intersecting pair within the family of ellipsoids at the build tau (the overlap graph).

Member Data Documentation

◆ exact_ellipsoid_pruning

bool ellipsoid_tree::EllipsoidTree::exact_ellipsoid_pruning = true

Enable the exact ellipsoid-box test during node pruning (vs. bounding-box only).


The documentation for this class was generated from the following file: