TheBoussinesqModel  3.2.1
 All Data Structures Files Functions Variables Typedefs Macros Pages
geometry.h
Go to the documentation of this file.
1 
2 
3 /* BGEOMETRY BUILDS THE MESH FROM A RASTER FOR THE BOUSSINESQ MODEL
4 KeyPalette Version 0.9375 KMackenzie
5 
6 file geometry.h
7 
8 Copyright, 2009 Emanuele Cordano and Riccardo Rigon
9 
10 This file is part of BGEOMETRY.
11  BGEOMETRY is free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  BGEOMETRY is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 
26 #define MISSING_ELEMENT -99
27 #define TRUE 1
28 #define FALSE 0
29 
30 /* the following lines define the attribute types
31  * for a POINT, LINE and POLYGON
32  *
33  */
34 
35 typedef struct {
36  long index;
37  double x;
38  double y;
39  double z;
40  //attribute_point *attributes;
41 
42 } POINT;
43 
44 typedef struct {
45  long index;
48  //long begin_point_index;
49  //long end_point_index;
50  double length2d;
51  //attribute_line *attributes;
52 } LINE;
53 
54 
55 typedef struct {
56  long index;
57  double area2D;
60  //attribute_polygon *attributes;
61 } POLYGON;
62 
63 
64 typedef struct {
65  short isdynamic;
66  long nh,nl;
68 } LINEVECTOR;
69 
70 
71 
72 typedef struct {
73  short isdynamic;
74  long nh,nl;
77 
78 /* array of attributes for each point,lines, polygons*/
79 
80 typedef void attribute_point;
81 typedef void attribute_line;
82 typedef void attribute_polygon;
83 
84 
85 typedef struct {
86 
89 
91 
92 
93 
94 
95 typedef struct {
96  short isdynamic;
97  long nh,nl;
100 
101 
102 typedef struct {
103  short isdynamic;
104  long nh,nl;
107 
108 
109 typedef struct {
110  short isdynamic;
111  long nh,nl;
114 
115 
116 /* function header */
117 
118 POINT *new_point(long index,double x,double y,double z);
119 
120 LINE *new_line_from_points(long index, POINT *P1,POINT *P2);
121 
123 
124 LINEVECTOR *new_linevector(long nh);
125