1 /* $Id: tess.h,v 1.18 2001/03/20 17:56:10 brianp Exp $ */
4 * Mesa 3-D graphics library
6 * Copyright (C) 1995-2000 Brian Paul
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 * This file is part of the polygon tesselation code contributed by
36 #define EPSILON 1e-06 /* epsilon for double precision compares */
46 typedef struct callbacks_str
48 void (GLCALLBACK
* begin
) (GLenum mode
);
49 void (GLCALLBACK
* edgeFlag
) (GLboolean flag
);
50 void (GLCALLBACK
* vertex
) (GLvoid
* v
);
51 void (GLCALLBACK
* end
) (void);
52 void (GLCALLBACK
* error
) (GLenum err
);
56 typedef struct vertex_str
62 struct vertex_str
*shadow_vertex
;
63 struct vertex_str
*next
, *previous
;
67 typedef struct contour_str
73 struct vertex_str
*vertices
, *last_vertex
;
74 struct contour_str
*next
, *previous
;
78 typedef struct polygon_str
84 struct vertex_str
*vertices
, *last_vertex
;
90 tess_contour
*contours
, *last_contour
;
92 tess_callbacks callbacks
;
93 tess_polygon
*current_polygon
;
96 projection_type projection
;
100 extern void tess_call_user_error(GLUtriangulatorObj
*, GLenum
);
101 extern void tess_test_polygon(GLUtriangulatorObj
*);
102 extern void tess_find_contour_hierarchies(GLUtriangulatorObj
*);
103 extern void tess_handle_holes(GLUtriangulatorObj
*);
104 extern void tess_tesselate(GLUtriangulatorObj
*);
105 extern void tess_tesselate_with_edge_flag(GLUtriangulatorObj
*);