40 #ifndef GEOGRAM_MESH_TRIANGLE_INTERSECTION
41 #define GEOGRAM_MESH_TRIANGLE_INTERSECTION
94 return (R == T1_RGN_P0) ||
231 inline std::ostream& operator<<(
248 inline std::ostream& operator<<(
Vector with aligned memory allocation.
Common include file, providing basic definitions. Should be included before anything else by all head...
Geometric functions in 2d and 3d.
Types and functions for memory manipulation.
Global Vorpaline namespace.
coord_index_t region_dim(TriangleRegion r)
Gets the dimension of a triangle region.
TriangleRegion
Encodes the location of a point within a triangle.
TriangleRegion swap_T1_T2(TriangleRegion R)
Replaces T1 with T2 or T2 with T1 in a region code.
TriangleRegion regions_convex_hull(TriangleRegion R1, TriangleRegion R2)
Computes the convex hull of two regions.
std::pair< TriangleRegion, TriangleRegion > TriangleIsect
Encodes the symbolic representation of a triangle intersection, as a pair of TriangleRegion.
bool is_in_T1(TriangleRegion R)
Tests whether a region belongs to triangle T1.
void get_triangle_edges(TriangleRegion T, TriangleRegion &e0, TriangleRegion &e1, TriangleRegion &e2)
Gets the edges of a triangle.
void get_edge_vertices(TriangleRegion E, TriangleRegion &q0, TriangleRegion &q1)
Gets the vertices of an edge.
void get_triangle_vertices(TriangleRegion T, TriangleRegion &p0, TriangleRegion &p1, TriangleRegion &p2)
Gets the vertices of a triangle.
std::string region_to_string(TriangleRegion rgn)
Converts a triangle region code to a string.
geo_coord_index_t coord_index_t
The type for storing coordinate indices, and iterating on the coordinates of a point.
bool triangles_intersections(const vec3 &p0, const vec3 &p1, const vec3 &p2, const vec3 &q0, const vec3 &q1, const vec3 &q2, vector< TriangleIsect > &result)
Triangle-triangle intersection with symbolic information.