Details
GTS_POINT_CLASS()
#define GTS_POINT_CLASS(klass) |
Casts klass to GtsPointClass.
GTS_IS_POINT()
#define GTS_IS_POINT(obj) |
Evaluates to TRUE if obj is a descendant of a GtsPoint, FALSE otherwise.
struct GtsPointClass
The class for GtsPoint. No virtual functions are associated.
struct GtsPoint
struct GtsPoint {
GtsObject object;
gdouble x, y, z; /* must be contiguous (cast to robust functions) */
}; |
The point object.
gts_point_set ()
void gts_point_set (GtsPoint *p,
gdouble x,
gdouble y,
gdouble z); |
Sets the coordinates of p.
gts_point_is_in_rectangle()
#define gts_point_is_in_rectangle(p, p1, p2) |
Evaluates to TRUE if p is contained in the box (boundary included) defined by its two corners p1 and p2, FALSE otherwise.
gts_segment_triangle_intersection ()
Checks if s intersects t. If this is the case, creates a new
point pi intersection of s with t.
This function is geometrically robust in the sense that it will not
return a point if s and t do not intersect and will return a
point if s and t do intersect. However, the point coordinates are
subject to round-off errors.
Note that this function will not return any point if s is contained in
the plane defined by t.
gts_point_transform ()
Transform the coordinates of p according to m. (p[] becomes m[][].p[]).
gts_point_orientation_3d ()
Checks if p4 lies above, below or on the plane passing through the
points p1, p2 and p3. Below is defined so that p1, p2 and p3
appear in counterclockwise order when viewed from above the
plane. The returned value is an approximation of six times the
signed volume of the tetrahedron defined by the four points. This
function uses adaptive floating point arithmetic and is
consequently geometrically robust.
gts_point_orientation_3d_sos ()
Checks if p4 lies above or below the plane passing through the
points p1, p2 and p3. Below is defined so that p1, p2 and p3
appear in counterclockwise order when viewed from above the
plane. This function uses adaptive floating point arithmetic and is
consequently geometrically robust.
Simulation of Simplicity (SoS) is used to break ties when the
orientation is degenerate (i.e. p4 lies on the plane defined by
p1, p2 and p3).
enum GtsIntersect
typedef enum
{
GTS_OUT = -1,
GTS_ON = 0,
GTS_IN = 1
} GtsIntersect; |
gts_point_in_circle ()
Tests if the planar projection (x, y) of p is inside or outside the
circle defined by the planar projection of p1, p2 and p3.
gts_point_in_triangle_circle ()
Tests if the planar projection (x, y) of p is inside or outside
the circumcircle of the planar projection of t. This function is
geometrically robust.
gts_point_is_in_triangle ()
Tests if the planar projection (x, y) of p is inside, outside or
on the boundary of the planar projection of t. This function is
geometrically robust.
gts_point_orientation ()
Checks for orientation of the projection of three points on the
(x,y) plane. The result is also an approximation of twice the
signed area of the triangle defined by the three points. This
function uses adaptive floating point arithmetic and is
consequently geometrically robust.
gts_point_segment_distance2 ()
gts_point_segment_distance ()
gts_point_segment_closest ()
Set the coordinates of closest to the coordinates of the point belonging
to s closest to p.
gts_point_triangle_distance ()
gts_point_triangle_closest ()
Set the coordinates of closest to those of the point belonging to t and
closest to p.
gts_point_triangle_distance2 ()
gts_point_is_inside_surface ()
gboolean gts_point_is_inside_surface (GtsPoint *p,
GNode *tree,
gboolean is_open); |