14#include <lagrange/AttributeFwd.h>
15#include <lagrange/SurfaceMesh.h>
16#include <lagrange/bvh/api.h>
23namespace lagrange::bvh {
104template <
typename Scalar,
typename Index>
154template <
typename Scalar,
typename Index>
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
uint32_t AttributeId
Identified to be used to access an attribute.
Definition AttributeFwd.h:73
constexpr AttributeId invalid_attribute_id()
Invalid attribute id.
Definition AttributeFwd.h:76
LA_BVH_API UVOverlapResult< Scalar, Index > compute_uv_overlap(SurfaceMesh< Scalar, Index > &mesh, const UVOverlapOptions &options={})
Compute pairwise UV triangle overlap.
Definition compute_uv_overlap.cpp:840
UVOverlapMethod
Algorithm used to find candidate bounding-box pairs in compute_uv_overlap.
Definition compute_uv_overlap.h:31
@ SweepAndPrune
Zomorodian-Edelsbrunner sweep-and-prune.
Definition compute_uv_overlap.h:38
@ Hybrid
Zomorodian-Edelsbrunner HYBRID algorithm (recursive divide-and-conquer).
Definition compute_uv_overlap.h:59
Options for compute_uv_overlap.
Definition compute_uv_overlap.h:66
std::string uv_attribute_name
UV attribute name.
Definition compute_uv_overlap.h:69
bool compute_overlap_coloring
If true, compute a per-facet integer attribute that assigns each triangle a color (greedy graph color...
Definition compute_uv_overlap.h:82
bool compute_overlap_area
If true (default), compute the total overlap area via Sutherland-Hodgman clipping.
Definition compute_uv_overlap.h:73
UVOverlapMethod method
Candidate pair detection algorithm.
Definition compute_uv_overlap.h:95
bool compute_overlapping_pairs
If true, populate UVOverlapResult::overlapping_pairs with the sorted list of (i, j) facet-index pairs...
Definition compute_uv_overlap.h:92
std::string overlap_coloring_attribute_name
Name of the per-facet output integer attribute written when compute_overlap_coloring is true.
Definition compute_uv_overlap.h:86
Result of compute_uv_overlap.
Definition compute_uv_overlap.h:106
bool has_overlap
True when at least one pair of UV triangles has a positive-area interior intersection.
Definition compute_uv_overlap.h:109
std::optional< Scalar > overlap_area
Sum of intersection areas over all overlapping triangle pairs.
Definition compute_uv_overlap.h:116
std::vector< std::pair< Index, Index > > overlapping_pairs
Sorted list of (i, j) facet-index pairs (i < j) that have a positive-area interior intersection.
Definition compute_uv_overlap.h:123
AttributeId overlap_coloring_id
AttributeId of the per-facet integer coloring attribute written to the mesh.
Definition compute_uv_overlap.h:130