GEOintersectStraightStraight

Top  Previous  Next

Cut of two straight lines.

Delivers the intersection, if necessary the factors of (P2-P1) and (P4-P3) to reach of the intersection. All back values which are not needed may receive zero pointer.

Parametre

g1x1 (stands in) [IN]

Co-ordinate on the x axis of the first point first Just.

g1y1 (stands in) [IN]

Co-ordinate on the Y axis of the first point first Just.

g1x2 (stands in) [IN]

Co-ordinate on the x axis of the second point first Just.

g1y2 (stands in) [IN]

Co-ordinate on the Y axis of the second point first Just.

g2x1 (stands in) [IN]

Co-ordinate on the x axis of the first point second Just.

g2y1 (stands in) [IN]

Co-ordinate on the Y axis of the first point second Just.

g2x2 (stands in) [IN]

Co-ordinate on the x axis of the second point second Just.

g2y2 (stands in) [IN]

Co-ordinate on the Y axis of the second point second Just.

xs (stands in *) [IN / OUT]

Co-ordinate on the x axis of the intersection.

ys (stands in *) [IN / OUT]

Co-ordinate on the Y axis of the intersection.

s1 (stands in *) [IN / OUT]

s1 is the factor with which is determined whether the intersection still lies on the first straight lines. Is valid 0s11, so the intersection is still on the first straight lines.

s2 (stands in *) [IN / OUT]

s2 is the factor with which is determined whether the intersection still lies on the second straight lines. Is valid 0s21, so the intersection is still on the second straight lines.

Result

(int) [OUT]

As a return value it is delivered:

0 no intersection,

1 intersection available.

Declaration

#include "basic.h"

 

int DLLENTRY GEOintersectStraightStraight (

stand in g1x1,

stand in g1y1,

stand in g1x2,

stand in g1y2,

stand in g2x1,

stand in g2y1,

stand in g2x2,

stand in g2y2,

stand in * xs,

stand in * ys,

stand in * s1,

stand in * s2

);

Related functions

GEOintersectArcArc

GEOintersectCircleArc

GEOintersectCircleCircle

GEOintersectCircleLine

GEOintersectLineArc

GEOintersectLineLine

GEOintersectLineLine2

GEOintersectLineSpline

GEOintersectStraightArc

GEOintersectStraightCircle

GEOintersectStraightLine

GEOintersectStraightVector

GEOintersectVectorVector