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

Spatial index over a collection of balls. More...

#include <ellipsoid_tree/object_tree.hpp>

Inheritance diagram for ellipsoid_tree::BallTree:

Public Member Functions

 BallTree ()=default
 Empty tree (indexes no balls).
 
 BallTree (std::vector< Ball > balls)
 Index a collection of balls, building an AABBTree over their bounding boxes.
 
 BallTree (const Eigen::Ref< const Eigen::MatrixXd > &centers, const Eigen::Ref< const Eigen::VectorXd > &radii)
 Points with radii; zero radii give a point tree usable for region queries.
 
int size () const
 Number of indexed balls.
 
int dim () const
 Spatial dimension of the indexed balls.
 
const Ballobject (int ii) const
 The ii-th indexed ball.
 
const std::vector< Ball > & objects () const
 All indexed balls, in index order.
 
const AABBTreetree () const
 The underlying AABB tree over the elements' bounding boxes.
 
std::vector< int > collisions (const Eigen::Ref< const Eigen::VectorXd > &p) const
 Indices of the balls containing the query point.
 
std::vector< int > collisions (const Box &q) const
 Indices of the balls intersecting the query box.
 
std::vector< int > collisions (const Ball &q) const
 Indices of the balls intersecting the query ball.
 
std::vector< int > collisions (const Ellipsoid &q, double tau) const
 Indices of the balls intersecting the query ellipsoid at scale tau.
 
std::vector< int > collisions (const Simplex &q) const
 Indices of the balls intersecting the query simplex.
 
std::vector< int > collisions (const Segment &q) const
 Indices of the balls intersecting the query segment.
 
std::vector< int > collisions (const Halfspace &q) const
 Indices of the balls intersecting the query halfspace.
 
std::vector< std::pair< int, int > > self_collision_pairs () const
 Every intersecting pair within the family of balls (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 balls.

Constructor & Destructor Documentation

◆ BallTree() [1/3]

ellipsoid_tree::BallTree::BallTree ( )
default

Empty tree (indexes no balls).

◆ BallTree() [2/3]

ellipsoid_tree::BallTree::BallTree ( std::vector< Ball balls)
inlineexplicit

Index a collection of balls, building an AABBTree over their bounding boxes.

◆ BallTree() [3/3]

ellipsoid_tree::BallTree::BallTree ( const Eigen::Ref< const Eigen::MatrixXd > &  centers,
const Eigen::Ref< const Eigen::VectorXd > &  radii 
)
inline

Points with radii; zero radii give a point tree usable for region queries.

Member Function Documentation

◆ size()

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

Number of indexed balls.

◆ dim()

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

Spatial dimension of the indexed balls.

◆ object()

const Ball & ellipsoid_tree::BallTree::object ( int  ii) const
inline

The ii-th indexed ball.

◆ objects()

const std::vector< Ball > & ellipsoid_tree::BallTree::objects ( ) const
inline

All indexed balls, in index order.

◆ tree()

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

The underlying AABB tree over the elements' bounding boxes.

◆ collisions() [1/7]

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

Indices of the balls containing the query point.

◆ collisions() [2/7]

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

Indices of the balls intersecting the query box.

◆ collisions() [3/7]

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

Indices of the balls intersecting the query ball.

◆ collisions() [4/7]

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

Indices of the balls intersecting the query ellipsoid at scale tau.

◆ collisions() [5/7]

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

Indices of the balls intersecting the query simplex.

◆ collisions() [6/7]

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

Indices of the balls intersecting the query segment.

◆ collisions() [7/7]

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

Indices of the balls intersecting the query halfspace.

◆ self_collision_pairs()

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

Every intersecting pair within the family of balls (the overlap graph).

Member Data Documentation

◆ exact_ellipsoid_pruning

bool ellipsoid_tree::BallTree::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: