1 /* 2 * File: vertex.h 3 * 4 * Description: header for vertex.c 5 * 6 * 7 * This source code is part of kludge3d, and is released under the 8 * GNU General Public License. 9 * 10 * 11 */ 12 13 #ifndef VERTEX_H 14 #define VERTEX_H 15 16 #include <GL/gl.h> 17 #include <GL/glu.h> 18 #include <glib.h> 19 20 #include "geo.h" 21 #include "mesh.h" 22 #include "globals.h" 23 24 #define POINTS_FUDGE_FACTOR 0.005 /* half a centimeter of leeway */ 25 26 27 Vertex* vertex_new( void ); 28 void vertex_delete( Vertex *v ) ; 29 void vertex_remove( Vertex *v ) ; 30 Vertex* vertex_dup( Vertex* p ); 31 32 /* called only by poly.c */ 33 void vertex_add_poly( Vertex *v, Poly *p ) ; 34 /* called only by poly.c */ 35 void vertex_remove_poly( Vertex *v, Poly *p ) ; 36 int vertex_has_poly( Vertex *v, Poly *p ) ; 37 int vertex_is_in_use( Vertex *v ); 38 39 void vertex_move( Vertex *v, float deltaX, float deltaY, float deltaZ ) ; 40 41 void vertices_find_mean( GSList * plist, Vertex* average ) ; 42 float vertices_find_angle( Vertex *c, Vertex *v1, Vertex *v2 ); 43 44 gint vertices_isIdentical( Vertex* p1, Vertex* p2 ) ; 45 gint vertices_isEqual( Vertex* p1, Vertex* p2 ) ; 46 gint vertices_isNotEqual( Vertex* p1, Vertex* p2 ) ; 47 48 GSList * verts_get_polys_unique( GSList *verts ) ; 49 GSList * verts_get_polys( GSList *verts ) ; 50 51 #endif 52