14 #include <grass/vedit.h>
28 struct line_pnts *Points2,
int with_z,
43 Points2->x[0], Points2->y[0], Points2->z[0],
48 Points2->x[Points2->n_points - 1],
49 Points2->y[Points2->n_points - 1],
50 Points2->z[Points2->n_points - 1], with_z);
53 Points1->y[Points1->n_points - 1],
54 Points1->z[Points1->n_points - 1],
55 Points2->x[0], Points2->y[0],
56 Points2->z[0], with_z);
59 Points1->y[Points1->n_points - 1],
60 Points1->z[Points1->n_points - 1],
61 Points2->x[Points2->n_points - 1],
62 Points2->y[Points2->n_points - 1],
63 Points2->z[Points2->n_points - 1],
68 for (i = 0; i <
sizeof(distances) /
sizeof(
double); i++) {
69 if (distances[i] >= 0.0 && distances[i] < distances[*mindistidx])
73 G_debug(3,
"Vedit_get_min_distance(): dists=%f,%f,%f,%f",
74 distances[0], distances[1], distances[2], distances[3]);
76 return distances[*mindistidx];
double Vedit_get_min_distance(struct line_pnts *Points1, struct line_pnts *Points2, int with_z, int *mindistidx)
Calculate distances between two lines.
int G_debug(int level, const char *msg,...)
Print debugging message.
double Vect_points_distance(double x1, double y1, double z1, double x2, double y2, double z2, int with_z)
Calculate distance of 2 points.