Lagrange
Loading...
Searching...
No Matches
Intersecting Pairs

Compute intersecting facet pairs in a mesh using BVH acceleration. More...

Functions

template<typename Scalar, typename Index>
AdjacencyList< Index > compute_intersecting_pairs (const SurfaceMesh< Scalar, Index > &mesh)
 Compute all pairs of intersecting facets in a mesh using an AABB tree for acceleration.
 

Detailed Description

Compute intersecting facet pairs in a mesh using BVH acceleration.

Function Documentation

◆ compute_intersecting_pairs()

template<typename Scalar, typename Index>
AdjacencyList< Index > compute_intersecting_pairs ( const SurfaceMesh< Scalar, Index > & mesh)

#include <lagrange/bvh/compute_intersecting_pairs.h>

Compute all pairs of intersecting facets in a mesh using an AABB tree for acceleration.

Detects facet pairs whose interiors overlap using exact geometric predicates. All facet pairs (including vertex- and edge-adjacent ones) are tested geometrically. Contacts at shared vertices or edges do not count as intersections; only interior overlaps are reported.

Parameters
[in]meshThe input mesh. Must be a triangle mesh (only triangular facets).
Template Parameters
ScalarMesh scalar type.
IndexMesh index type.
Returns
An AdjacencyList representing the intersection graph. For each facet i, get_neighbors(i) returns all facets whose interior overlaps the interior of i.
Exceptions
std::runtime_errorif the mesh is not a triangle mesh or not 3D.
Note
Uses exact predicates (orient3D, orient2D) with include_boundary=false. Boundary contacts (shared vertices or edges) are correctly excluded.
See also
triangle_triangle_intersection