FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
KDTree< DIM > Struct Template Reference

A k-d tree for efficiently finding intersections between shapes. More...

Public Types

using boxes = std::vector< BBox< DIM > >
 Type alias for a vector of Bounding Boxes.
 
using overlap = std::map< long, std::vector< long > >
 The leaves of another tree that intersect each leaf of a given tree.
 

Public Member Functions

overlap intersect (const KDTree &) const
 Find intersections between this tree and another.
 
 KDTree (const boxes &)
 Construct the tree from leaf bounding boxes.
 

Detailed Description

template<Dimension DIM>
struct flecsi::util::KDTree< DIM >

A k-d tree for efficiently finding intersections between shapes.

Member Typedef Documentation

◆ boxes

template<Dimension DIM>
using boxes = std::vector<BBox<DIM> >

Type alias for a vector of Bounding Boxes.

◆ overlap

template<Dimension DIM>
using overlap = std::map<long, std::vector<long> >

The leaves of another tree that intersect each leaf of a given tree.

Constructor & Destructor Documentation

◆ KDTree()

template<Dimension DIM>
KDTree ( const boxes sboxp)

Construct the tree from leaf bounding boxes.

Parameters
sboxpvector of safety boxes

Member Function Documentation

◆ intersect()

template<Dimension DIM>
KDTree< DIM >::overlap intersect ( const KDTree< DIM > &  k) const

Find intersections between this tree and another.

A possible use case is finding the overlap between multiple distributed meshes .

Returns
mapping from the this tree's leaves to vectors of intersecting leaves in k