Find if 2 line segment intersect each other
Syntax
float GEMS_2D_Intersect_Segment_Segment(
Point_2D *A1,
Point_2D *A2,
Point_2D *B1,
Point_2D *B2,
Point_2D *Pt=NULL
) ;
Parameters
A1
Pointer to the first point of the line segment A.
A2
Pointer to the second point of the line segment A.
B1
Pointer to the first point of the line segment B.
B2
Pointer to the second point of the line segment B.
Pt
Pointer to a 2D point structure that will contain the coordinate of the intersection point between the line segments if there is one.
Return value
This function return "0" if there is no intersection, or "s" otherwise (s being the parameter of the segment Ax= A1 + s(B1x-A1x)).
Remarks
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
See also