Update of /cvsroot/plib/plib/src/ssg
In directory sc8-pr-cvs1:/tmp/cvs-serv13980/ssg
Modified Files:
ssgSaveASC.cxx
Log Message:
Implemented material (texture) handling.
Optionally save only some nodes.
The texturecoordinates suddenly need an "U" and "V" before them for unknown reasons.
Index: ssgSaveASC.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgSaveASC.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ssgSaveASC.cxx 26 Jul 2003 11:58:44 -0000 1.2
+++ ssgSaveASC.cxx 14 Dec 2003 14:58:40 -0000 1.3
@@ -67,6 +67,43 @@
Vertex list:
*/
fprintf ( save_fd, "Vertex list:\n");
+ const char *material = "PALGREY27";
+ ssgState *s = vt->getState();
+ if (s)
+ if(s->isAKindOf(ssgTypeSimpleState()))
+ {
+
+ ssgTexture * t = ((ssgSimpleState *)s)->getTexture();
+ if(t)
[...72 lines suppressed...]
else
if ( e -> isAKindOf ( ssgTypeVtxTable() ) )
- {
- ssgVtxTable *vt = (ssgVtxTable *) e ;
- save_vtx_table ( vt ) ;
- }
+ { int bSaveIt = TRUE;
+ if(bUseSpare)
+ if( 1 != e->getSpare() )
+ bSaveIt = FALSE;
+
+ if ( bSaveIt )
+ {
+ ssgVtxTable *vt = (ssgVtxTable *) e ;
+ save_vtx_table ( vt ) ;
+ }
+ }
}
|