preparation before lw_dist2d_seg_seg.
2075 const POINT2D *p1, *p2, *p3, *p4, *p01, *p02;
2076 int pnr1,pnr2,pnr3,pnr4, n1, n2, i, u,
r, twist;
2081 LWDEBUG(2,
"lw_dist2d_pre_seg_seg is called");
2088 for (i =(n1-1); i>=0; --i)
2093 if (((list2[0].themeasure-list1[i].themeasure)) > maxmeasure)
break;
2094 for (
r=-1;
r<=1;
r +=2)
2096 pnr1 = list1[i].
pnr;
2101 if (( p1->
x == p01->
x) && (p1->
y == p01->
y)) pnr2 = (n1-1);
2105 else if (pnr1+
r>(n1-1))
2108 if (( p1->
x == p01->
x) && (p1->
y == p01->
y)) pnr2 = 0;
2115 for (u=0; u<n2; ++u)
2117 if (((list2[u].themeasure-list1[i].themeasure)) >= maxmeasure)
break;
2118 pnr3 = list2[u].
pnr;
2123 if (( p3->
x == p02->
x) && (p3->
y == p02->
y)) pnr4 = (n2-1);
2135 if (( p3->
x == p02->
x) && (p3->
y == p02->
y)) pnr4 = 0;
#define LW_TRUE
Return types for functions with status returns.
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
#define LWDEBUG(level, msg)
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...