ReactOS 0.4.16-dev-401-g45b008d
ArcTessellator Class Reference

#include <arctess.h>

Collaboration diagram for ArcTessellator:

Public Member Functions

 ArcTessellator (TrimVertexPool &, Pool &)
 
 ~ArcTessellator (void)
 
void bezier (Arc_ptr, REAL, REAL, REAL, REAL)
 
void pwl (Arc_ptr, REAL, REAL, REAL, REAL, REAL)
 
void pwl_left (Arc_ptr, REAL, REAL, REAL, REAL)
 
void pwl_right (Arc_ptr, REAL, REAL, REAL, REAL)
 
void pwl_top (Arc_ptr, REAL, REAL, REAL, REAL)
 
void pwl_bottom (Arc_ptr, REAL, REAL, REAL, REAL)
 
void tessellateLinear (Arc_ptr, REAL, REAL, int)
 
void tessellateNonlinear (Arc_ptr, REAL, REAL, int)
 

Static Private Member Functions

static void trim_power_coeffs (BezierArc *, REAL[MAXORDER], int)
 

Private Attributes

Poolpwlarcpool
 
TrimVertexPooltrimvertexpool
 

Static Private Attributes

static const REAL gl_Bernstein [][MAXORDER][MAXORDER]
 

Detailed Description

Definition at line 47 of file arctess.h.

Constructor & Destructor Documentation

◆ ArcTessellator()

ArcTessellator::ArcTessellator ( TrimVertexPool t,
Pool p 
)

Definition at line 59 of file arctess.cc.

61{
62}
TrimVertexPool & trimvertexpool
Definition: arctess.h:62
Pool & pwlarcpool
Definition: arctess.h:61
GLdouble GLdouble t
Definition: gl.h:2047
GLfloat GLfloat p
Definition: glext.h:8902

◆ ~ArcTessellator()

ArcTessellator::~ArcTessellator ( void  )

Definition at line 69 of file arctess.cc.

70{
71}

Member Function Documentation

◆ bezier()

void ArcTessellator::bezier ( Arc_ptr  ,
REAL  ,
REAL  ,
REAL  ,
REAL   
)

Definition at line 79 of file arctess.cc.

80{
81 assert( arc != 0 );
82 assert( ! arc->isTessellated() );
83
84#ifndef NDEBUG
85 switch( arc->getside() ) {
86 case arc_left:
87 assert( s1 == s2 );
88 assert( t2 < t1 );
89 break;
90 case arc_right:
91 assert( s1 == s2 );
92 assert( t1 < t2 );
93 break;
94 case arc_top:
95 assert( t1 == t2 );
96 assert( s2 < s1 );
97 break;
98 case arc_bottom:
99 assert( t1 == t2 );
100 assert( s1 < s2 );
101 break;
102 case arc_none:
103 (void) abort();
104 break;
105 }
106#endif
107
109 arc->pwlArc = new(pwlarcpool) PwlArc( 2, p );
110 p[0].param[0] = s1;
111 p[0].param[1] = t1;
112 p[1].param[0] = s2;
113 p[1].param[1] = t2;
114 assert( (s1 == s2) || (t1 == t2) );
115 arc->setbezier();
116}
Definition: pwlarc.h:44
TrimVertex * get(int)
@ arc_left
Definition: arc.h:52
@ arc_none
Definition: arc.h:52
@ arc_bottom
Definition: arc.h:52
@ arc_top
Definition: arc.h:52
@ arc_right
Definition: arc.h:52
#define assert(x)
Definition: debug.h:53
#define abort()
Definition: i386-dis.c:34
struct S1 s1
struct S2 s2

Referenced by Subdivider::join_s(), Subdivider::join_t(), Subdivider::makeBorderTrim(), and Subdivider::makePatchBoundary().

◆ pwl()

void ArcTessellator::pwl ( Arc_ptr  ,
REAL  ,
REAL  ,
REAL  ,
REAL  ,
REAL   
)

Definition at line 243 of file arctess.cc.

244{
245
246/* if(rate <= 0.06) rate = 0.06;*/
247
248 int snsteps = 1 + (int) (glu_abs(s2 - s1) / rate );
249 int tnsteps = 1 + (int) (glu_abs(t2 - t1) / rate );
250 int nsteps = max(1,max( snsteps, tnsteps ));
251
252 REAL sstepsize = (s2 - s1) / (REAL) nsteps;
253 REAL tstepsize = (t2 - t1) / (REAL) nsteps;
254 TrimVertex *newvert = trimvertexpool.get( nsteps+1 );
255 long i;
256 for( i = 0; i < nsteps; i++ ) {
257 newvert[i].param[0] = s1;
258 newvert[i].param[1] = t1;
259 s1 += sstepsize;
260 t1 += tstepsize;
261 }
262 newvert[i].param[0] = s2;
263 newvert[i].param[1] = t2;
264
265 /* arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_bottom ); */
266 arc->pwlArc = new(pwlarcpool) PwlArc( nsteps+1, newvert );
267
268 arc->clearbezier();
269 arc->clearside( );
270}
REAL param[2]
Definition: trimvertex.h:45
float REAL
Definition: types.h:41
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int rate
Definition: pcmconverter.c:97
REAL glu_abs(REAL x)
Definition: simplemath.h:50
#define max(a, b)
Definition: svc.c:63

Referenced by tessellateLinear().

◆ pwl_bottom()

void ArcTessellator::pwl_bottom ( Arc_ptr  ,
REAL  ,
REAL  ,
REAL  ,
REAL   
)

Definition at line 214 of file arctess.cc.

215{
216 assert( s1 < s2 );
217
218/* if(rate <= 0.06) rate = 0.06;*/
219
220/* int nsteps = 1 + (int) ((s2 - s1) / rate ); */
221 int nsteps = steps_function(s2,s1,rate);
222 REAL stepsize = (s2 - s1) / (REAL) nsteps;
223
224 TrimVertex *newvert = trimvertexpool.get( nsteps+1 );
225 int i;
226 for( i = 0; i < nsteps; i++ ) {
227 newvert[i].param[0] = s1;
228 newvert[i].param[1] = t;
229 s1 += stepsize;
230 }
231 newvert[i].param[0] = s2;
232 newvert[i].param[1] = t;
233
234 arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_bottom );
235}
#define steps_function(large, small, rate)
Definition: arctess.cc:52

Referenced by Subdivider::join_t(), Subdivider::tessellate(), and tessellateLinear().

◆ pwl_left()

void ArcTessellator::pwl_left ( Arc_ptr  ,
REAL  ,
REAL  ,
REAL  ,
REAL   
)

Definition at line 125 of file arctess.cc.

126{
127 assert( t2 < t1 );
128
129/* if(rate <= 0.06) rate = 0.06;*/
130/* int nsteps = 1 + (int) ((t1 - t2) / rate ); */
131 int nsteps = steps_function(t1, t2, rate);
132
133
134 REAL stepsize = (t1 - t2) / (REAL) nsteps;
135
136 TrimVertex *newvert = trimvertexpool.get( nsteps+1 );
137 int i;
138 for( i = nsteps; i > 0; i-- ) {
139 newvert[i].param[0] = s;
140 newvert[i].param[1] = t2;
141 t2 += stepsize;
142 }
143 newvert[i].param[0] = s;
144 newvert[i].param[1] = t1;
145
146 arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_left );
147}
GLdouble s
Definition: gl.h:2039

Referenced by Subdivider::join_s(), Subdivider::tessellate(), and tessellateLinear().

◆ pwl_right()

void ArcTessellator::pwl_right ( Arc_ptr  ,
REAL  ,
REAL  ,
REAL  ,
REAL   
)

Definition at line 155 of file arctess.cc.

156{
157 assert( t1 < t2 );
158
159/* if(rate <= 0.06) rate = 0.06;*/
160
161/* int nsteps = 1 + (int) ((t2 - t1) / rate ); */
162 int nsteps = steps_function(t2,t1,rate);
163 REAL stepsize = (t2 - t1) / (REAL) nsteps;
164
165 TrimVertex *newvert = trimvertexpool.get( nsteps+1 );
166 int i;
167 for( i = 0; i < nsteps; i++ ) {
168 newvert[i].param[0] = s;
169 newvert[i].param[1] = t1;
170 t1 += stepsize;
171 }
172 newvert[i].param[0] = s;
173 newvert[i].param[1] = t2;
174
175 arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_right );
176}

Referenced by Subdivider::join_s(), Subdivider::tessellate(), and tessellateLinear().

◆ pwl_top()

void ArcTessellator::pwl_top ( Arc_ptr  ,
REAL  ,
REAL  ,
REAL  ,
REAL   
)

Definition at line 185 of file arctess.cc.

186{
187 assert( s2 < s1 );
188
189/* if(rate <= 0.06) rate = 0.06;*/
190
191/* int nsteps = 1 + (int) ((s1 - s2) / rate ); */
192 int nsteps = steps_function(s1,s2,rate);
193 REAL stepsize = (s1 - s2) / (REAL) nsteps;
194
195 TrimVertex *newvert = trimvertexpool.get( nsteps+1 );
196 int i;
197 for( i = nsteps; i > 0; i-- ) {
198 newvert[i].param[0] = s2;
199 newvert[i].param[1] = t;
200 s2 += stepsize;
201 }
202 newvert[i].param[0] = s1;
203 newvert[i].param[1] = t;
204
205 arc->makeSide( new(pwlarcpool) PwlArc( nsteps+1, newvert ), arc_top );
206}

Referenced by Subdivider::join_t(), Subdivider::tessellate(), and tessellateLinear().

◆ tessellateLinear()

void ArcTessellator::tessellateLinear ( Arc_ptr  ,
REAL  ,
REAL  ,
int   
)

Definition at line 279 of file arctess.cc.

280{
281 assert( arc->pwlArc == NULL );
282 REAL s1, s2, t1, t2;
283
284 //we don't need to scale by arc_stepsize if the trim curve
285 //is piecewise linear. Reason: In pwl_right, pwl_left, pwl_top, pwl_left,
286 //and pwl, the nsteps is computed by deltaU (or V) /stepsize.
287 //The quantity deltaU/arc_stepsize doesn't have any meaning. And
288 //it causes problems: see bug 517641
289 REAL stepsize = geo_stepsize; /* * arc_stepsize*/;
290
291 BezierArc *b = arc->bezierArc;
292
293 if( isrational ) {
294 s1 = b->cpts[0] / b->cpts[2];
295 t1 = b->cpts[1] / b->cpts[2];
296 s2 = b->cpts[b->stride+0] / b->cpts[b->stride+2];
297 t2 = b->cpts[b->stride+1] / b->cpts[b->stride+2];
298 } else {
299 s1 = b->cpts[0];
300 t1 = b->cpts[1];
301 s2 = b->cpts[b->stride+0];
302 t2 = b->cpts[b->stride+1];
303 }
304 if( s1 == s2 )
305 if( t1 < t2 )
306 pwl_right( arc, s1, t1, t2, stepsize );
307 else
308 pwl_left( arc, s1, t1, t2, stepsize );
309 else if( t1 == t2 )
310 if( s1 < s2 )
311 pwl_bottom( arc, t1, s1, s2, stepsize );
312 else
313 pwl_top( arc, t1, s1, s2, stepsize );
314 else
315 pwl( arc, s1, s2, t1, t2, stepsize );
316}
void pwl_right(Arc_ptr, REAL, REAL, REAL, REAL)
Definition: arctess.cc:155
void pwl_top(Arc_ptr, REAL, REAL, REAL, REAL)
Definition: arctess.cc:185
void pwl_bottom(Arc_ptr, REAL, REAL, REAL, REAL)
Definition: arctess.cc:214
void pwl_left(Arc_ptr, REAL, REAL, REAL, REAL)
Definition: arctess.cc:125
void pwl(Arc_ptr, REAL, REAL, REAL, REAL, REAL)
Definition: arctess.cc:243
#define NULL
Definition: types.h:112
GLboolean GLboolean GLboolean b
Definition: glext.h:6204

Referenced by Subdivider::tessellate().

◆ tessellateNonlinear()

void ArcTessellator::tessellateNonlinear ( Arc_ptr  ,
REAL  ,
REAL  ,
int   
)

Definition at line 324 of file arctess.cc.

325{
326 assert( arc->pwlArc == NULL );
327
328 REAL stepsize = geo_stepsize * arc_stepsize;
329
330 BezierArc *bezierArc = arc->bezierArc;
331
332 REAL size; //bounding box size of the curve in UV
333 {
334 int i,j;
335 REAL min_u, min_v, max_u,max_v;
336 min_u = max_u = bezierArc->cpts[0];
337 min_v = max_v = bezierArc->cpts[1];
338 for(i=1, j=bezierArc->stride; i<bezierArc->order; i++, j+= bezierArc->stride)
339 {
340 if(bezierArc->cpts[j] < min_u)
341 min_u = bezierArc->cpts[j];
342 if(bezierArc->cpts[j] > max_u)
343 max_u = bezierArc->cpts[j];
344 if(bezierArc->cpts[j+1] < min_v)
345 min_v = bezierArc->cpts[j+1];
346 if(bezierArc->cpts[j+1] > max_v)
347 max_v = bezierArc->cpts[j+1];
348 }
349
350 size = max_u - min_u;
351 if(size < max_v - min_v)
352 size = max_v - min_v;
353 }
354
355 /*int nsteps = 1 + (int) (1.0/stepsize);*/
356
357 int nsteps = (int) (size/stepsize);
358 if(nsteps <=0)
359 nsteps=1;
360
361 TrimVertex *vert = trimvertexpool.get( nsteps+1 );
362 REAL dp = 1.0/nsteps;
363
364
365 arc->pwlArc = new(pwlarcpool) PwlArc();
366 arc->pwlArc->pts = vert;
367
368 if( isrational ) {
369 REAL pow_u[MAXORDER], pow_v[MAXORDER], pow_w[MAXORDER];
370 trim_power_coeffs( bezierArc, pow_u, 0 );
371 trim_power_coeffs( bezierArc, pow_v, 1 );
372 trim_power_coeffs( bezierArc, pow_w, 2 );
373
374 /* compute first point exactly */
375 REAL *b = bezierArc->cpts;
376 vert->param[0] = b[0]/b[2];
377 vert->param[1] = b[1]/b[2];
378
379 /* strength reduction on p = dp * step would introduce error */
380 int step;
381#ifndef NOELIMINATION
382 int ocanremove = 0;
383#endif
384 long order = bezierArc->order;
385 for( step=1, ++vert; step<nsteps; step++, vert++ ) {
386 REAL p = dp * step;
387 REAL u = pow_u[0];
388 REAL v = pow_v[0];
389 REAL w = pow_w[0];
390 for( int i = 1; i < order; i++ ) {
391 u = u * p + pow_u[i];
392 v = v * p + pow_v[i];
393 w = w * p + pow_w[i];
394 }
395 vert->param[0] = u/w;
396 vert->param[1] = v/w;
397#ifndef NOELIMINATION
398 REAL ds = glu_abs(vert[0].param[0] - vert[-1].param[0]);
399 REAL dt = glu_abs(vert[0].param[1] - vert[-1].param[1]);
400 int canremove = (ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0;
401 REAL ods=0.0, odt=0.0;
402
403 if( ocanremove && canremove ) {
404 REAL nds = ds + ods;
405 REAL ndt = dt + odt;
406 if( nds<geo_stepsize && ndt<geo_stepsize ) {
407 // remove previous point
408 --vert;
409 vert[0].param[0] = vert[1].param[0];
410 vert[0].param[1] = vert[1].param[1];
411 ods = nds;
412 odt = ndt;
413 ocanremove = 1;
414 } else {
415 ocanremove = canremove;
416 ods = ds;
417 odt = dt;
418 }
419 } else {
420 ocanremove = canremove;
421 ods = ds;
422 odt = dt;
423 }
424#endif
425 }
426
427 /* compute last point exactly */
428 b += (order - 1) * bezierArc->stride;
429 vert->param[0] = b[0]/b[2];
430 vert->param[1] = b[1]/b[2];
431
432 } else {
433 REAL pow_u[MAXORDER], pow_v[MAXORDER];
434 trim_power_coeffs( bezierArc, pow_u, 0 );
435 trim_power_coeffs( bezierArc, pow_v, 1 );
436
437 /* compute first point exactly */
438 REAL *b = bezierArc->cpts;
439 vert->param[0] = b[0];
440 vert->param[1] = b[1];
441
442 /* strength reduction on p = dp * step would introduce error */
443 int step;
444#ifndef NOELIMINATION
445 int ocanremove = 0;
446#endif
447 long order = bezierArc->order;
448 for( step=1, ++vert; step<nsteps; step++, vert++ ) {
449 REAL p = dp * step;
450 REAL u = pow_u[0];
451 REAL v = pow_v[0];
452 for( int i = 1; i < bezierArc->order; i++ ) {
453 u = u * p + pow_u[i];
454 v = v * p + pow_v[i];
455 }
456 vert->param[0] = u;
457 vert->param[1] = v;
458#ifndef NOELIMINATION
459 REAL ds = glu_abs(vert[0].param[0] - vert[-1].param[0]);
460 REAL dt = glu_abs(vert[0].param[1] - vert[-1].param[1]);
461 int canremove = (ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0;
462 REAL ods=0.0, odt=0.0;
463
464 if( ocanremove && canremove ) {
465 REAL nds = ds + ods;
466 REAL ndt = dt + odt;
467 if( nds<geo_stepsize && ndt<geo_stepsize ) {
468 // remove previous point
469 --vert;
470 vert[0].param[0] = vert[1].param[0];
471 vert[0].param[1] = vert[1].param[1];
472 ods = nds;
473 odt = ndt;
474 ocanremove = 1;
475 } else {
476 ocanremove = canremove;
477 ods = ds;
478 odt = dt;
479 }
480 } else {
481 ocanremove = canremove;
482 ods = ds;
483 odt = dt;
484 }
485#endif
486 }
487
488 /* compute last point exactly */
489 b += (order - 1) * bezierArc->stride;
490 vert->param[0] = b[0];
491 vert->param[1] = b[1];
492 }
493 arc->pwlArc->npts = vert - arc->pwlArc->pts + 1;
494/*
495 for( TrimVertex *vt=pwlArc->pts; vt != vert-1; vt++ ) {
496 if( tooclose( vt[0].param[0], vt[1].param[0] ) )
497 vt[1].param[0] = vt[0].param[0];
498 if( tooclose( vt[0].param[1], vt[1].param[1] ) )
499 vt[1].param[1] = vt[0].param[1];
500 }
501*/
502}
static void trim_power_coeffs(BezierArc *, REAL[MAXORDER], int)
Definition: arctess.cc:592
TrimVertex * pts
Definition: pwlarc.h:46
#define MAXORDER
Definition: defines.h:45
const GLdouble * v
Definition: gl.h:2040
GLsizeiptr size
Definition: glext.h:5919
GLfloat param
Definition: glext.h:5796
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define ds
Definition: i386-dis.c:443
REAL * cpts
Definition: bezierarc.h:44
int stride
Definition: bezierarc.h:46
int order
Definition: bezierarc.h:45

Referenced by Subdivider::tessellate().

◆ trim_power_coeffs()

void ArcTessellator::trim_power_coeffs ( BezierArc ,
REAL  [MAXORDER],
int   
)
staticprivate

Definition at line 592 of file arctess.cc.

593{
594 int stride = bez_arc->stride;
595 int order = bez_arc->order;
596 REAL *base = bez_arc->cpts + coord;
597
598 REAL const (*mat)[MAXORDER][MAXORDER] = &gl_Bernstein[order-1];
599 REAL const (*lrow)[MAXORDER] = &(*mat)[order];
600
601 /* WIN32 didn't like the following line within the for-loop */
602 REAL const (*row)[MAXORDER] = &(*mat)[0];
603 for( ; row != lrow; row++ ) {
604 REAL s = 0.0;
605 REAL *point = base;
606 REAL const *mlast = *row + order;
607 for( REAL const *m = *row; m != mlast; m++, point += stride )
608 s += *(m) * (*point);
609 *(p++) = s;
610 }
611}
static const REAL gl_Bernstein[][MAXORDER][MAXORDER]
Definition: arctess.h:60
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
POINTL point
Definition: edittest.c:50
GLsizei stride
Definition: glext.h:5848
GLuint coord
Definition: glext.h:9511
const GLfloat * m
Definition: glext.h:10848

Referenced by tessellateNonlinear().

Member Data Documentation

◆ gl_Bernstein

const REAL ArcTessellator::gl_Bernstein
staticprivate

Definition at line 60 of file arctess.h.

Referenced by trim_power_coeffs().

◆ pwlarcpool

Pool& ArcTessellator::pwlarcpool
private

Definition at line 61 of file arctess.h.

Referenced by bezier(), pwl(), pwl_bottom(), pwl_left(), pwl_right(), pwl_top(), and tessellateNonlinear().

◆ trimvertexpool

TrimVertexPool& ArcTessellator::trimvertexpool
private

Definition at line 62 of file arctess.h.

Referenced by bezier(), pwl(), pwl_bottom(), pwl_left(), pwl_right(), pwl_top(), and tessellateNonlinear().


The documentation for this class was generated from the following files: