Update of /cvsroot/plib/plib/src/ssg
In directory sc8-pr-cvs1:/tmp/cvs-serv29077/src/ssg
Modified Files:
Makefile.am ssgOptimiser.cxx
Log Message:
Andy Ross's vertex splitter
Index: Makefile.am
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/Makefile.am,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- Makefile.am 12 Dec 2003 17:23:48 -0000 1.43
+++ Makefile.am 12 Jan 2004 23:57:41 -0000 1.44
@@ -25,7 +25,8 @@
ssgSaveVRML1.cxx ssgLoaderWriterStuff.h ssgMSFSPalette.h ssg3ds.h \
ssgLoadMDL.h ssgSave3ds.cxx ssgAxisTransform.cxx ssgLoadATG.cxx \
ssgSaveFLT.cxx ssgSaveATG.cxx ssgLoadIV.cxx ssgLoad.cxx ssgLoadVRML.h \
- ssgLoadMDL_BGLTexture.cxx ssgLoadXPlaneObj.cxx ssgSaveASC.cxx
+ ssgLoadMDL_BGLTexture.cxx ssgLoadXPlaneObj.cxx ssgSaveASC.cxx \
+ ssgVertSplitter.h ssgVertSplitter.cxx
INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/util
Index: ssgOptimiser.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgOptimiser.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ssgOptimiser.cxx 15 Oct 2003 20:15:07 -0000 1.32
+++ ssgOptimiser.cxx 12 Jan 2004 23:57:41 -0000 1.33
@@ -24,6 +24,8 @@
#include "ssgLocal.h"
+#include <ssgVertSplitter.h>
+
static float optimise_vtol [3] =
{
0.001f, /* DISTANCE_SLOP = One millimeter */
@@ -66,6 +68,15 @@
counter = 1 ;
}
[...100 lines suppressed...]
+ for (i = 0 ; i < tnum ; i++ ) {
+ short* oldtri = tlist + 3 * i ;
+ int* newtri = vs.getTri ( i ) ;
+ for ( j = 0 ; j < 3 ; j++ ) {
+ oldtri [ j ] = newtri [ j ] ;
+ vlist[ newtri [ j ] ] -> bump ();
+ }
+ }
}
short OptVertexList::find ( sgVec3 v, sgVec2 t, sgVec4 c, int tex_frac )
@@ -675,7 +709,7 @@
GLenum thisType = ((ssgVtxTable *)k)->getPrimitiveType ();
if ((thisType != GL_POINTS) && (thisType != GL_LINES) &&
(thisType != GL_LINE_STRIP) && (thisType != GL_LINE_LOOP))
- { list . add ( (ssgVtxTable *) k ) ;
+ { list . add ( (ssgVtxTable *) k ) ;
b_ent -> removeKid ( k ) ;
k = b_ent -> getKid ( 0 ) ;
}
|