1 /*
2  * Phlipple
3  * Copyright (C) Remigiusz Dybka 2011 <remigiusz.dybka@gmail.com>
4  *
5  Phlipple is free software: you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Phlipple is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  See the GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef VERTEX_H_
20 #define VERTEX_H_
21 
22 #include "quad.h"
23 
24 #define MAX_HARDLINKED_VERTS 	6
25 #define MAX_QUADS				12
26 
27 struct _Vertex
28 {
29 	int x;
30 	int y;
31 	int z;
32 	struct _Vertex *hardLinked[MAX_HARDLINKED_VERTS];
33 	struct _Quad *quads[MAX_QUADS];
34 	int nLinkedQuads;
35 	int nHardLinked;
36 };
37 
38 typedef struct _Vertex Vertex;
39 
40 Vertex *vertex_create(int x, int y, int z);
41 
42 void vertex_destroy(Vertex *);
43 void vertex_link(Vertex *, Vertex *);
44 int vertex_isLinked(Vertex *, Vertex *);
45 int vertex_isEqualVertex(Vertex *, Vertex *);
46 int vertex_isEqualInt(Vertex *, int []);
47 
48 
49 #endif /* VERTEX_H_ */
50