Finds the shortest distance between two segments.
This function is changed so it is not doing any comparison of distance but just sending every possible combination further to lw_dist2d_pt_seg
Definition at line 1916 of file measures.c.
1918 double s_top, s_bot,
s;
1919 double r_top, r_bot,
r;
1922 if ((A->
x == B->
x) && (A->
y == B->
y))
1928 if ((C->
x == D->
x) && (C->
y == D->
y))
1956 r_top = (A->
y - C->
y) * (D->
x - C->
x) - (A->
x - C->
x) * (D->
y - C->
y);
1957 r_bot = (B->
x - A->
x) * (D->
y - C->
y) - (B->
y - A->
y) * (D->
x - C->
x);
1959 s_top = (A->
y - C->
y) * (B->
x - A->
x) - (A->
x - C->
x) * (B->
y - A->
y);
1960 s_bot = (B->
x - A->
x) * (D->
y - C->
y) - (B->
y - A->
y) * (D->
x - C->
x);
1962 if ((r_bot == 0) || (s_bot == 0))
1996 if (((A->
x == C->
x) && (A->
y == C->
y)) || ((A->
x == D->
x) && (A->
y == D->
y)))
2001 else if (((B->
x == C->
x) && (B->
y == C->
y)) || ((B->
x == D->
x) && (B->
y == D->
y)))
2008 theP.
x = A->
x +
r * (B->
x - A->
x);
2009 theP.
y = A->
y +
r * (B->
y - A->
y);
#define LW_TRUE
Return types for functions with status returns.
int lw_dist2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B, DISTPTS *dl)
lw_dist2d_comp from p to line A->B This one is now sending every occasion to lw_dist2d_pt_pt Before i...
References DIST_MAX, DIST_MIN, DISTPTS::distance, lw_dist2d_pt_seg(), LW_FALSE, LW_TRUE, DISTPTS::mode, DISTPTS::p1, DISTPTS::p2, r, s, DISTPTS::twisted, POINT2D::x, and POINT2D::y.
Referenced by lw_dist2d_arc_arc(), lw_dist2d_ptarray_ptarray(), lw_dist2d_seg_arc(), and rect_leaf_node_distance().