|
| void | ReorderPoints (Matrix3i &triangles, VectorReal &x, VectorReal &y) |
| | Orders points by ascending x coordinates and updates triangle indices.
|
| |
| void | ExtractEdges (const Matrix3i &triangles, Matrix2i &edge_pts, Matrix2i &edge_faces) |
| | Extracts unique edges from triangles. Edges are defined by two point IDs and up to two adjacent triangles (boundary edges have the second triangle ID < 0).
|
| |
| auto | DetectBands (const VectorReal &x, IntT max_bands=0) |
| | Detects the x bands of the map. One band per unique x coordinate is used unless that would exceed max_bands, in which case equal-width bands are used to limit memory.
|
| |
| void | BuildTrapezoidalMap (const Matrix2i &edge_pts, const VectorReal &x, const VectorReal &y, TrapezoidalMap &map) |
| | Builds the trapezoidal map for a set of edges (points must be ordered by x).
|
| |
| auto | QueryTrapezoidalMap (const TrapezoidalMap &map, const Matrix2i &edge_pts, const VectorReal &x_coords, const VectorReal &y_coords, const RealT &x, const RealT &y) |
| | Returns the IDs of the edges directly below and above a query point (either ID can be -1 if the point is at a boundary).
|
| |
| auto | AdjacentTriangles (const IntT edge_0, const IntT edge_1, const Matrix2i &edge_faces) |
| | Returns the IDs of the triangles adjacent to two query edges (up to 3 triangles).
|
| |
| auto | TriangleCoords (const IntT i_tri, const Matrix3i &triangles, const VectorReal &x, const VectorReal &y, const RealT x_q, const RealT y_q) |
| | Computes the barycentric coordinates of point (x_q, y_q) in a triangle.
|
| |
| bool | InTriangle (const std::array< RealT, 3 > &coords, const RealT tol=0.0) |
| | Checks if a point is inside a triangle based on its barycentric coordinates.
|
| |
| IntT | FindTriangle (const TrapezoidalMap &map, const Matrix3i &triangles, const Matrix2i &edge_pts, const Matrix2i &edge_faces, const VectorReal &x, const VectorReal &y, const RealT x_q, const RealT y_q, std::array< RealT, 3 > &bary_out) |
| | Finds the triangle containing a point using the trapezoidal map.
|
| |