GEOintersectStraightArc |
Top Previous Next |
Cut of a straight line with an arc. The arc is determined by the centre and radius. The looked part runs against the clockwise from startWinkel to endWinkel. Delivers the intersections, if necessary the factors of (P2-P1) to the achievement of the intersections. All back values which are not needed may receive zero pointer. Parametre x1 (stands in) [IN] Co-ordinate on the x axis of the starting point of the straight lines. y1 (stands in) [IN] Co-ordinate on the Y axis of the starting point of the straight lines. x2 (stands in) [IN] Co-ordinate on the x axis of the terminator point of the straight lines. y2 (stands in) [IN] Co-ordinate on the Y axis of the terminator point of the straight lines. xCenter (stands in) [IN] Co-ordinate on the x axis of the arc centre. yCenter (stands in) [IN] Co-ordinate on the Y axis of the arc centre. radius (stands in) [IN] Radius. startWinkel (stands in) [IN] The arc begins with startWinkel and runs against the clockwise. endWinkel (stands in) [IN] The arc ends with endWinkel. xs1 (stands in *) [IN / OUT] Co-ordinate on the x axis of the first intersection, if available. ys1 (stands in *) [IN / OUT] Co-ordinate on the Y axis of the first intersection, if available. xs2 (stands in *) [IN / OUT] Co-ordinate on the x axis of the second intersection, if available. ys2 (stands in *) [IN / OUT] Co-ordinate on the Y axis of the second intersection, if available. s1 (stands in *) [IN / OUT] s1 is the factor with which is determined whether the first intersection still lies on the straight lines. Is valid 0≤s1≤1, so the intersection is still on the straight lines. s2 (stands in *) [IN / OUT] s2 is the factor with which is determined whether the second intersection still lies on the straight lines. Is valid 0≤s2≤1, so the intersection is still on the straight lines. Result (int) [OUT] The return value gives the number of the intersections: 0 no intersections, 1 an intersection 2 two intersections Declaration #include "basic.h"
int DLLENTRY GEOintersectStraightArc ( stand in x1, stand in y1, stand in x2, stand in y2, stand in xCenter, stand in yCenter, stand in radius, stand in startWinkel, stand in endWinkel, stand in * xs1, stand in * ys1, stand in * xs2, stand in * ys2, stand in * s1, stand in * s2 ); Related functions
|