#include <stdlib.h>
#include <math.h>
#include <grass/gis.h>
#include "e_intersect.h"
Go to the source code of this file.
Defines | |
#define | SWAP(a, b) {t = a; a = b; b = t;} |
#define | MIN(X, Y) ((X<Y)?X:Y) |
#define | MAX(X, Y) ((X>Y)?X:Y) |
#define | D (ax2-ax1)*(by1-by2) - (ay2-ay1)*(bx1-bx2) |
#define | DA (bx1-ax1)*(by1-by2) - (by1-ay1)*(bx1-bx2) |
#define | DB (ax2-ax1)*(by1-ay1) - (ay2-ay1)*(bx1-ax1) |
#define | N 52 |
Functions | |
int | segment_intersection_2d_tol (double ax1, double ay1, double ax2, double ay2, double bx1, double by1, double bx2, double by2, double *x1, double *y1, double *x2, double *y2, double tol) |
int | segment_intersection_2d (double ax1, double ay1, double ax2, double ay2, double bx1, double by1, double bx2, double by2, double *x1, double *y1, double *x2, double *y2) |
int | almost_equal (double a, double b, int bits) |
#define D (ax2-ax1)*(by1-by2) - (ay2-ay1)*(bx1-bx2) |
Definition at line 13 of file e_intersect.c.
#define DA (bx1-ax1)*(by1-by2) - (by1-ay1)*(bx1-bx2) |
Definition at line 14 of file e_intersect.c.
Referenced by segment_intersection_2d().
#define DB (ax2-ax1)*(by1-ay1) - (ay2-ay1)*(bx1-ax1) |
Definition at line 15 of file e_intersect.c.
Referenced by segment_intersection_2d().
#define MAX | ( | X, | |||
Y | ) | ((X>Y)?X:Y) |
Definition at line 11 of file e_intersect.c.
#define MIN | ( | X, | |||
Y | ) | ((X<Y)?X:Y) |
Definition at line 8 of file e_intersect.c.
#define N 52 |
Definition at line 910 of file e_intersect.c.
#define SWAP | ( | a, | |||
b | ) | {t = a; a = b; b = t;} |
Definition at line 6 of file e_intersect.c.
Referenced by segment_intersection_2d().
int almost_equal | ( | double | a, | |
double | b, | |||
int | bits | |||
) |
Definition at line 912 of file e_intersect.c.
References planar_graph::e, and N.
int segment_intersection_2d | ( | double | ax1, | |
double | ay1, | |||
double | ax2, | |||
double | ay2, | |||
double | bx1, | |||
double | by1, | |||
double | bx2, | |||
double | by2, | |||
double * | x1, | |||
double * | y1, | |||
double * | x2, | |||
double * | y2 | |||
) |
Definition at line 677 of file e_intersect.c.
References D, DA, DB, MAX, MIN, and SWAP.
Referenced by find_all_intersections().