Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
triangle_intersection.h File Reference

Symbolic computation of triangle-triangle intersection. More...

#include <geogram/basic/common.h>
#include <geogram/basic/geometry.h>
#include <geogram/basic/memory.h>
#include <utility>

Go to the source code of this file.

Namespaces

 GEO
 Global Vorpaline namespace.
 

Typedefs

typedef std::pair< TriangleRegion, TriangleRegion > GEO::TriangleIsect
 Encodes the symbolic representation of a triangle intersection, as a pair of TriangleRegion.
 

Enumerations

enum  GEO::TriangleRegion {
  T1_RGN_P0 = 0 , T1_RGN_P1 = 1 , T1_RGN_P2 = 2 , T2_RGN_P0 = 3 ,
  T2_RGN_P1 = 4 , T2_RGN_P2 = 5 , T1_RGN_E0 = 6 , T1_RGN_E1 = 7 ,
  T1_RGN_E2 = 8 , T2_RGN_E0 = 9 , T2_RGN_E1 = 10 , T2_RGN_E2 = 11 ,
  T1_RGN_T = 12 , T2_RGN_T = 13 , T_RGN_NB = 14
}
 Encodes the location of a point within a triangle. More...
 

Functions

bool GEO::is_in_T1 (TriangleRegion R)
 Tests whether a region belongs to triangle T1. More...
 
TriangleRegion GEO::swap_T1_T2 (TriangleRegion R)
 Replaces T1 with T2 or T2 with T1 in a region code. More...
 
bool GEO::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. More...
 
bool GEO::triangles_intersections (const vec3 &p0, const vec3 &p1, const vec3 &p2, const vec3 &q0, const vec3 &q1, const vec3 &q2)
 Triangle-triangle intersection predicate. More...
 
std::string GEO::region_to_string (TriangleRegion rgn)
 Converts a triangle region code to a string. More...
 
coord_index_t GEO::region_dim (TriangleRegion r)
 Gets the dimension of a triangle region. More...
 
void GEO::get_triangle_vertices (TriangleRegion T, TriangleRegion &p0, TriangleRegion &p1, TriangleRegion &p2)
 Gets the vertices of a triangle. More...
 
void GEO::get_triangle_edges (TriangleRegion T, TriangleRegion &e0, TriangleRegion &e1, TriangleRegion &e2)
 Gets the edges of a triangle. More...
 
void GEO::get_edge_vertices (TriangleRegion E, TriangleRegion &q0, TriangleRegion &q1)
 Gets the vertices of an edge. More...
 
TriangleRegion GEO::regions_convex_hull (TriangleRegion R1, TriangleRegion R2)
 Computes the convex hull of two regions. More...
 
std::ostream & GEO::operator<< (std::ostream &out, const TriangleIsect &I)
 Prints a triangle intersection element to a stream. More...
 
std::ostream & GEO::operator<< (std::ostream &out, vector< TriangleIsect > &II)
 Prints the result of a triangle intersection to a stream. More...
 

Detailed Description

Symbolic computation of triangle-triangle intersection.

Definition in file triangle_intersection.h.