-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathincg_mesh.h
52 lines (38 loc) · 853 Bytes
/
incg_mesh.h
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
typedef struct {
long int id;
double x,y,z;
} vertex_t;
typedef struct triangle_s triangle_t; // forward declaration of triangle
typedef struct {
long int id;
vertex_t *va, *vb;
triangle_t *tl, *tr;
} edge_t;
struct triangle_s {
long int id;
edge_t *e1, *e2, *e3;
char d1,d2,d3,foo;
};
typedef struct {
long int nv,ne,nt;
vertex_t *v;
edge_t *e;
triangle_t *t;
} mesh_t;
struct ingeom_tris_s {
int np,nt;
int *icon;
double *x;
};
struct ingeom_sphere_s {
int np,nt;
int *icon;
double *x;
int ns;
double x0[3],x1[3],x2[3],x3[3];
};
// -------------------- function prototypes/signatures --------------------
int incg_MakeMesh_OneTriangle( mesh_t* m );
int incg_MakeMesh_TwoTriangles( mesh_t* m );
int incg_MakeMesh_Cube( mesh_t* m );
int incg_RefineMesh_Uniform( mesh_t* m );