Misc winding rule bug fixes.
authorGareth Hughes <gareth@valinux.com>
Thu, 16 Sep 1999 06:41:42 +0000 (06:41 +0000)
committerGareth Hughes <gareth@valinux.com>
Thu, 16 Sep 1999 06:41:42 +0000 (06:41 +0000)
src/glu/mesa/tess.c
src/glu/mesa/tess.h

index 166f250bebc1a3a3a5c6ad300a708d260cf036ae..50d9ff23487d47c6807d102b1e031c598bdb154e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: tess.c,v 1.6 1999/09/15 02:11:10 gareth Exp $ */
+/* $Id: tess.c,v 1.7 1999/09/16 06:41:42 gareth Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -26,6 +26,9 @@
 
 /*
  * $Log: tess.c,v $
+ * Revision 1.7  1999/09/16 06:41:42  gareth
+ * Misc winding rule bug fixes.
+ *
  * Revision 1.6  1999/09/15 02:11:10  gareth
  * Fixed vector macro calls, specifically COPY_3V params.
  *
@@ -197,17 +200,18 @@ void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj )
     tobj->current_contour->vertices =
        tobj->current_contour->last_vertex = NULL;
 
-    tobj->current_contour->reflex_count = 0;
-    tobj->current_contour->reflex_vertices =
-       tobj->current_contour->last_reflex = NULL;
+    tobj->current_contour->reflex_vertices = NULL;
+    tobj->current_contour->cross_vertices = hashtable_init( HT_DEFAULT_SIZE );
 
     tobj->current_contour->orientation = GLU_UNKNOWN;
     tobj->current_contour->area = 0.0;
 
-    tobj->current_contour->winding = 0;
+    tobj->current_contour->label = 0;
     CLEAR_BBOX_2DV( tobj->current_contour->mins,
                    tobj->current_contour->maxs );
 
+    tobj->current_contour->rotx = tobj->current_contour->roty = 0.0;
+
  cleanup:
     DEBUGP( 3, ( "  <- gluTessBeginContour( tobj:%p )\n", tobj ) );
     return;
@@ -772,7 +776,7 @@ static void project_current_contour( GLUtesselator *tobj )
     znormal[Z] = current->plane.normal[Z];
 
     dot = DOT3( znormal, zaxis );
-    roty = acos( dot );
+    current->roty = roty = acos( dot );
 
     /* Rotate the plane normal around the x-axis. */
 
@@ -781,7 +785,7 @@ static void project_current_contour( GLUtesselator *tobj )
     xnormal[Z] = sin( roty ) * znormal[X] + cos( roty ) * znormal[Z];
 
     dot = DOT3( xnormal, zaxis );
-    rotx = acos( dot );
+    current->rotx = rotx = acos( dot );
 
     for ( vertex = current->vertices, i = 0;
          i < current->vertex_count; vertex = vertex->next, i++ )
@@ -964,7 +968,7 @@ static void delete_all_contours( GLUtesselator *tobj )
  * Debugging output
  *****************************************************************************/
 #ifdef DEBUG
-int    tess_debug_level = 3;
+int    tess_debug_level = 0;
 
 int vdebugstr( char *format_str, ... )
 {
index 15eef76bc1b455b4aeb78d730fc18192a66a001d..3d159fcb890d62f5690bd1e71ead447a76cc6072 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: tess.h,v 1.6 1999/09/15 02:12:16 gareth Exp $ */
+/* $Id: tess.h,v 1.7 1999/09/16 06:42:01 gareth Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -26,6 +26,9 @@
 
 /*
  * $Log: tess.h,v $
+ * Revision 1.7  1999/09/16 06:42:01  gareth
+ * Misc winding rule bug fixes.
+ *
  * Revision 1.6  1999/09/15 02:12:16  gareth
  * Added debugging pragma message.
  *
@@ -80,7 +83,7 @@ struct GLUtesselator
 #if 0
     tess_grid_t                *grid;                  /* Not currently used... */
 #endif
-    heap_t             *heap;
+    heap_t             *ears;
     GLenum             error;
 };