40#ifndef GEOGRAM_MESH_TRIANGLE_INTERSECTION
41#define GEOGRAM_MESH_TRIANGLE_INTERSECTION
94 return (R == T1_RGN_P0) ||
139 return begin()+size_;
142 const_iterator begin()
const {
146 const_iterator end()
const {
147 return begin()+size_;
164 void resize(
index_t new_size) {
188 static constexpr int capacity_ = 20;
219 [[deprecated(
"use TriangleIsects instead of vector<TriangleIsect>")]]
358 inline std::ostream& operator<<(
375 inline std::ostream& operator<<(
384 [[deprecated(
"use TriangleIsects instead of vector<TriangleIsect>")]]
385 inline std::ostream& operator<<(
386 std::ostream& out,
const vector<TriangleIsect>& II
#define geo_assert(x)
Verifies that a condition is met.
#define geo_debug_assert(x)
Verifies that a condition is met.
A small vector of TriangleIsect stored in an array with static size.
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 triangles_intersections(const vec3 &p0, const vec3 &p1, const vec3 &p2, const vec3 &q0, const vec3 &q1, const vec3 &q2, TriangleIsects &result)
Triangle-triangle intersection with symbolic information.
bool is_in_T1(TriangleRegion R)
Tests whether a region belongs to triangle T1.
geo_index_t index_t
The type for storing and manipulating indices.
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.