summaryrefslogtreecommitdiff
path: root/src/glu/sgi/libtess/normal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glu/sgi/libtess/normal.c')
-rw-r--r--src/glu/sgi/libtess/normal.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/glu/sgi/libtess/normal.c b/src/glu/sgi/libtess/normal.c
index 618cfd9ccf..7ffd39eb32 100644
--- a/src/glu/sgi/libtess/normal.c
+++ b/src/glu/sgi/libtess/normal.c
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -35,8 +35,8 @@
/*
** Author: Eric Veach, July 1994.
**
-** $Date: 2002/11/01 23:45:31 $ $Revision: 1.2 $
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/normal.c,v 1.2 2002/11/01 23:45:31 brianp Exp $
+** $Date: 2003/10/14 23:48:57 $ $Revision: 1.3 $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libtess/normal.c,v 1.3 2003/10/14 23:48:57 kendallb Exp $
*/
#include "gluos.h"
@@ -64,6 +64,7 @@ static void Normalize( GLdouble v[3] )
}
#endif
+#undef ABS
#define ABS(x) ((x) < 0 ? -(x) : (x))
static int LongAxis( GLdouble v[3] )
@@ -138,7 +139,7 @@ static void ComputeNormal( GLUtesselator *tess, GLdouble norm[3] )
norm[LongAxis(d1)] = 1;
}
}
-
+
static void CheckOrientation( GLUtesselator *tess )
{
@@ -176,7 +177,7 @@ extern int RandomSweep;
#define S_UNIT_X (RandomSweep ? (2*drand48()-1) : 1.0)
#define S_UNIT_Y (RandomSweep ? (2*drand48()-1) : 0.0)
#else
-#if defined(SLANTED_SWEEP)
+#if defined(SLANTED_SWEEP)
/* The "feature merging" is not intended to be complete. There are
* special cases where edges are nearly parallel to the sweep line
* which are not implemented. The algorithm should still behave
@@ -242,7 +243,7 @@ void __gl_projectPolygon( GLUtesselator *tess )
sUnit[i] = 0;
sUnit[(i+1)%3] = S_UNIT_X;
sUnit[(i+2)%3] = S_UNIT_Y;
-
+
tUnit[i] = 0;
tUnit[(i+1)%3] = (norm[i] > 0) ? -S_UNIT_Y : S_UNIT_Y;
tUnit[(i+2)%3] = (norm[i] > 0) ? S_UNIT_X : -S_UNIT_X;