On Aug 20, 5:40=A0pm, "jbwest" <jbw...@[EMAIL PROTECTED]
> wrote:
> "uuilly" <willy.li...@[EMAIL PROTECTED]
> wrote in message
>
> news:c5afa556-5c0b-4494-9649-1152c9295f0d@[EMAIL PROTECTED]
>
>
>
> > Hey,
> > I've had a problem with gluTesselations for a long time but only
> > recently did they problem become bad. =A0I was usually tessellating
> > international boundaries and occasionally they would show tiny little
> > holes in them. =A0Now I am rendering counties and they are everywhere.
> > I have a terrible combineCallback that basically gives back one of the
> > points it tried to combine. =A0I have tried EVERY sample of a
> > combineCallback that I could find on google. =A0Even the one from the
> > SuperBible creates a geometric train wreck on my screen.
>
> > void combineCallback(GLdouble coords[ 3 ],
> > =A0 =A0 =A0 =A0 GLdouble *vertex_data[ 4 ],
> > =A0 =A0 =A0 =A0 GLfloat weight[4],
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
=A0GLdouble=
**dataOut )
> > {
> > // this gets rid of warnings
> > coords[ 0 ] =3D coords[ 0 ];
> > weight[ 0 ] =3D weight[ 0 ];
> > GLdouble *vertex =3D Drawable::getNewTessVerts( 6 );
>
> > for( int j =3D 0; j < 3; ++j )
> > {
> > vertex[ j ] =3D vertex_data[ 0 ][ j ];
> > }
> > for( int j =3D 3; j < 6; ++j )
> > {
> > vertex[ j ] =3D 0;
> > }
> > *dataOut =3D vertex;
> > }
>
> > The sad thing is I don't even see where the geometry self intersects.
> > Here are my verts:
> > x,y,z
> > -2.2321 0.781845 0
> > -2.22749 0.781842 0
> > -2.22431 0.781833 0
> > -2.22223 0.781838 0
> > -2.22223 0.772144 0
> > -2.22247 0.772144 0
> > -2.22484 0.772153 0
> > -2.22719 0.772159 0
> > -2.23056 0.772158 0
> > -2.23146 0.772167 0
> > -2.23384 0.77217 0
> > -2.23424 0.772172 0
> > -2.23424 0.772223 0
> > -2.23423 0.772973 0
> > -2.23423 0.774753 0
> > -2.23423 0.774871 0
> > -2.23423 0.77582 0
> > -2.23421 0.777779 0
> > -2.2342 0.781848 0
>
> > There are some points that are close together but no self intersection
> > that I can see.
>
> > Here is a pic of the output. =A0I know I am drawing the lines
correctly
> > b/c the yellow lines are drawing the same points that the tess is
> > supposed to be drawing. =A0I'd really appreciate any help.
=A0Thanks...
>
> > -Willy
> >http://www.zoonex.com/pics/423b9a886152e37b5a870a8832667c05.JPEG
>
> =A0 Gosh, it's been a while... Is it a closure problem? Do you need to
ad=
d a
> last point =3D 1st in the input data to close up the polygon ?
>
> jbw
I've tried w/ and w/o a last=3D=3Dfirst. It's funny, it fixes some of the
counties and breaks just as many others. Any other thoughts? My next
move is to write my own tessellation algorithm.


|