summaryrefslogtreecommitdiff
path: root/src/glu/sgi/libnurbs/internals
diff options
context:
space:
mode:
Diffstat (limited to 'src/glu/sgi/libnurbs/internals')
-rw-r--r--src/glu/sgi/libnurbs/internals/arcsorter.h1
-rw-r--r--src/glu/sgi/libnurbs/internals/displaylist.h1
-rw-r--r--src/glu/sgi/libnurbs/internals/gridvertex.h2
-rw-r--r--src/glu/sgi/libnurbs/internals/knotvector.cc3
-rw-r--r--src/glu/sgi/libnurbs/internals/reader.h14
-rw-r--r--src/glu/sgi/libnurbs/internals/subdivider.cc6
-rw-r--r--src/glu/sgi/libnurbs/internals/varray.cc8
7 files changed, 24 insertions, 11 deletions
diff --git a/src/glu/sgi/libnurbs/internals/arcsorter.h b/src/glu/sgi/libnurbs/internals/arcsorter.h
index d72dd1e86c..a55df92677 100644
--- a/src/glu/sgi/libnurbs/internals/arcsorter.h
+++ b/src/glu/sgi/libnurbs/internals/arcsorter.h
@@ -37,7 +37,6 @@
#define __gluarcsorter_h_
#include "sorter.h"
-#include "arcsorter.h"
class Arc;
class Subdivider;
diff --git a/src/glu/sgi/libnurbs/internals/displaylist.h b/src/glu/sgi/libnurbs/internals/displaylist.h
index 22cbec3787..d009a42513 100644
--- a/src/glu/sgi/libnurbs/internals/displaylist.h
+++ b/src/glu/sgi/libnurbs/internals/displaylist.h
@@ -59,6 +59,7 @@ Dlnode::Dlnode( PFVS _work, void *_arg, PFVS _cleanup )
work = _work;
arg = _arg;
cleanup = _cleanup;
+ next = 0;
}
class DisplayList {
diff --git a/src/glu/sgi/libnurbs/internals/gridvertex.h b/src/glu/sgi/libnurbs/internals/gridvertex.h
index 36a65c7bdd..2e27436ef8 100644
--- a/src/glu/sgi/libnurbs/internals/gridvertex.h
+++ b/src/glu/sgi/libnurbs/internals/gridvertex.h
@@ -38,7 +38,7 @@
struct GridVertex {
long gparam[2];
- GridVertex( void ) {}
+ GridVertex( void ) { gparam[0] = 0, gparam[1] = 0; }
GridVertex( long u, long v ) { gparam[0] = u, gparam[1] = v; }
void set( long u, long v ) { gparam[0] = u, gparam[1] = v; }
long nextu() { return gparam[0]++; }
diff --git a/src/glu/sgi/libnurbs/internals/knotvector.cc b/src/glu/sgi/libnurbs/internals/knotvector.cc
index 9eb5cbace9..dcbf0067d8 100644
--- a/src/glu/sgi/libnurbs/internals/knotvector.cc
+++ b/src/glu/sgi/libnurbs/internals/knotvector.cc
@@ -61,6 +61,9 @@ void Knotvector::init( long _knotcount, long _stride, long _order, INREAL *_knot
Knotvector::Knotvector( void )
{
+ knotcount = 0;
+ stride = 0;
+ order = 0;
knotlist = 0;
}
diff --git a/src/glu/sgi/libnurbs/internals/reader.h b/src/glu/sgi/libnurbs/internals/reader.h
index 8a8dcebb50..cae6cada46 100644
--- a/src/glu/sgi/libnurbs/internals/reader.h
+++ b/src/glu/sgi/libnurbs/internals/reader.h
@@ -64,7 +64,7 @@ struct O_curve : public PooledObj {
int save; /* 1 if in display list */
long nuid;
O_curve() { next = 0; used = 0; owner = 0;
- curve.o_pwlcurve = 0; }
+ curve.o_pwlcurve = 0; curvetype = ct_none; save = 0; nuid = 0; }
};
struct O_nurbscurve : public PooledObj {
@@ -77,7 +77,7 @@ struct O_nurbscurve : public PooledObj {
int save; /* 1 if in display list */
O_curve * owner; /* owning curve */
O_nurbscurve( long _type )
- { type = _type; owner = 0; next = 0; used = 0; }
+ { bezier_curves = 0; type = _type; tesselation = 0; method = 0; next = 0; used = 0; save = 0; owner = 0; }
};
class O_pwlcurve : public PooledObj {
@@ -95,7 +95,7 @@ struct O_trim : public PooledObj {
O_curve *o_curve; /* closed trim loop */
O_trim * next; /* next loop along trim */
int save; /* 1 if in display list */
- O_trim() { next = 0; o_curve = 0; }
+ O_trim() { next = 0; o_curve = 0; save = 0; }
};
struct O_nurbssurface : public PooledObj {
@@ -106,7 +106,7 @@ struct O_nurbssurface : public PooledObj {
int save; /* 1 if in display list */
int used; /* 1 if prev called in block */
O_nurbssurface( long _type )
- { type = _type; owner = 0; next = 0; used = 0; }
+ { bezier_patches = 0; type = _type; owner = 0; next = 0; save = 0; used = 0; }
};
struct O_surface : public PooledObj {
@@ -114,7 +114,7 @@ struct O_surface : public PooledObj {
O_trim * o_trim; /* list of trim loops */
int save; /* 1 if in display list */
long nuid;
- O_surface() { o_trim = 0; o_nurbssurface = 0; }
+ O_surface() { o_trim = 0; o_nurbssurface = 0; save = 0; nuid = 0; }
};
struct Property : public PooledObj {
@@ -123,9 +123,9 @@ struct Property : public PooledObj {
REAL value;
int save; /* 1 if in display list */
Property( long _type, long _tag, INREAL _value )
- { type = _type; tag = _tag; value = (REAL) _value; }
+ { type = _type; tag = _tag; value = (REAL) _value; save = 0; }
Property( long _tag, INREAL _value )
- { type = 0; tag = _tag; value = (REAL) _value; }
+ { type = 0; tag = _tag; value = (REAL) _value; save = 0; }
};
class NurbsTessellator;
diff --git a/src/glu/sgi/libnurbs/internals/subdivider.cc b/src/glu/sgi/libnurbs/internals/subdivider.cc
index cc0b514706..ccddc270ff 100644
--- a/src/glu/sgi/libnurbs/internals/subdivider.cc
+++ b/src/glu/sgi/libnurbs/internals/subdivider.cc
@@ -531,16 +531,18 @@ Subdivider::nonSamplingSplit(
patchlist.pspec[param].range[1] ) * 0.5;
split( source, left, right, param, mid );
Patchlist subpatchlist( patchlist, param, mid );
- if( left.isnonempty() )
+ if( left.isnonempty() ) {
if( subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT )
freejarcs( left );
else
nonSamplingSplit( left, subpatchlist, subdivisions-1, param );
- if( right.isnonempty() )
+ }
+ if( right.isnonempty() ) {
if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT )
freejarcs( right );
else
nonSamplingSplit( right, patchlist, subdivisions-1, param );
+ }
} else {
// make bbox calls
diff --git a/src/glu/sgi/libnurbs/internals/varray.cc b/src/glu/sgi/libnurbs/internals/varray.cc
index 31cc73a9d0..1cb235443a 100644
--- a/src/glu/sgi/libnurbs/internals/varray.cc
+++ b/src/glu/sgi/libnurbs/internals/varray.cc
@@ -53,8 +53,16 @@ inline long sgn( REAL x )
Varray::Varray( void )
{
+ int i;
+
varray = 0;
size = 0;
+ numquads = 0;
+
+ for (i = 0; i < 1000; i++) {
+ vval[i] = 0;
+ voffset[i] = 0;
+ }
}
Varray::~Varray( void )