A GtsTriangle is defined by three GtsEdge. They are oriented, the normal to the triangle points toward an observer seing the three edges in counter-clockwise order.
When destroying a GtsTriangle, all the edges not used by another triangle are also destroyed. This default behaviour can be changed punctually by setting the global variable gts_allow_floating_edges to TRUE. You must not forget to set this variable back to FALSE as all the algorithms of GTS assume the default behaviour.
The quality of a triangle is defined as the ratio of its surface to
its perimeter relative to this same ratio for an equilateral
triangle with the same area. The quality is then one for an
equilateral triangle and tends to zero for a very stretched triangle.
Computes the coordinates of the oriented normal of t as the
cross-product of two edges, using the left-hand rule. The normal is
not normalized. If this triangle is part of a closed and oriented
surface, the normal points to the outside of the surface.
Checks for the orientation of the plane (x,y) projection of a
triangle. See gts_point_orientation() for details. This function
is geometrically robust.
Builds a new triangle (including new vertices and edges) enclosing
the plane projection of all the points in points. This triangle is
equilateral and encloses a rectangle defined by the maximum and
minimum x and y coordinates of the points. scale is an homothetic
scaling factor. If equal to one, the triangle encloses exactly the
enclosing rectangle.
Given t and e, returns v1, v2, v3, e1, e2 and e3. e1
has v1 and v2 as vertices, e2 has v2 and v3 as vertices
and e3 has v3 and v1 as vertices. v1, v2 and v3 respects
the orientation of t. If e is not NULL, e1 and e are
identical.
one of the vertices of t, one of the edges of t or t if
any of these are stabbed by the ray starting at p (included) and
ending at (p->x, p->y, +infty), NULL otherwise. If the ray is
contained in the plane of the triangle NULL is also returned. If
orientation is not NULL, it is set to the value of the
orientation of p relative to t (as given by
gts_point_orientation_3d()).