3
* Mesa 3-D graphics library
5
* Copyright (C) 1995-2000 Brian Paul
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Library General Public License for more details.
17
* You should have received a copy of the GNU Library General Public
18
* License along with this library; if not, write to the Free
19
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
* This file is part of the polygon tesselation code contributed by
35
#define EPSILON 1e-06 /* epsilon for double precision compares */
45
typedef struct callbacks_str
47
void (GLCALLBACK * begin) (GLenum mode);
48
void (GLCALLBACK * edgeFlag) (GLboolean flag);
49
void (GLCALLBACK * vertex) (GLvoid * v);
50
void (GLCALLBACK * end) (void);
51
void (GLCALLBACK * error) (GLenum err);
55
typedef struct vertex_str
61
struct vertex_str *shadow_vertex;
62
struct vertex_str *next, *previous;
66
typedef struct contour_str
72
struct vertex_str *vertices, *last_vertex;
73
struct contour_str *next, *previous;
77
typedef struct polygon_str
83
struct vertex_str *vertices, *last_vertex;
89
tess_contour *contours, *last_contour;
91
tess_callbacks callbacks;
92
tess_polygon *current_polygon;
95
projection_type projection;
99
extern void tess_call_user_error(GLUtriangulatorObj *, GLenum);
100
extern void tess_test_polygon(GLUtriangulatorObj *);
101
extern void tess_find_contour_hierarchies(GLUtriangulatorObj *);
102
extern void tess_handle_holes(GLUtriangulatorObj *);
103
extern void tess_tesselate(GLUtriangulatorObj *);
104
extern void tess_tesselate_with_edge_flag(GLUtriangulatorObj *);