File: dataquad.h

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (66 lines) | stat: -rw-r--r-- 1,627 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*!
 * \file qtree.c
 *
 * \author
 * H. Mitasova, I. Kosinovsky, D. Gerdes, Fall 1993,
 * University of Illinois and
 * US Army Construction Engineering Research Lab
 *
 * \author H. Mitasova (University of Illinois),
 * \author I. Kosinovsky, (USA-CERL)
 * \author D.Gerdes (USA-CERL)
 *
 * \author modified by H. Mitasova, November 1996 (include variable smoothing)
 *
 * \copyright
 * (C) 1993-1996 by Helena Mitasova and the GRASS Development Team
 *
 * \copyright
 * This program is free software under the
 * GNU General Public License (>=v2).
 * Read the file COPYING that comes with GRASS for details.
 */

#ifndef DATAQUAD_H

#define DATAQUAD_H

#define NW 1
#define NE 2
#define SW 3
#define SE 4

/*!
 * Point structure to keep coordinates
 *
 * It also contains smoothing for the given point.
 */
struct triple {
    double x;
    double y;
    double z;
    double sm; /*!< variable smoothing */
};

struct quaddata {
    double x_orig;
    double y_orig;
    double xmax;
    double ymax;
    int n_rows;
    int n_cols;
    int n_points;
    struct triple *points;
};

struct triple *quad_point_new(double, double, double, double);
struct quaddata *quad_data_new(double, double, double, double, int, int, int,
                               int);
int quad_compare(struct triple *, struct quaddata *);
int quad_add_data(struct triple *, struct quaddata *, double);
int quad_intersect(struct quaddata *, struct quaddata *);
int quad_division_check(struct quaddata *, int);
struct quaddata **quad_divide_data(struct quaddata *, int, double);
int quad_get_points(struct quaddata *, struct quaddata *, int);

#endif