static void normalize(float vec[3]);
static void crossProduct(float x[3], float y[3], float ret[3]);
+#if 0 // UNUSED
static void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]);
+#endif
static float binomialCoefficients[8][8] = {
{1,0,0,0,0,0,0,0},
}
-
+#if 0 // UNUSED
/*order = degree +1 >=1.
*/
void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[])
for(j=0; j<dimension; j++)
retpoint[j] = buf[order-1][0][j];
}
-
+#endif
/*order = degree +1 >=1.
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
-** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
+** $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
extern directedLine* arcLoopToDLineLoop(Arc_ptr loop);
+#if 0 // UNUSED
static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, directedLine dline_buf[], sampledLine sline_buf[], int& index_dline)
{
directedLine *ret;
}
return ret;
}
+#endif
+#if 0 // UNUSED
static int num_edges(Bin& bin)
{
int sum=0;
sum += jarc->pwlArc->npts-1;
return sum;
}
+#endif
+
/*
directedLine* bin_to_DLineLoops(Bin& bin)
{
/*
* intersect.c++
*
- * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
+ * $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include "glimports.h"
enum i_result { INTERSECT_VERTEX, INTERSECT_EDGE };
/* local functions */
+#ifndef NDEBUG // for asserts only
static int arc_classify( Arc_ptr, int, REAL );
+#endif
static enum i_result pwlarc_intersect( PwlArc *, int, REAL, int, int[3] );
*----------------------------------------------------------------------------
*/
+#ifndef NDEBUG // for asserts only
static int
arc_classify( Arc_ptr jarc, int param, REAL value )
{
}
}
}
+#endif
void
Subdivider::classify_tailonleft_s( Bin& bin, Bin& in, Bin& out, REAL val )
/*
* maplist.c++
*
- * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include "glimports.h"
void
Maplist::define( long type, int israt, int ncoords )
{
+#ifndef NDEBUG // to avoid warning
Mapdesc *m = locate( type );
assert( m == NULL || ( m->isrational == israt && m->ncoords == ncoords ) );
+#endif
add( type, israt, ncoords );
}
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
-** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
+** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include "monoTriangulation.h"
{
Int i,j,k;
Int isReflex;
- TrimVertex trimVert;
+ /*TrimVertex trimVert;*/
/*if there are at most one vertex in the queue, then simply insert
*/
if(index_queue <=1){
/*
* slicer.c++
*
- * $Date: 2002/11/01 23:35:07 $ $Revision: 1.4 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.4 2002/11/01 23:35:07 brianp Exp $
+ * $Date: 2005/10/28 13:09:23 $ $Revision: 1.5 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.5 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
#define ZERO 0.00001 /*determing whether a loop is a rectngle or not*/
#define equalRect(a,b) ((glu_abs(a-b) <= ZERO)? 1:0) //only used in tessellating a rectangle
+#if 0 // UNUSED
static Int is_Convex(Arc_ptr loop)
{
if(area(loop->tail(), loop->head(), loop->next->head()) <0 )
}
return 1;
}
+#endif
/******triangulate a monotone polygon**************/
#include "monoTriangulation.h"
+#if 0 // UNUSED
static int is_U_monotone(Arc_ptr loop)
{
int n_changes=0;
else
return 0;
}
+#endif
inline int compInY(REAL a[2], REAL b[2])
{
//a line with the same u for opt
+#ifdef USE_OPTTT
static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend)
{
int i;
for(i=0; i<n; i++)
backend.tmeshvertNOGE_BU(&verts[i]);
}
+#endif
//a line with the same v for opt
+#ifdef USE_OPTTT
static void evalLineNOGE_BV(TrimVertex *verts, int n, Backend& backend)
{
int i;
for(i=0; i<n; i++)
backend.tmeshvertNOGE_BV(&verts[i]);
}
+#endif
+
+#ifdef USE_OPTTT
static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
{
backend.tmeshvertNOGE(&verts[i]);
}
}
-
+#endif
inline void OPT_OUTVERT(TrimVertex& vv, Backend& backend)
{
/**********for reading newtess_flag from a file**********/
+#ifdef USE_READ_FLAG
static Int read_flag(char* name)
{
Int ret;
fclose(fp);
return ret;
}
-
+#endif
/***********nextgen tess****************/
#include "sampleMonoPoly.h"
/*
* trimline.c++
*
- * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include "glimports.h"
{
reset(); swap(); append( tinterp );
+#ifndef NDEBUG
PwlArc *lastpwl = botarc->prev->pwlArc;
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
+#endif
TrimVertex *lastpt2 = botarc->pwlArc->pts;
-
register TrimVertex *p = jarcl.getnextpt();
for( append( p ); p != lastpt2; append( p ) ) {
assert( p != lastpt1 );
PwlArc *lastpwl = botarc->prev->pwlArc;
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
+#ifndef NDEBUG
TrimVertex *lastpt2 = botarc->pwlArc->pts;
+#endif
register TrimVertex *q = jarcl.getprevpt();
for( append( q ); q != lastpt1; append( q ) ) {
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
-** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
+** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include "gluos.h"
extern Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vertices, directedLine** new_vertices);
//for debug purpose only
+#if 0 // UNUSED
static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
{
Int i;
glEnd();
}
}
+#endif
/*given (x_1, y_1) and (x_2, y_2), and y
*return x such that (x,y) is on the line
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
-** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $
+** $Date: 2005/10/28 13:09:23 $ $Revision: 1.4 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.4 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
primStream* pStream)
{
Int i;
- directedLine *temp, *oldtemp;
- Int tempIndex, oldtempIndex;
+ directedLine *temp, *oldtemp = NULL;
+ Int tempIndex, oldtempIndex = 0;
assert(inc_chain != NULL && dec_chain != NULL);
//given a polygon, cut the edges off and finally obtain a
//a polygon without intersections. The cut-off edges are
//dealloated. The new polygon is returned.
+#if 0 // UNUSED
static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon)
{
directedLine *crt;//current polygon
find = 0; //go to next loop
}
}
+#endif
directedLine* DBG_cutIntersectionAllPoly(directedLine* list)
{
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
+** $Date: 2005/10/28 13:09:23 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.2 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
*/
Int midIndex1;
Int midIndex2;
- Int gridMidIndex1, gridMidIndex2;
+ Int gridMidIndex1 = 0, gridMidIndex2 = 0;
//midIndex1: array[i] <= v, array[i-1] > v
//midIndex2: array[i] >= v, array[i+1] < v
// v(gridMidIndex1) >= v(midindex1) > v(gridMidIndex1+1)
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
-** $Date: 2001/03/22 11:41:40 $ $Revision: 1.2 $
+** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.2 2001/03/22 11:41:40 joukj Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
*/
#include <stdlib.h>
*/
Int midIndex1;
Int midIndex2;
- Int gridMidIndex1, gridMidIndex2;
+ Int gridMidIndex1, gridMidIndex2 = 0;
//midIndex1: array[i] <= v, array[i+1] > v
//midIndex2: array[i] >= v, array[i+1] < v
midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1),
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
-** $Date: 2004/05/12 15:29:36 $ $Revision: 1.4 $
+** $Date: 2005/10/28 13:09:23 $ $Revision: 1.5 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4 2004/05/12 15:29:36 brianp Exp $
+** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.5 2005/10/28 13:09:23 brianp Exp $
*/
#include "gluos.h"
void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices)
{
- Int i,k,isHoriz;
+ Int i,k,isHoriz = 0;
Int n_ulines = grid->get_n_ulines();
Real uMin = grid->get_u_min();
Real uMax = grid->get_u_max();
Real vMin = grid->get_v_min();
Real vMax = grid->get_v_max();
*/
- Real slop, uinterc;
+ Real slop = 0.0, uinterc;
#ifdef SHORTEN_GRID_LINE
//uintercBuf stores all the interction u value for each grid line
Real vMin = grid->get_v_min();
Real vMax = grid->get_v_max();
*/
- Real slop, uinterc;
+ Real slop = 0.0, uinterc;
#ifdef SHORTEN_GRID_LINE
//uintercBuf stores all the interction u value for each grid line
GLfloat sintemp, costemp;
GLfloat deltaRadius;
GLfloat radiusLow, radiusHigh;
- GLfloat texLow, texHigh;
+ GLfloat texLow = 0.0, texHigh = 0.0;
GLfloat angleOffset;
GLint slices2;
GLint finish;
GLfloat cosCache3b[CACHE_SIZE];
GLfloat angle;
GLfloat zLow, zHigh;
- GLfloat sintemp1, sintemp2, sintemp3, sintemp4;
- GLfloat costemp1, costemp2, costemp3, costemp4;
+ GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
+ GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
GLboolean needCache2, needCache3;
GLint start, finish;