85 npts += jarc->pwlArc->npts;
87 }
while( jarc !=
this );
103 for(
int i=0;
i<jarc->pwlArc->npts;
i++ )
106 }
while( jarc !=
this );
117 REAL leftpt, botpt, rightpt, toppt;
119 extrema[0] = extrema[1] = extrema[2] = extrema[3] =
this;
121 leftpt = rightpt = this->
tail()[0];
122 botpt = toppt = this->
tail()[1];
124 for(
Arc_ptr jarc = this->
next; jarc !=
this; jarc = jarc->next ) {
125 if ( jarc->tail()[0] < leftpt ||
126 (jarc->tail()[0] <= leftpt && jarc->rhead()[0]<=leftpt)) {
127 leftpt = jarc->pwlArc->pts->param[0];
130 if ( jarc->tail()[0] > rightpt ||
131 (jarc->tail()[0] >= rightpt && jarc->rhead()[0] >= rightpt)) {
132 rightpt = jarc->pwlArc->pts->param[0];
135 if ( jarc->tail()[1] < botpt ||
136 (jarc->tail()[1] <= botpt && jarc->rhead()[1] <= botpt )) {
137 botpt = jarc->pwlArc->pts->param[1];
140 if ( jarc->tail()[1] > toppt ||
141 (jarc->tail()[1] >= toppt && jarc->rhead()[1] >= toppt)) {
142 toppt = jarc->pwlArc->pts->param[1];
158 _glu_dprintf(
"\tPWLARC NP: %d FL: 1\n",
pwlArc->
npts );
177 _glu_dprintf(
"BGNTRIM\n" );
182 }
while (jarc !=
this);
184 _glu_dprintf(
"ENDTRIM\n" );
196 if(
pwlArc == 0 )
return 0;
197 if(
prev->pwlArc == 0 )
return 0;
202 if( ((p0[0] - p1[0]) >
ZERO) || ((p1[0] - p0[0]) >
ZERO) ||
203 ((p0[1] - p1[1]) >
ZERO) || ((p1[1] - p0[1]) >
ZERO) ) {
205 _glu_dprintf(
"x coord = %f %f %f\n", p0[0], p1[0], p0[0] - p1[0] );
206 _glu_dprintf(
"y coord = %f %f %f\n", p0[1], p1[1], p0[1] - p1[1] );
211 p0[0] = p1[0] = (p1[0] + p0[0]) * 0.5;
212 p0[1] = p1[1] = (p1[1] + p0[1]) * 0.5;
225 return ((
v1[0] !=
v2[0]) || (
v1[1] !=
v2[1] )) ? 1 : 0;
239 if(
this == 0 )
return 1;
242 assert( (jarc->pwlArc != 0) || (jarc->bezierArc != 0) );
244 if (jarc->prev == 0 || jarc->next == 0) {
246 _glu_dprintf(
"checkjarc:null next/prev pointer\n");
252 if (jarc->next->prev != jarc) {
254 _glu_dprintf(
"checkjarc: pointer linkage screwed up\n");
262 assert( jarc->pwlArc->npts >= 1 );
263 assert( jarc->pwlArc->npts < 100000 );
270 if( jarc->prev->pwlArc ) {
271 if( jarc->tail()[1] != jarc->prev->rhead()[1] ) {
273 _glu_dprintf(
"checkjarc: geometric linkage screwed up 1\n");
279 if( jarc->tail()[0] != jarc->prev->rhead()[0] ) {
282 _glu_dprintf(
"checkjarc: geometric linkage screwed up 2\n");
289 if( jarc->next->pwlArc ) {
290 if( jarc->next->tail()[0] != jarc->rhead()[0] ) {
292 _glu_dprintf(
"checkjarc: geometric linkage screwed up 3\n");
298 if( jarc->next->tail()[1] != jarc->rhead()[1] ) {
300 _glu_dprintf(
"checkjarc: geometric linkage screwed up 4\n");
307 if( jarc->isbezier() ) {
308 assert( jarc->pwlArc->npts == 2 );
309 assert( (jarc->pwlArc->pts[0].param[0] == \
310 jarc->pwlArc->pts[1].param[0]) ||\
311 (jarc->pwlArc->pts[0].param[1] == \
312 jarc->pwlArc->pts[1].param[1]) );
316 }
while (jarc !=
this);
static int neq_vert(REAL *v1, REAL *v2)
long tooclose(REAL x, REAL y)
static const int tail_tag
static const int bezier_tag
void getextrema(Arc_ptr[4])
void makeSide(PwlArc *, arc_side)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLfloat GLfloat GLfloat v2
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