[Plib-cvs] CVS: plib/src/ssg ssg.h,1.129,1.130 ssgLeaf.cxx,1.18,1.19 ssgTween.cxx,1.6,1.7 ssgTweenCo
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-01-19 20:37:24
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv2656/plib/src/ssg Modified Files: ssg.h ssgLeaf.cxx ssgTween.cxx ssgTweenController.cxx Log Message: Exposer will now operate in command-line mode to convert model+bones into tweened model. The SSG loader now observes the 'appstate' callback. ssgTween and ssgTweenController now include print() and getTypeName(). Significant changes to ssgaParticleSystem have taken place. Index: ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- ssg.h 2002/01/17 16:14:23 1.129 +++ ssg.h 2002/01/19 20:37:21 1.130 @@ -1481,6 +1481,7 @@ virtual void draw () ; virtual void transform ( const sgMat4 m ) ; + virtual char *getTypeName(void) ; virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2); virtual int load ( FILE *fd ) ; virtual int save ( FILE *fd ) ; @@ -1608,6 +1609,8 @@ float getCurrBank () { return curr_bank ; } virtual void cull ( sgFrustum *f, sgMat4 m, int test_needed ) ; + virtual char *getTypeName(void) ; + virtual void print ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ; virtual int load ( FILE *fd ) ; virtual int save ( FILE *fd ) ; } ; Index: ssgLeaf.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLeaf.cxx,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ssgLeaf.cxx 2001/12/14 12:30:22 1.18 +++ ssgLeaf.cxx 2002/01/19 20:37:21 1.19 @@ -201,6 +201,20 @@ if ( ! _ssgLoadObject ( fd, (ssgBase **) &st, ssgTypeState () ) ) return FALSE ; + if ( st -> isAKindOf ( ssgTypeSimpleState () ) ) + { + ssgSimpleState *ss = (ssgSimpleState *) st ; + char *tfname = ss -> getTextureFilename () ; + + if ( tfname != NULL ) + { + ssgState *new_st = ssgGetCurrentOptions () -> createState ( tfname ) ; + + if ( new_st != NULL ) + st = new_st ; + } + } + setState ( st ) ; return ssgEntity::load(fd) ; Index: ssgTween.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgTween.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ssgTween.cxx 2001/11/07 23:51:10 1.6 +++ ssgTween.cxx 2002/01/19 20:37:21 1.7 @@ -28,6 +28,8 @@ static float current_tween_state = 0.0f ; +char *ssgTween::getTypeName (void) { return "ssgTween" ; } + float _ssgGetCurrentTweenState () { return current_tween_state ; } @@ -467,3 +469,6 @@ texcoords -> print ( fd, in, how_much ) ; colours -> print ( fd, in, how_much ) ; } + + + Index: ssgTweenController.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgTweenController.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ssgTweenController.cxx 2001/11/07 23:51:10 1.2 +++ ssgTweenController.cxx 2002/01/19 20:37:21 1.3 @@ -25,6 +25,8 @@ #include "ssgLocal.h" +char *ssgTweenController::getTypeName (void) { return "ssgTweenController" ; } + void ssgTweenController::copy_from ( ssgTweenController *src, int clone_flags ) { selectBank ( src->getCurrBank () ) ; @@ -77,6 +79,18 @@ { _ssgWriteFloat ( fd, curr_bank ) ; return ssgBranch::save ( fd ) ; +} + + + +void ssgTweenController::print ( FILE *fd, char *indent, int how_much ) +{ + if ( how_much == 0 ) + return ; + + fprintf ( fd, "%sCurrent Bank = %f\n", indent, curr_bank ); + + ssgBranch::print ( fd, indent, how_much ) ; } |