ReactOS 0.4.16-dev-297-gc569aee
nurbstess.h
Go to the documentation of this file.
1/*
2 * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3 * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice including the dates of first publication and
13 * either this permission notice or a reference to
14 * http://oss.sgi.com/projects/FreeB/
15 * shall be included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 *
25 * Except as contained in this notice, the name of Silicon Graphics, Inc.
26 * shall not be used in advertising or otherwise to promote the sale, use or
27 * other dealings in this Software without prior written authorization from
28 * Silicon Graphics, Inc.
29 */
30
31/*
32 * nurbstess.h
33 *
34 */
35
36#ifndef __glunurbstess_h_
37#define __glunurbstess_h_
38
39//#include "mysetjmp.h"
40#include "subdivider.h"
41#include "renderhints.h"
42#include "backend.h"
43#include "maplist.h"
44#include "reader.h"
45//#include "nurbsconsts.h"
46
47struct Knotvector;
48class Quilt;
49class DisplayList;
52
54public:
57 virtual ~NurbsTessellator( void );
58
59 void getnurbsproperty( long, INREAL * );
60 void getnurbsproperty( long, long, INREAL * );
61 void setnurbsproperty( long, INREAL );
62 void setnurbsproperty( long, long, INREAL );
63 void setnurbsproperty( long, long, INREAL * );
64 void setnurbsproperty( long, long, INREAL *, long, long );
65
66 // called before a tessellation begins/ends
67 virtual void bgnrender( void );
68 virtual void endrender( void );
69
70 // called to make a display list of the output vertices
71 virtual void makeobj( int n );
72 virtual void closeobj( void );
73
74 // called when a error occurs
75 virtual void errorHandler( int );
76
77 void bgnsurface( long );
78 void endsurface( void );
79 void bgntrim( void );
80 void endtrim( void );
81 void bgncurve( long );
82 void endcurve( void );
83 void pwlcurve( long, INREAL[], long, long );
84 void nurbscurve( long, INREAL[], long, INREAL[], long, long );
85 void nurbssurface( long, INREAL[], long, INREAL[], long, long,
86 INREAL[], long, long, long );
87
88 void defineMap( long, long, long );
89 void redefineMaps( void );
90
91 // recording of input description
92 void discardRecording( void * );
93 void * beginRecording( void );
94 void endRecording( void );
95 void playRecording( void * );
96
97 //for optimizing untrimmed nurbs in the case of domain distance sampling
101
102
103protected:
107
108private:
109
110 void resetObjects( void );
111 int do_check_knots( Knotvector *, const char * );
112 void do_nurbserror( int );
113 void do_bgncurve( O_curve * );
114 void do_endcurve( void );
115 void do_freeall( void );
116 void do_freecurveall( O_curve * );
117 void do_freebgntrim( O_trim * );
118 void do_freebgncurve( O_curve * );
119 void do_freepwlcurve( O_pwlcurve * );
123 void do_bgnsurface( O_surface * );
124 void do_endsurface( void );
125 void do_bgntrim( O_trim * );
126 void do_endtrim( void );
127 void do_pwlcurve( O_pwlcurve * );
128 void do_nurbscurve( O_nurbscurve * );
133
135 JumpBuffer* jumpbuffer;
143public:
145private:
147
148 int inSurface; /* bgnsurface seen */
149 int inCurve; /* bgncurve seen */
150 int inTrim; /* bgntrim seen */
151 int isCurveModified; /* curve changed */
152 int isTrimModified; /* trim curves changed */
153 int isSurfaceModified; /* surface changed */
154 int isDataValid; /* all data is good */
155 int numTrims; /* valid trim regions */
157
158 O_trim** nextTrim; /* place to link o_trim */
159 O_curve** nextCurve; /* place to link o_curve */
160 O_nurbscurve** nextNurbscurve; /* place to link o_nurbscurve */
161 O_pwlcurve** nextPwlcurve; /* place to link o_pwlcurve */
162 O_nurbssurface** nextNurbssurface; /* place to link o_nurbssurface */
163
167
169
170};
171
172#endif /* __glunurbstess_h_ */
Pool o_nurbssurfacePool
Definition: nurbstess.h:141
void set_domain_distance_v_rate(REAL v_rate)
Definition: nurbstess.cc:59
int do_check_knots(Knotvector *, const char *)
Definition: nurbstess.cc:678
void endcurve(void)
void do_freepwlcurve(O_pwlcurve *)
Definition: nurbstess.cc:450
void do_freebgnsurface(O_surface *)
Definition: nurbstess.cc:115
O_trim * currentTrim
Definition: nurbstess.h:165
void do_freeall(void)
Definition: nurbstess.cc:315
Subdivider subdivider
Definition: nurbstess.h:134
void do_setnurbsproperty2(Property *)
Definition: nurbstess.cc:657
O_pwlcurve ** nextPwlcurve
Definition: nurbstess.h:161
void do_freebgntrim(O_trim *)
Definition: nurbstess.cc:376
void bgnsurface(long)
void do_endsurface(void)
Definition: nurbstess.cc:239
void do_endtrim(void)
Definition: nurbstess.cc:422
void do_pwlcurve(O_pwlcurve *)
Definition: nurbstess.cc:468
virtual void bgnrender(void)
Definition: nurbstess.cc:93
Backend backend
Definition: nurbstess.h:106
void do_freenurbsproperty(Property *)
Definition: nurbstess.cc:636
void do_bgntrim(O_trim *)
Definition: nurbstess.cc:389
void getnurbsproperty(long, INREAL *)
void discardRecording(void *)
void * beginRecording(void)
void do_freebgncurve(O_curve *)
Definition: nurbstess.cc:456
O_curve ** nextCurve
Definition: nurbstess.h:159
O_curve * currentCurve
Definition: nurbstess.h:166
virtual void endrender(void)
Definition: nurbstess.cc:101
void do_nurbscurve(O_nurbscurve *)
Definition: nurbstess.cc:534
O_nurbssurface ** nextNurbssurface
Definition: nurbstess.h:162
virtual ~NurbsTessellator(void)
virtual void makeobj(int n)
Definition: nurbstess.cc:77
JumpBuffer * jumpbuffer
Definition: nurbstess.h:135
void do_bgnsurface(O_surface *)
Definition: nurbstess.cc:128
Pool o_nurbscurvePool
Definition: nurbstess.h:137
O_nurbscurve ** nextNurbscurve
Definition: nurbstess.h:160
void endRecording(void)
void endtrim(void)
void set_is_domain_distance_sampling(int flag)
Definition: nurbstess.cc:65
virtual void closeobj(void)
Definition: nurbstess.cc:85
void do_setnurbsproperty(Property *)
Definition: nurbstess.cc:649
void do_freenurbssurface(O_nurbssurface *)
Definition: nurbstess.cc:585
Renderhints renderhints
Definition: nurbstess.h:104
void redefineMaps(void)
void set_domain_distance_u_rate(REAL u_rate)
Definition: nurbstess.cc:53
void nurbscurve(long, INREAL[], long, INREAL[], long, long)
void bgncurve(long)
void do_nurbssurface(O_nurbssurface *)
Definition: nurbstess.cc:598
void bgntrim(void)
Maplist maplist
Definition: nurbstess.h:105
O_trim ** nextTrim
Definition: nurbstess.h:158
void defineMap(long, long, long)
void pwlcurve(long, INREAL[], long, long)
void nurbssurface(long, INREAL[], long, INREAL[], long, long, INREAL[], long, long, long)
void do_bgncurve(O_curve *)
Definition: nurbstess.cc:154
O_surface * currentSurface
Definition: nurbstess.h:164
void setnurbsproperty(long, INREAL)
void do_freenurbscurve(O_nurbscurve *)
Definition: nurbstess.cc:520
void do_endcurve(void)
Definition: nurbstess.cc:187
TrimVertexPool extTrimVertexPool
Definition: nurbstess.h:146
void playRecording(void *)
void do_nurbserror(int)
Definition: nurbstess.cc:672
DisplayList * dl
Definition: nurbstess.h:168
void do_freecurveall(O_curve *)
Definition: nurbstess.cc:341
void resetObjects(void)
Definition: nurbstess.cc:71
void endsurface(void)
Definition: bufpool.h:50
Definition: quilt.h:64
#define INREAL
Definition: types.h:40
float REAL
Definition: types.h:41
GLdouble n
Definition: glext.h:7729
const GLubyte * c
Definition: glext.h:8905
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
#define e
Definition: ke_i.h:82
static ISAXErrorHandler errorHandler
Definition: saxreader.c:1465
Definition: reader.h:55
Definition: reader.h:94