SGI SI GLU library
[mesa.git] / src / glu / sgi / libnurbs / internals / monotonizer.h
1 /**************************************************************************
2 * *
3 * Copyright (C) 1999, Silicon Graphics, Inc. *
4 * *
5 * These coded instructions, statements, and computer programs contain *
6 * unpublished proprietary information of Silicon Graphics, Inc., and *
7 * are protected by Federal copyright law. They may not be disclosed *
8 * to third parties or copied or duplicated in any form, in whole or *
9 * in part, without the prior written consent of Silicon Graphics, Inc. *
10 * *
11 **************************************************************************/
12
13 /*
14 * monotonizer.h
15 *
16 * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monotonizer.h,v 1.1 2001/03/17 00:25:41 brianp Exp $
17 */
18
19 #ifndef __glumonotonizer_h_
20 #define __glumonotonizer_h_
21
22 #include "mysetjmp.h"
23 #include "types.h"
24
25 class Arc;
26 class ArcTessellator;
27 class Pool;
28 class Bin;
29 class PwlArcPool;
30 class Mapdesc;
31
32 class Monotonizer {
33 ArcTessellator& arctessellator;
34 Pool& arcpool;
35 Pool& pwlarcpool;
36 jmp_buf& nurbsJmpBuf;
37
38 enum dir { down, same, up, none };
39 void tessellate( Arc *, REAL );
40 void monotonize( Arc *, Bin & );
41 int isMonotone( Arc * );
42 public:
43 Monotonizer( ArcTessellator& at, Pool& ap, Pool& p, jmp_buf& j )
44 : arctessellator(at), arcpool(ap), pwlarcpool(p), nurbsJmpBuf(j) {}
45 int decompose( Bin &, REAL );
46 };
47 #endif /* __glumonotonizer_h_ */