[Plib-cvs] plib/src/ssg ssgLoadAC.cxx,1.33,1.34
Brought to you by:
sjbaker
From: Wolfram K. <wol...@us...> - 2004-10-02 12:12:43
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16827 Modified Files: ssgLoadAC.cxx Log Message: Lines with "crease" are now ignored, so *.ac files with "crease" can be loaded. Index: ssgLoadAC.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadAC.cxx,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- ssgLoadAC.cxx 26 Sep 2004 09:37:00 -0000 1.33 +++ ssgLoadAC.cxx 2 Oct 2004 12:12:28 -0000 1.34 @@ -59,6 +59,7 @@ static int do_texture ( char *s ) ; static int do_texrep ( char *s ) ; static int do_texoff ( char *s ) ; +static int do_crease ( char *s ) ; static int do_rot ( char *s ) ; static int do_loc ( char *s ) ; static int do_url ( char *s ) ; @@ -149,6 +150,7 @@ { "texture" , do_texture }, { "texrep" , do_texrep }, { "texoff" , do_texoff }, + { "crease" , do_crease }, { "rot" , do_rot }, { "loc" , do_loc }, { "url" , do_url }, @@ -412,6 +414,17 @@ return PARSE_CONT ; } +static int do_crease ( char *s ) +{ + // the crease angle is not yet used. However, reading the crease line correctly means + // *.ac lines with "crease" can now be read. + float creaseAngle; + if ( sscanf ( s, "%f", & creaseAngle ) != 1 ) + ulSetError ( UL_WARNING, "ac_to_gl: Illegal crease angle." ) ; + + return PARSE_CONT ; +} + static int do_rot ( char *s ) { current_matrix [ 0 ][ 3 ] = current_matrix [ 1 ][ 3 ] = current_matrix [ 2 ][ 3 ] = |