Update of /cvsroot/plib/plib/src/ssg
In directory usw-pr-cvs1:/tmp/cvs-serv30407
Modified Files:
ssgLoaderWriterStuff.cxx ssgLoaderWriterStuff.h
Log Message:
ssgLoaderWriterMesh now has a name that can be set via setName
Index: ssgLoaderWriterStuff.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgLoaderWriterStuff.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- ssgLoaderWriterStuff.cxx 18 Dec 2001 16:35:59 -0000 1.24
+++ ssgLoaderWriterStuff.cxx 22 Jul 2002 14:43:03 -0000 1.25
@@ -411,6 +411,7 @@
perFaceAndVertexTextureCoordinate2Lists = NULL ;
theMaterials = NULL ;
perVertexTextureCoordinates2 = NULL ;
+ name = NULL ;
textureCoordinatesArePerVertex = TRUE ;
}
@@ -667,7 +668,20 @@
ssgEntity *model = current_options -> createLeaf ( leaf, NULL) ;
assert( model != NULL );
+ model->setName(name);
curr_branch_->addKid(model);
+}
+
+void ssgLoaderWriterMesh::setName( const char *meshName )
+{
+ delete [] name;
+ if ( !meshName )
+ name = NULL;
+ else
+ {
+ name = new char [ strlen(meshName) + 1 ];
+ strcpy(name, meshName);
+ }
}
Index: ssgLoaderWriterStuff.h
===================================================================
RCS file: /cvsroot/plib/plib/src/ssg/ssgLoaderWriterStuff.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- ssgLoaderWriterStuff.h 7 Nov 2001 23:51:10 -0000 1.20
+++ ssgLoaderWriterStuff.h 22 Jul 2002 14:43:03 -0000 1.21
@@ -77,6 +77,7 @@
class ssgLoaderWriterMesh
{
// ***** general ****
+ char *name;
// array of Vec3s:
class ssgVertexArray *theVertices;
// one index per face:
@@ -115,7 +116,8 @@
void setVertices( class ssgVertexArray *vertexArray );
class ssgTexCoordArray *getPerVertexTextureCoordinates2(void) { return perVertexTextureCoordinates2; }
void setPerVertexTextureCoordinates2( class ssgTexCoordArray *texCoordArray );
-
+ void setName( const char *meshName );
+
void addToSSG(
class ssgSimpleState *currentstate,
class ssgLoaderOptions* currentOptions,
|