source: issm/trunk-jpl/src/c/objects/Bamg/Geometry.h@ 12218

Last change on this file since 12218 was 12218, checked in by Mathieu Morlighem, 13 years ago

renamed QuadTree BamgQuadtree to avoid conflicts with Kriging's Quadtree

File size: 2.1 KB
Line 
1#ifndef _GEOMETRY_H_
2#define _GEOMETRY_H_
3
4#include "./include.h"
5#include "./BamgGeom.h"
6#include "./BamgOpts.h"
7#include "./GeomVertex.h"
8#include "./GeomEdge.h"
9#include "./Curve.h"
10
11namespace bamg {
12
13 class Triangle;
14 class BamgQuadtree;
15 class GeomSubDomain;
16 class Edge;
17
18 class Geometry {
19
20 public:
21
22 long NbRef; // counter of ref on the this class if 0 we can delete
23 long nbv; // number of vertices
24 long nbe; // number of edges
25 long nbsubdomains;
26 long nbcurves;
27 GeomVertex *vertices;
28 GeomEdge *edges;
29 BamgQuadtree *quadtree;
30 GeomSubDomain *subdomains;
31 Curve *curves;
32 R2 pmin,pmax; // domain extrema coordinates
33 double coefIcoor; // coef to integer Icoor1;
34 double MaxCornerAngle;
35
36 //Constructor/Destructors
37 ~Geometry();
38 Geometry();
39 Geometry(const Geometry & Gh);
40 Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts);
41
42 //Operators
43 const GeomVertex &operator[](long i) const { return vertices[i]; };
44 GeomVertex &operator[](long i) { return vertices[i]; };
45 const GeomEdge &operator()(long i) const { return edges[i]; };
46 GeomEdge &operator()(long i) { return edges[i]; };
47
48 //Methods
49 void Echo();
50 I2 R2ToI2(const R2 &P) const;
51 double MinimalHmin();
52 double MaximalHmax();
53 void ReadGeometry(BamgGeom *bamggeom, BamgOpts*bamgopts);
54 void Init(void);
55 void PostRead();
56 long GetId(const GeomVertex &t) const;
57 long GetId(const GeomVertex *t) const;
58 long GetId(const GeomEdge &t) const;
59 long GetId(const GeomEdge *t) const;
60 long GetId(const Curve *c) const;
61 void UnMarkEdges();
62 GeomEdge *ProjectOnCurve(const Edge &,double,BamgVertex &,VertexOnGeom &) const;
63 GeomEdge *Containing(const R2 P, GeomEdge *start) const;
64 void WriteGeometry(BamgGeom *bamggeom, BamgOpts*bamgopts);
65 };
66
67}
68#endif
Note: See TracBrowser for help on using the repository browser.