preparation before lw_dist2d_seg_seg.
2161 const POINT2D *p1, *p2, *p3, *p4, *p01, *p02;
2162 int pnr1, pnr2, pnr3, pnr4, n1, n2, i, u,
r, twist;
2167 LWDEBUG(2,
"lw_dist2d_pre_seg_seg is called");
2174 for (i = (n1 - 1); i >= 0; --i)
2178 if (((list2[0].themeasure - list1[i].themeasure)) > maxmeasure)
2182 for (
r = -1;
r <= 1;
r += 2)
2184 pnr1 = list1[i].
pnr;
2189 if ((p1->
x == p01->
x) && (p1->
y == p01->
y))
2196 else if (pnr1 +
r > (n1 - 1))
2199 if ((p1->
x == p01->
x) && (p1->
y == p01->
y))
2209 for (u = 0; u < n2; ++u)
2211 if (((list2[u].themeasure - list1[i].themeasure)) >= maxmeasure)
2213 pnr3 = list2[u].
pnr;
2218 if ((p3->
x == p02->
x) && (p3->
y == p02->
y))
2232 if (pnr3 >= (n2 - 1))
2235 if ((p3->
x == p02->
x) && (p3->
y == p02->
y))
#define LW_TRUE
Return types for functions with status returns.
#define LWDEBUG(level, msg)
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
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 incoming points and stores the points closest to each other or most far away from each other...