GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
dataquad.h
Go to the documentation of this file.
1 
2 /*-
3  * Written by H. Mitasova, I. Kosinovsky, D. Gerdes Fall 1992
4  * University of Illinois
5  * US Army Construction Engineering Research Lab
6  * Copyright 1992, H. Mitasova (University of Illinois),
7  * I. Kosinovsky, (USA-CERL), and D.Gerdes (USA-CERL)
8  *
9  * Modified by H.Mitasova November 1996 to include variable smoothing
10  */
11 
12 
13 #ifndef DATAQUAD_H
14 
15 #define DATAQUAD_H
16 
17 #define NW 1
18 #define NE 2
19 #define SW 3
20 #define SE 4
21 
22 struct triple
23 {
24  double x;
25  double y;
26  double z;
27  double sm; /* structure extended to incl. variable smoothing */
28 };
29 
30 struct quaddata
31 {
32  double x_orig;
33  double y_orig;
34  double xmax;
35  double ymax;
36  int n_rows;
37  int n_cols;
38  int n_points;
39  struct triple *points;
40 };
41 
42 struct triple *quad_point_new(double, double, double, double);
43 struct quaddata *quad_data_new(double, double, double, double, int, int, int,
44  int);
45 int quad_compare(struct triple *, struct quaddata *);
46 int quad_add_data(struct triple *, struct quaddata *, double);
47 int quad_intersect(struct quaddata *, struct quaddata *);
48 int quad_division_check(struct quaddata *, int);
49 struct quaddata **quad_divide_data(struct quaddata *, int, double);
50 int quad_get_points(struct quaddata *, struct quaddata *, int);
51 
52 #endif