GEMS_2D_Intertsect_Line_Segment

 

Find if a line intersect a line segment.

 

 

Syntax

 

float  GEMS_2D_Intersect_Line_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 A.

 

A2

Pointer to the second point of the line 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 line Ax= A1 + s(B1x-A1x)).

 

 

Remarks

 

 

 

 

Requirements

 

Header:

          sliceO_include.hpp

 

 

Library:

          sliceO_Structures.lib

 

 

 

Example

 

          ...

 

 

 

          ...

 

 

See also