18 #include <grass/Vect.h>
28 if (Points->n_points <= 0) {
38 Box->E = Points->x[0];
39 Box->W = Points->x[0];
40 Box->N = Points->y[0];
41 Box->S = Points->y[0];
42 Box->T = Points->z[0];
43 Box->B = Points->z[0];
45 for (i = 1; i < Points->n_points; i++) {
46 if (Points->x[i] > Box->E)
47 Box->E = Points->x[i];
48 else if (Points->x[i] < Box->W)
49 Box->W = Points->x[i];
51 if (Points->y[i] > Box->N)
52 Box->N = Points->y[i];
53 else if (Points->y[i] < Box->S)
54 Box->S = Points->y[i];
56 if (Points->z[i] > Box->T)
57 Box->T = Points->z[i];
58 else if (Points->z[i] < Box->B)
59 Box->B = Points->z[i];
int dig_line_box(struct line_pnts *Points, BOUND_BOX *Box)
float Box[8][3]
Vertices for box.
int dig_box_extend(BOUND_BOX *A, BOUND_BOX *B)
int dig_box_copy(BOUND_BOX *A, BOUND_BOX *B)