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. |
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.
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. |