preparation before lw_dist2d_seg_seg.
2074 const POINT2D *p1, *p2, *p3, *p4, *p01, *p02;
2075 int pnr1,pnr2,pnr3,pnr4, n1, n2, i, u,
r, twist;
2080 LWDEBUG(2,
"lw_dist2d_pre_seg_seg is called");
2087 for (i =(n1-1); i>=0; --i)
2092 if (((list2[0].themeasure-list1[i].themeasure)) > maxmeasure)
break;
2093 for (r=-1; r<=1; r +=2)
2095 pnr1 = list1[i].
pnr;
2100 if (( p1->
x == p01->
x) && (p1->
y == p01->
y)) pnr2 = (n1-1);
2104 else if (pnr1+r>(n1-1))
2107 if (( p1->
x == p01->
x) && (p1->
y == p01->
y)) pnr2 = 0;
2114 for (u=0; u<n2; ++u)
2116 if (((list2[u].themeasure-list1[i].themeasure)) >= maxmeasure)
break;
2117 pnr3 = list2[u].
pnr;
2122 if (( p3->
x == p02->
x) && (p3->
y == p02->
y)) pnr4 = (n2-1);
2134 if (( p3->
x == p02->
x) && (p3->
y == p02->
y)) pnr4 = 0;
#define LWDEBUG(level, msg)
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, int n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from...
#define LW_TRUE
Return types for functions with status returns.
int lw_dist2d_selected_seg_seg(const POINT2D *A, const POINT2D *B, const POINT2D *C, const POINT2D *D, DISTPTS *dl)
This is the same function as lw_dist2d_seg_seg but without any calculations to determine intersection...
int lw_dist2d_pt_pt(const POINT2D *thep1, const POINT2D *thep2, DISTPTS *dl)
Compares incomming points and stores the points closest to each other or most far away from each othe...