|
@@ -81,8 +81,8 @@ static double dist2(double x1, double y1, double x2, double y2);
|
|
|
#if 0
|
|
|
static int ident(double x1, double y1, double x2, double y2, double thresh);
|
|
|
#endif
|
|
|
-static int cross_seg(int id, struct Rect rect, int *arg);
|
|
|
-static int find_cross(int id, struct Rect rect, int *arg);
|
|
|
+static int cross_seg(int id, struct RTree_Rect rect, int *arg);
|
|
|
+static int find_cross(int id, struct RTree_Rect rect, int *arg);
|
|
|
|
|
|
#define D ((ax2-ax1)*(by1-by2) - (ay2-ay1)*(bx1-bx2))
|
|
|
#define D1 ((bx1-ax1)*(by1-by2) - (by1-ay1)*(bx1-bx2))
|
|
@@ -540,7 +540,7 @@ static int ident(double x1, double y1, double x2, double y2, double thresh)
|
|
|
static struct line_pnts *APnts, *BPnts;
|
|
|
|
|
|
/* break segments (called by rtree search) */
|
|
|
-static int cross_seg(int id, struct Rect rect, int *arg)
|
|
|
+static int cross_seg(int id, struct RTree_Rect rect, int *arg)
|
|
|
{
|
|
|
double x1, y1, z1, x2, y2, z2;
|
|
|
int i, j, ret;
|
|
@@ -606,9 +606,9 @@ Vect_line_intersection(struct line_pnts *APoints,
|
|
|
int n_alive_cross;
|
|
|
double dist, curdist, last_dist, last_x, last_y, last_z;
|
|
|
double x, y, rethresh;
|
|
|
- struct Rect rect;
|
|
|
struct line_pnts **XLines, *Points;
|
|
|
struct RTree *MyRTree;
|
|
|
+ struct RTree_Rect rect;
|
|
|
struct line_pnts *Points1, *Points2; /* first, second points */
|
|
|
int seg1, seg2, vert1, vert2;
|
|
|
|
|
@@ -1070,7 +1070,7 @@ static struct line_pnts *APnts, *BPnts, *IPnts;
|
|
|
static int cross_found; /* set by find_cross() */
|
|
|
|
|
|
/* break segments (called by rtree search) */
|
|
|
-static int find_cross(int id, struct Rect rect, int *arg)
|
|
|
+static int find_cross(int id, struct RTree_Rect rect, int *arg)
|
|
|
{
|
|
|
double x1, y1, z1, x2, y2, z2;
|
|
|
int i, j, ret;
|
|
@@ -1133,7 +1133,7 @@ Vect_line_check_intersection(struct line_pnts *APoints,
|
|
|
{
|
|
|
int i;
|
|
|
double dist, rethresh;
|
|
|
- struct Rect rect;
|
|
|
+ struct RTree_Rect rect;
|
|
|
struct RTree *MyRTree;
|
|
|
|
|
|
rethresh = 0.000001; /* TODO */
|