Definition at line 79 of file lwtree.c.
References FP_GT, rect_node::left_node, LW_FALSE, lw_segment_intersects(), LW_TRUE, LWDEBUG, LWDEBUGF, rect_node::p1, rect_node::p2, rect_node_is_leaf(), rect_tree_intersects_tree(), rect_node::right_node, rect_node::xmax, rect_node::xmin, rect_node::ymax, and rect_node::ymin.
Referenced by rect_tree_intersects_tree(), and test_rect_tree_intersects_tree().
81 LWDEBUGF(4,
"n1 (%.9g %.9g,%.9g %.9g) vs n2 (%.9g %.9g,%.9g %.9g)",n1->xmin,n1->ymin,n1->xmax,n1->ymax,n2->xmin,n2->ymin,n2->xmax,n2->ymax);
83 if ( ! (
FP_GT(n1->xmin, n2->xmax) ||
FP_GT(n2->xmin, n1->xmax) ||
FP_GT(n1->ymin, n2->ymax) ||
FP_GT(n2->ymin, n1->ymax) ) )
85 LWDEBUG(4,
" interaction found");
98 LWDEBUG(4,
" internal node found, recursing");
118 LWDEBUG(4,
" no interaction found");
#define LWDEBUG(level, msg)
static int rect_node_is_leaf(const RECT_NODE *node)
Internal nodes have their point references set to NULL.
#define LW_TRUE
Return types for functions with status returns.
int rect_tree_intersects_tree(const RECT_NODE *n1, const RECT_NODE *n2)
#define LWDEBUGF(level, msg,...)
int lw_segment_intersects(const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2)
returns the kind of CG_SEGMENT_INTERSECTION_TYPE behavior of lineseg 1 (constructed from p1 and p2) a...