Intersection tests.
[The CRT X-Y library (libcrtxy)libcrtxy geometry]


Functions

XY_bool XY_lines_intersect (XY_line line1, XY_line line2, XY_fixed *intersect_x, XY_fixed *intersect_y, XY_intersection *result)
 Returns whether two lines intersect.
XY_bool XY_line_groups_intersect (XY_lines *lines1, XY_lines *lines2)
 Returns whether any lines in one group intersect any lines in another.

Function Documentation

XY_bool XY_lines_intersect ( XY_line  line1,
XY_line  line2,
XY_fixed intersect_x,
XY_fixed intersect_y,
XY_intersection result 
)

Returns whether two lines intersect.

Optionally (if not NULL), return the (x,y) coordinates of the intersection (if possible), and how the lines intersect (or don't): parallel, coincident, not intersecting, or intersecting.

Parameters:
line1 is an XY_line structure containing a line.
line2 is an XY_line structure containing a line.
intersect_x is a pointer to a variable into which the X coordinates of the intersection (if any) occurred; may be NULL to ignore.
intersect_y is a pointer to a variable into which the Y coordinates of the intersection (if any) occurred; may be NULL to ignore.
result is a pointer to an XY_intersection variable into which the type of intersection (if any) occurred; may be NULL to ignore.
Returns:
XY_TRUE if the lines intersect or are coincident, XY_FALSE if they do not intersect or are parallel.

XY_bool XY_line_groups_intersect ( XY_lines lines1,
XY_lines lines2 
)

Returns whether any lines in one group intersect any lines in another.

Parameters:
lines1 is an XY_lines pointer containing a collection of lines.
lines2 is an XY_lines pointer containing a collection of lines.
Returns:
XY_TRUE if any lines in 'lines1' intersect or are coincident with any lines in 'lines2', XY_FALSE if not.


Generated on Tue Sep 2 23:45:36 2008 for libcrtxy by  doxygen 1.5.5