plib-cvs Mailing List for PLIB (Page 52)
Brought to you by:
sjbaker
You can subscribe to this list here.
2002 |
Jan
(25) |
Feb
(10) |
Mar
(60) |
Apr
(49) |
May
(54) |
Jun
(94) |
Jul
(82) |
Aug
(251) |
Sep
(366) |
Oct
(17) |
Nov
(20) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(8) |
Mar
(2) |
Apr
(4) |
May
(5) |
Jun
(8) |
Jul
(23) |
Aug
(8) |
Sep
(7) |
Oct
(5) |
Nov
(20) |
Dec
(20) |
2004 |
Jan
(19) |
Feb
(70) |
Mar
(108) |
Apr
(24) |
May
(6) |
Jun
(5) |
Jul
|
Aug
(8) |
Sep
(18) |
Oct
(27) |
Nov
|
Dec
(13) |
2005 |
Jan
(19) |
Feb
(13) |
Mar
(1) |
Apr
|
May
(10) |
Jun
(1) |
Jul
(10) |
Aug
(5) |
Sep
(2) |
Oct
(2) |
Nov
(6) |
Dec
(4) |
2006 |
Jan
(9) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sebastian U. <ud...@us...> - 2002-06-20 20:07:58
|
Update of /cvsroot/plib/plib/examples/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv25822/examples/src/pui Modified Files: simple.cxx Log Message: Minor optimizations Index: simple.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/pui/simple.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- simple.cxx 14 Mar 2002 15:45:53 -0000 1.6 +++ simple.cxx 20 Jun 2002 20:07:55 -0000 1.7 @@ -13,19 +13,19 @@ //#define VOODOO 1 -void motionfn ( int x, int y ) +static void motionfn ( int x, int y ) { puMouse ( x, y ) ; glutPostRedisplay () ; } -void mousefn ( int button, int updown, int x, int y ) +static void mousefn ( int button, int updown, int x, int y ) { puMouse ( button, updown, x, y ) ; glutPostRedisplay () ; } -void displayfn ( void ) +static void displayfn ( void ) { glClearColor ( 0.1f, 0.4f, 0.1f, 1.0f ) ; glClear ( GL_COLOR_BUFFER_BIT ) ; @@ -41,13 +41,13 @@ than creating user interface widgets, you normally do want to redraw your scenery as often as possible for smooth animation. */ - glutPostRedisplay () ; + //glutPostRedisplay () ; } -void button_cb ( puObject * ) +/*static void button_cb ( puObject * ) { fprintf ( stderr, "Hello World.\n" ) ; -} +}*/ int main ( int argc, char **argv ) @@ -67,27 +67,23 @@ can write their applications upon this example code without running into problems. */ - glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ; + glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE /*| GLUT_DEPTH*/ ) ; glutCreateWindow ( "PUI Application" ) ; glutDisplayFunc ( displayfn ) ; glutMouseFunc ( mousefn ) ; glutMotionFunc ( motionfn ) ; + glutPassiveMotionFunc ( motionfn ) ; -#ifdef VOODOO +/*#ifdef VOODOO glutPassiveMotionFunc ( motionfn ) ; -#endif +#endif*/ puInit () ; #ifdef VOODOO puShowCursor () ; #endif - - puOneShot *b = new puOneShot ( 50, 50, 200, 80 ) ; - - b -> setLegend ( "Say Hello" ) ; - b -> setCallback ( button_cb ) ; glutMainLoop () ; |
From: Sebastian U. <ud...@us...> - 2002-06-20 20:07:57
|
Update of /cvsroot/plib/plib/src/sl In directory usw-pr-cvs1:/tmp/cvs-serv25822/src/sl Modified Files: slSample.cxx Log Message: Minor optimizations Index: slSample.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slSample.cxx,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- slSample.cxx 23 Mar 2002 15:06:44 -0000 1.7 +++ slSample.cxx 20 Jun 2002 20:07:53 -0000 1.8 @@ -321,7 +321,7 @@ fread ( & header, sizeof(header), 1, fd ) ; for ( int junk = sizeof(header) ; junk < leng1 ; junk++ ) - fgetc ( fd ) ; + getc ( fd ) ; if ( needs_swabbing ) { |
From: J?rgen M. <j_m...@us...> - 2002-06-20 16:42:14
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv31696/src/ssg Modified Files: ssgLoadBGL.cxx Log Message: fixed build problem related to alloca Index: ssgLoadBGL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadBGL.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ssgLoadBGL.cxx 15 Jun 2002 18:15:53 -0000 1.6 +++ ssgLoadBGL.cxx 20 Jun 2002 16:42:10 -0000 1.7 @@ -343,15 +343,16 @@ int i, chk, num_tris; float a0, a1, a2, b0, b1, b2, c0, c1, c2; + Vtx *p = new Vtx[n]; /* construct a circular linked list of the vertices */ - p0 = (Vtx *) alloca(sizeof(Vtx)); + p0 = &p[0]; p0->index = w ? *w->get(0) : 0; p0->x = coords->get(p0->index)[x]; p0->y = coords->get(p0->index)[y]; p1 = p0; p2 = 0; for (i = 1; i < n; i++) { - p2 = (Vtx *) alloca(sizeof(Vtx)); + p2 = &p[i]; p2->index = w ? *w->get(i) : i; p2->x = coords->get(p2->index)[x]; p2->y = coords->get(p2->index)[y]; @@ -370,6 +371,7 @@ if (chk && m0 == p0 && m1 == p1 && m2 == p2) { /* no suitable vertex found.. */ ulSetError(UL_WARNING, "ssgTriangulate: Self-intersecting polygon."); + delete [] p; return 0; } chk = 1; @@ -435,7 +437,7 @@ tris->add(p1->index); tris->add(p2->index); num_tris++; - + delete [] p; return num_tris; } |
From: Steve B. <sj...@us...> - 2002-06-20 06:39:40
|
Update of /cvsroot/plib/plib/src/util In directory usw-pr-cvs1:/tmp/cvs-serv9544/plib/src/util Modified Files: ul.cxx ul.h Log Message: Added ulStrDup() - please use instead of strdup(). Index: ul.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.cxx,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- ul.cxx 7 Nov 2001 23:51:10 -0000 1.26 +++ ul.cxx 20 Jun 2002 06:39:36 -0000 1.27 @@ -359,6 +359,19 @@ ///////////////////// string handling /////////////////////////////// +/* + Strdup is *evil* - use this instead... +*/ + +char *ulStrDup ( const char *s ) +{ + char *ret = new char [ strlen(s)+1 ] ; + strcpy ( ret, s ) ; + return ret ; +} + + + // string comparisons that are *not* case sensitive: /* Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- ul.h 10 Jun 2002 16:08:31 -0000 1.44 +++ ul.h 20 Jun 2002 06:39:36 -0000 1.45 @@ -756,6 +756,7 @@ } ; +extern char *ulStrDup ( const char *s ) ; extern int ulStrNEqual ( const char *s1, const char *s2, int len ); extern int ulStrEqual ( const char *s1, const char *s2 ); |
From: Sebastian U. <ud...@us...> - 2002-06-15 18:15:56
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv11606 Modified Files: ssgLoadBGL.cxx Log Message: Made version of _ssgTriangulate in ssgLoadBGL.cxx static Index: ssgLoadBGL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadBGL.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ssgLoadBGL.cxx 15 Jun 2002 17:24:56 -0000 1.5 +++ ssgLoadBGL.cxx 15 Jun 2002 18:15:53 -0000 1.6 @@ -441,7 +441,7 @@ //=========================================================================== -int _ssgTriangulate( ssgVertexArray *coords, ssgIndexArray *w, int n, ssgIndexArray *tris ) +static int _ssgTriangulate( ssgVertexArray *coords, ssgIndexArray *w, int n, ssgIndexArray *tris ) { float *a, *b; int i, x, y; |
From: J?rgen M. <j_m...@us...> - 2002-06-15 17:25:00
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv366/src/ssg Modified Files: ssgLoadBGL.cxx Log Message: -Fixed a bug in line drawing -handle PointTo, DrawTo, start/end surface -combinations correctly -support for light maps added -support for concave polygons added -Fixed a bug for object positioning with negative longitude Index: ssgLoadBGL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadBGL.cxx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ssgLoadBGL.cxx 9 Jun 2002 15:30:39 -0000 1.4 +++ ssgLoadBGL.cxx 15 Jun 2002 17:24:56 -0000 1.5 @@ -62,6 +62,11 @@ // + use <iostream> / stl only when JMDEBUG is defined // + M_PI replaced by SGD_PI // + Major clean up for MSVC +// - Fixed a bug in line drawing +// - handle PointTo, DrawTo, start/end surface combinations correctly +// - support for light maps added +// - support for concave polygons added +// - Fixed a bug for object positioning with negative longitude // //=========================================================================== // Copyright (c) 2000 Thomas E. Sevaldrud <ts...@ma...> [...842 lines suppressed...] + curr_part_->setState( createState(false) ); } #ifdef EXPERIMENTAL_CULL_FACE_CODE curr_part_->setCullFace ( curr_cull_face_ ) ; @@ -1840,7 +2145,6 @@ break; case 0x76: // BGL_BGL JM: do nothing { -// curr_xfm_ = NULL; sgMakeIdentMat4( curr_matrix_ ); sgZeroVec3( curr_rot_pt_ ); } @@ -1850,7 +2154,6 @@ { short offset; offset = ulEndianReadLittle16(fp); - // do nothing jm } break; |
From: Steve B. <sj...@us...> - 2002-06-14 04:38:27
|
Update of /cvsroot/plib/plib/src/sg In directory usw-pr-cvs1:/tmp/cvs-serv26737/plib/src/sg Modified Files: sg.cxx sg.h Log Message: Moved SG's internal sin/cos/tan/acos/asin/atan routines into the header file so everyone can use them. Index: sg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.cxx,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- sg.cxx 13 Jun 2002 05:53:02 -0000 1.33 +++ sg.cxx 14 Jun 2002 04:38:23 -0000 1.34 @@ -24,38 +24,6 @@ #include "sg.h" -/* Type-casted sqrt and sin/cos/tan/asin/acos/atan2 ARGUMENTS IN DEGREES */ - -inline SGDfloat sgdASin ( SGDfloat s ) - { return (SGDfloat) asin ( s ) * SGD_RADIANS_TO_DEGREES ; } -inline SGDfloat sgdACos ( SGDfloat s ) - { return (SGDfloat) acos ( s ) * SGD_RADIANS_TO_DEGREES ; } -inline SGDfloat sgdATan ( SGDfloat s ) - { return (SGDfloat) atan ( s ) * SGD_RADIANS_TO_DEGREES ; } -inline SGDfloat sgdATan2 ( SGDfloat y, SGDfloat x ) - { return (SGDfloat) atan2 ( y,x ) * SGD_RADIANS_TO_DEGREES ; } -inline SGDfloat sgdSin ( SGDfloat s ) - { return (SGDfloat) sin ( s * SGD_DEGREES_TO_RADIANS ) ; } -inline SGDfloat sgdCos ( SGDfloat s ) - { return (SGDfloat) cos ( s * SGD_DEGREES_TO_RADIANS ) ; } -inline SGDfloat sgdTan ( SGDfloat s ) - { return (SGDfloat) tan ( s * SGD_DEGREES_TO_RADIANS ) ; } - -inline SGfloat sgASin ( SGfloat s ) - { return (SGfloat) asin ( s ) * SG_RADIANS_TO_DEGREES ; } -inline SGfloat sgACos ( SGfloat s ) - { return (SGfloat) acos ( s ) * SG_RADIANS_TO_DEGREES ; } -inline SGfloat sgATan ( SGfloat s ) - { return (SGfloat) atan ( s ) * SG_RADIANS_TO_DEGREES ; } -inline SGfloat sgATan2 ( SGfloat y, SGfloat x ) - { return (SGfloat) atan2 ( y,x ) * SG_RADIANS_TO_DEGREES ; } -inline SGfloat sgSin ( SGfloat s ) - { return (SGfloat) sin ( s * SG_DEGREES_TO_RADIANS ) ; } -inline SGfloat sgCos ( SGfloat s ) - { return (SGfloat) cos ( s * SG_DEGREES_TO_RADIANS ) ; } -inline SGfloat sgTan ( SGfloat s ) - { return (SGfloat) tan ( s * SG_DEGREES_TO_RADIANS ) ; } - void sgVectorProductVec3 ( sgVec3 dst, const sgVec3 a, const sgVec3 b ) { dst[0] = a[1] * b[2] - a[2] * b[1] ; Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- sg.h 13 Jun 2002 05:53:02 -0000 1.35 +++ sg.h 14 Jun 2002 04:38:23 -0000 1.36 @@ -62,7 +62,27 @@ inline SGfloat sgSqrt ( const SGfloat x ) { return (SGfloat) sqrt ( x ) ; } inline SGfloat sgSquare ( const SGfloat x ) { return x * x ; } -inline SGfloat sgAbs ( const SGfloat a ) { return ( a < SG_ZERO ) ? -a : a ; } +inline SGfloat sgAbs ( const SGfloat a ) { return (a<SG_ZERO) ? -a : a ; } + +/* + Type-casted sin/cos/tan/asin/acos/atan2 ANGLES IN DEGREES +*/ + +inline SGfloat sgASin ( SGfloat s ) + { return (SGfloat) asin ( s ) * SG_RADIANS_TO_DEGREES ; } +inline SGfloat sgACos ( SGfloat s ) + { return (SGfloat) acos ( s ) * SG_RADIANS_TO_DEGREES ; } +inline SGfloat sgATan ( SGfloat s ) + { return (SGfloat) atan ( s ) * SG_RADIANS_TO_DEGREES ; } +inline SGfloat sgATan2 ( SGfloat y, SGfloat x ) + { return (SGfloat) atan2 ( y,x ) * SG_RADIANS_TO_DEGREES ; } +inline SGfloat sgSin ( SGfloat s ) + { return (SGfloat) sin ( s * SG_DEGREES_TO_RADIANS ) ; } +inline SGfloat sgCos ( SGfloat s ) + { return (SGfloat) cos ( s * SG_DEGREES_TO_RADIANS ) ; } +inline SGfloat sgTan ( SGfloat s ) + { return (SGfloat) tan ( s * SG_DEGREES_TO_RADIANS ) ; } + inline int sgCompareFloat ( const SGfloat a, const SGfloat b, const SGfloat tol ) { @@ -800,14 +820,14 @@ inline SGfloat sgDistToLineVec3 ( const sgLine3 line, const sgVec3 pnt ) { - return (SGfloat) sqrt ( (double) sgDistSquaredToLineVec3 ( line, pnt ) ); + return sgSqrt ( sgDistSquaredToLineVec3 ( line, pnt ) ); } inline SGfloat sgDistToLineSegmentVec3 ( const sgLineSegment3 line, const sgVec3 pnt ) { - return (SGfloat) sqrt ( (double) sgDistSquaredToLineSegmentVec3(line,pnt) ) ; + return sgSqrt ( sgDistSquaredToLineSegmentVec3(line,pnt) ) ; } @@ -1342,6 +1362,21 @@ inline SGDfloat sgdSqrt ( const SGDfloat x ) { return sqrt ( x ) ; } inline SGDfloat sgdSquare ( const SGDfloat x ) { return x * x ; } inline SGDfloat sgdAbs ( const SGDfloat a ) { return ( a < SGD_ZERO ) ? -a : a ; } + +inline SGDfloat sgdASin ( SGDfloat s ) + { return (SGDfloat) asin ( s ) * SGD_RADIANS_TO_DEGREES ; } +inline SGDfloat sgdACos ( SGDfloat s ) + { return (SGDfloat) acos ( s ) * SGD_RADIANS_TO_DEGREES ; } +inline SGDfloat sgdATan ( SGDfloat s ) + { return (SGDfloat) atan ( s ) * SGD_RADIANS_TO_DEGREES ; } +inline SGDfloat sgdATan2 ( SGDfloat y, SGDfloat x ) + { return (SGDfloat) atan2 ( y,x ) * SGD_RADIANS_TO_DEGREES ; } +inline SGDfloat sgdSin ( SGDfloat s ) + { return (SGDfloat) sin ( s * SGD_DEGREES_TO_RADIANS ) ; } +inline SGDfloat sgdCos ( SGDfloat s ) + { return (SGDfloat) cos ( s * SGD_DEGREES_TO_RADIANS ) ; } +inline SGDfloat sgdTan ( SGDfloat s ) + { return (SGDfloat) tan ( s * SGD_DEGREES_TO_RADIANS ) ; } inline int sgdCompareFloat ( const SGDfloat a, const SGDfloat b, const SGDfloat tol ) { |
From: Steve B. <sj...@us...> - 2002-06-13 05:53:06
|
Update of /cvsroot/plib/plib/src/sg In directory usw-pr-cvs1:/tmp/cvs-serv8045/plib/src/sg Modified Files: sg.cxx sg.h Log Message: Fixed obtuse triangle case for sgTriangleSolver_ASStoSAA and ASStoArea. Index: sg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.cxx,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- sg.cxx 12 Jun 2002 05:45:13 -0000 1.32 +++ sg.cxx 13 Jun 2002 05:53:02 -0000 1.33 @@ -1735,11 +1735,13 @@ } -SGfloat sgTriangleSolver_ASStoArea ( SGfloat angB, SGfloat lenA, SGfloat lenB ) +SGfloat sgTriangleSolver_ASStoArea ( SGfloat angB, SGfloat lenA, SGfloat lenB, + int angA_is_obtuse ) { SGfloat lenC ; - sgTriangleSolver_ASStoSAA ( angB, lenA, lenB, &lenC, NULL, NULL ) ; + sgTriangleSolver_ASStoSAA ( angB, lenA, lenB, angA_is_obtuse, + &lenC, NULL, NULL ) ; return sgTriangleSolver_SAStoArea ( lenA, angB, lenC ) ; } @@ -1818,7 +1820,7 @@ if ( lenB ) *lenB = lb ; - sgTriangleSolver_SSStoAAA ( lenA, lenB, lenC, angA, NULL, angC ) ; + sgTriangleSolver_SSStoAAA ( lenA, lb, lenC, angA, NULL, angC ) ; } @@ -1847,13 +1849,18 @@ } } -void sgTriangleSolver_ASStoSAA ( SGfloat angB, SGfloat lenA, SGfloat lenB, + +void sgTriangleSolver_ASStoSAA ( SGfloat angB, SGfloat lenA, SGfloat lenB, + int angA_is_obtuse, SGfloat *lenC, SGfloat *angA, SGfloat *angC ) { /* Sine law */ SGfloat aa = (lenB == SG_ZERO ) ? SG_ZERO : sgASin (lenA * sgSin(angB)/lenB) ; + if ( angA_is_obtuse ) + aa = SG_180 - aa ; + if ( angA ) *angA = aa ; /* Find the missing angle */ @@ -1866,6 +1873,7 @@ sgTriangleSolver_SAStoASA ( lenA, cc, lenB, NULL, lenC, NULL ) ; } + void sgTriangleSolver_SAAtoASS ( SGfloat lenA, SGfloat angB, SGfloat angA, SGfloat *angC, SGfloat *lenB, SGfloat *lenC ) Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- sg.h 12 Jun 2002 05:45:13 -0000 1.34 +++ sg.h 13 Jun 2002 05:53:02 -0000 1.35 @@ -2573,8 +2573,9 @@ SGfloat sgTriangleSolver_ASAtoArea ( SGfloat angA, SGfloat lenB, SGfloat angC ); SGfloat sgTriangleSolver_SAStoArea ( SGfloat lenA, SGfloat angB, SGfloat lenC ); SGfloat sgTriangleSolver_SSStoArea ( SGfloat lenA, SGfloat lenB, SGfloat lenC ); -SGfloat sgTriangleSolver_ASStoArea ( SGfloat angB, SGfloat lenA, SGfloat lenB ); SGfloat sgTriangleSolver_SAAtoArea ( SGfloat lenA, SGfloat angB, SGfloat angA ); +SGfloat sgTriangleSolver_ASStoArea ( SGfloat angB, SGfloat lenA, SGfloat lenB, + int angA_is_obtuse ); void sgTriangleSolver_SSStoAAA ( SGfloat lenA, SGfloat lenB, SGfloat lenC, SGfloat *angA, SGfloat *angB, SGfloat *angC ) ; @@ -2582,9 +2583,11 @@ SGfloat *angA, SGfloat *lenB, SGfloat *angC ) ; void sgTriangleSolver_ASAtoSAS ( SGfloat angA, SGfloat lenB, SGfloat angC, SGfloat *lenA, SGfloat *angB, SGfloat *lenC ) ; -void sgTriangleSolver_ASStoSAA ( SGfloat angB, SGfloat lenA, SGfloat lenB, - SGfloat *lenC, SGfloat *angA, SGfloat *angC ) ;void sgTriangleSolver_SAAtoASS ( SGfloat lenA, SGfloat angB, SGfloat angA, +void sgTriangleSolver_SAAtoASS ( SGfloat lenA, SGfloat angB, SGfloat angA, SGfloat *angC, SGfloat *lenB, SGfloat *lenC ) ; +void sgTriangleSolver_ASStoSAA ( SGfloat angB, SGfloat lenA, SGfloat lenB, + int angA_is_obtuse, + SGfloat *lenC, SGfloat *angA, SGfloat *angC ) ; SGDfloat sgdTriangleSolver_ASAtoArea(SGDfloat angA,SGDfloat lenB,SGDfloat angC); |
From: Steve B. <sj...@us...> - 2002-06-13 05:53:06
|
Update of /cvsroot/plib/plib/doc/sg In directory usw-pr-cvs1:/tmp/cvs-serv8045/plib/doc/sg Modified Files: index.html Log Message: Fixed obtuse triangle case for sgTriangleSolver_ASStoSAA and ASStoArea. Index: index.html =================================================================== RCS file: /cvsroot/plib/plib/doc/sg/index.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- index.html 10 Jun 2002 05:42:33 -0000 1.12 +++ index.html 13 Jun 2002 05:53:02 -0000 1.13 @@ -187,15 +187,15 @@ <TABLE> <TR> <TD> -NOTE: +NOTES: <ul> +<li> lenA, lenB, lenC = The lengths of sides A, B and C. +<li> angA, angB, angC = The angles opposite sides A, B and C. <li> SSS = Three sides. <li> SAS = Two sides and the angle between them. <li> ASA = Two angles and the side between them. <li> SAA = One side and two angles that don't include it. <li> ASS = Two sides and one angle that's not between them. -<li> lenA, lenB, lenC = The lengths of sides A, B and C. -<li> angA, angB, angC = The angles opposite sides A, B and C. </ul> </TD> <TD> @@ -203,6 +203,15 @@ </TD> </TR> </TABLE> +A triangle can be specified completely using the 'SSS', 'SAS', +'SSA' and 'ASA' methods - but if you only know two sides and an +angle that's NOT between those two sides (the 'ASS' method) then +there are often two possible triangles that fit that description. +<p> +Hence (in the ASS case), SG needs to know whether one of the +unknown vertices is greater than 90 degrees (Obtuse) or less +than 90 degrees (Acute). Hence the two routines below that use +ASS notation have to be told whether angA is Obtuse or not. <pre> void sgTriangleSolver_SSStoAAA ( SGfloat lenA, SGfloat lenB, SGfloat lenC, @@ -211,10 +220,11 @@ SGfloat *angA, SGfloat *lenB, SGfloat *angC ) ; void sgTriangleSolver_ASAtoSAS ( SGfloat angA, SGfloat lenB, SGfloat angC, SGfloat *lenA, SGfloat *angB, SGfloat *lenC ) ; -void sgTriangleSolver_ASStoSAA ( SGfloat angB, SGfloat lenA, SGfloat lenB, - SGfloat *lenC, SGfloat *angA, SGfloat *angC ) ; void sgTriangleSolver_SAAtoASS ( SGfloat lenA, SGfloat angB, SGfloat angA, SGfloat *angC, SGfloat *lenB, SGfloat *lenC ) ; +void sgTriangleSolver_ASStoSAA ( SGfloat angB, SGfloat lenA, SGfloat lenB, + bool angA_is_obtuse, + SGfloat *lenC, SGfloat *angA, SGfloat *angC ) ; </pre> These functions take three parameters which are a mixture of lengths and angles @@ -234,8 +244,9 @@ SGfloat sgTriangleSolver_ASAtoArea ( SGfloat angA, SGfloat lenB, SGfloat angC ) ; SGfloat sgTriangleSolver_SAStoArea ( SGfloat lenA, SGfloat angB, SGfloat lenC ) ; SGfloat sgTriangleSolver_SSStoArea ( SGfloat lenA, SGfloat lenB, SGfloat lenC ) ; -SGfloat sgTriangleSolver_ASStoArea ( SGfloat angB, SGfloat lenA, SGfloat lenB ) ; SGfloat sgTriangleSolver_SAAtoArea ( SGfloat lenA, SGfloat angB, SGfloat angA ) ; +SGfloat sgTriangleSolver_ASStoArea ( SGfloat angB, SGfloat lenA, SGfloat lenB, + bool angA_is_obtuse ) ; </pre> These compute the area of a triangle from three parameters. Impossible |
From: Sebastian U. <ud...@us...> - 2002-06-12 11:27:26
|
Update of /cvsroot/plib/plib/demos/ttt3d In directory usw-pr-cvs1:/tmp/cvs-serv26209/demos/ttt3d Modified Files: configure.in Log Message: Removed unused check for xmesa.h Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- configure.in 17 Dec 2001 03:25:43 -0000 1.4 +++ configure.in 12 Jun 2002 11:27:22 -0000 1.5 @@ -50,15 +50,15 @@ AC_CHECK_LIB(MesaGL, glNewList,,,$x_suffix) fi - dnl if using mesa, check for xmesa.h - if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then - AC_CHECK_HEADER(GL/xmesa.h) - AM_CONDITIONAL(ENABLE_XMESA_FX, \ - test "x$ac_cv_header_GL_xmesa_h" = "xyes") - else - dnl force a failed check - AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") - fi +dnl dnl if using mesa, check for xmesa.h +dnl if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then +dnl AC_CHECK_HEADER(GL/xmesa.h) +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, \ +dnl test "x$ac_cv_header_GL_xmesa_h" = "xyes") +dnl else +dnl dnl force a failed check +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") +dnl fi AC_CHECK_LIB(GLU, gluLookAt,,,$x_suffix) if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then |
From: Sebastian U. <ud...@us...> - 2002-06-12 11:27:26
|
Update of /cvsroot/plib/plib/examples In directory usw-pr-cvs1:/tmp/cvs-serv26209/examples Modified Files: configure.in Log Message: Removed unused check for xmesa.h Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/examples/configure.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- configure.in 13 May 2002 17:31:54 -0000 1.19 +++ configure.in 12 Jun 2002 11:27:22 -0000 1.20 @@ -50,15 +50,15 @@ AC_CHECK_LIB(MesaGL, glNewList,,,$x_suffix) fi - dnl if using mesa, check for xmesa.h - if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then - AC_CHECK_HEADER(GL/xmesa.h) - AM_CONDITIONAL(ENABLE_XMESA_FX, \ - test "x$ac_cv_header_GL_xmesa_h" = "xyes") - else - dnl force a failed check - AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") - fi +dnl dnl if using mesa, check for xmesa.h +dnl if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then +dnl AC_CHECK_HEADER(GL/xmesa.h) +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, \ +dnl test "x$ac_cv_header_GL_xmesa_h" = "xyes") +dnl else +dnl dnl force a failed check +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") +dnl fi AC_CHECK_LIB(GLU, gluLookAt,,,$x_suffix) if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then |
From: Sebastian U. <ud...@us...> - 2002-06-12 11:27:26
|
Update of /cvsroot/plib/plib/demos/exposer In directory usw-pr-cvs1:/tmp/cvs-serv26209/demos/exposer Modified Files: configure.in Log Message: Removed unused check for xmesa.h Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- configure.in 17 Dec 2001 03:25:43 -0000 1.6 +++ configure.in 12 Jun 2002 11:27:22 -0000 1.7 @@ -50,15 +50,15 @@ AC_CHECK_LIB(MesaGL, glNewList,,,$x_suffix) fi - dnl if using mesa, check for xmesa.h - if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then - AC_CHECK_HEADER(GL/xmesa.h) - AM_CONDITIONAL(ENABLE_XMESA_FX, \ - test "x$ac_cv_header_GL_xmesa_h" = "xyes") - else - dnl force a failed check - AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") - fi +dnl dnl if using mesa, check for xmesa.h +dnl if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then +dnl AC_CHECK_HEADER(GL/xmesa.h) +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, \ +dnl test "x$ac_cv_header_GL_xmesa_h" = "xyes") +dnl else +dnl dnl force a failed check +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") +dnl fi AC_CHECK_LIB(GLU, gluLookAt,,,$x_suffix) if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then |
From: Sebastian U. <ud...@us...> - 2002-06-12 11:27:25
|
Update of /cvsroot/plib/plib/demos/p-guide In directory usw-pr-cvs1:/tmp/cvs-serv26209/demos/p-guide Modified Files: configure.in Log Message: Removed unused check for xmesa.h Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/demos/p-guide/configure.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.in 8 May 2002 22:49:55 -0000 1.1 +++ configure.in 12 Jun 2002 11:27:22 -0000 1.2 @@ -49,15 +49,15 @@ AC_CHECK_LIB(MesaGL, glNewList,,,$x_suffix) fi - dnl if using mesa, check for xmesa.h - if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then - AC_CHECK_HEADER(GL/xmesa.h) - AM_CONDITIONAL(ENABLE_XMESA_FX, \ - test "x$ac_cv_header_GL_xmesa_h" = "xyes") - else - dnl force a failed check - AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") - fi +dnl dnl if using mesa, check for xmesa.h +dnl if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then +dnl AC_CHECK_HEADER(GL/xmesa.h) +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, \ +dnl test "x$ac_cv_header_GL_xmesa_h" = "xyes") +dnl else +dnl dnl force a failed check +dnl AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes") +dnl fi AC_CHECK_LIB(GLU, gluLookAt,,,$x_suffix) if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then |
From: Steve B. <sj...@us...> - 2002-06-12 05:45:16
|
Update of /cvsroot/plib/plib/src/sg In directory usw-pr-cvs1:/tmp/cvs-serv24219/plib/src/sg Modified Files: sg.cxx sg.h Log Message: Some fixes for sgTriangleSolver. ASS-to-SAA still fails for obtuse triangles (grrr!). Index: sg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.cxx,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- sg.cxx 10 Jun 2002 05:42:33 -0000 1.31 +++ sg.cxx 12 Jun 2002 05:45:13 -0000 1.32 @@ -1701,7 +1701,7 @@ { /* Get the third angle */ - SGfloat angB = SG_180 - angA - angC ; + SGfloat angB = SG_180 - (angA + angC) ; /* Use Sine Rule to get length of a second side - then use SAStoArea. */ @@ -1756,7 +1756,6 @@ void sgTriangleSolver_SSStoAAA ( SGfloat lenA, SGfloat lenB, SGfloat lenC, SGfloat *angA, SGfloat *angB, SGfloat *angC ) { - SGfloat twoK = SG_TWO * sgTriangleSolver_SSStoArea ( lenA, lenB, lenC ) ; SGfloat aa, bb, cc ; int flag = ( lenA == SG_ZERO ) | @@ -1770,9 +1769,10 @@ switch ( flag ) { case 0 : /* no zero-lengthed sides */ - aa = sgASin ( twoK / ( lenB * lenC ) ) ; - bb = sgASin ( twoK / ( lenC * lenA ) ) ; - cc = sgASin ( twoK / ( lenA * lenB ) ) ; + /* Cosine law */ + aa = sgACos (( lenB*lenB + lenC*lenC - lenA*lenA )/(SG_TWO*lenB*lenC)) ; + bb = sgACos (( lenA*lenA + lenC*lenC - lenB*lenB )/(SG_TWO*lenA*lenC)) ; + cc = sgACos (( lenA*lenA + lenB*lenB - lenC*lenC )/(SG_TWO*lenA*lenB)) ; break ; case 1 : /* lenA is zero */ @@ -1818,14 +1818,7 @@ if ( lenB ) *lenB = lb ; - /* Get Area using SAStoArea */ - - SGfloat twoK = SG_TWO * sgTriangleSolver_SAStoArea ( lenA, angB, lenC ) ; - - if ( angA ) *angA = (lb*lenC == SG_ZERO ) ? SG_ZERO : - sgASin ( twoK / ( lb * lenC ) ) ; - if ( angC ) *angC = (lb*lenA == SG_ZERO ) ? SG_ZERO : - sgASin ( twoK / ( lb * lenA ) ) ; + sgTriangleSolver_SSStoAAA ( lenA, lenB, lenC, angA, NULL, angC ) ; } @@ -1834,7 +1827,7 @@ { /* Find the missing angle */ - SGfloat bb = SG_180 - angA - angC ; + SGfloat bb = SG_180 - (angA + angC) ; if ( angB ) *angB = bb ; @@ -1865,7 +1858,7 @@ /* Find the missing angle */ - SGfloat cc = SG_180 - aa - angB ; + SGfloat cc = SG_180 - (aa + angB) ; if ( angC ) *angC = cc ; @@ -1879,11 +1872,11 @@ { /* Find the missing angle */ - SGfloat cc = SG_180 - angB - angA ; + SGfloat cc = SG_180 - (angB + angA) ; if ( angC ) *angC = cc ; - sgTriangleSolver_ASAtoSAS ( cc, lenA, angB, lenB, NULL, lenC ) ; + sgTriangleSolver_ASAtoSAS ( cc, lenA, angB, lenC, NULL, lenB ) ; } Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- sg.h 10 Jun 2002 05:42:34 -0000 1.33 +++ sg.h 12 Jun 2002 05:45:13 -0000 1.34 @@ -866,7 +866,9 @@ // Fast code. Result is in the range 0..pi: inline SGfloat sgAngleBetweenNormalizedVec3 ( sgVec3 v1, sgVec3 v2 ) { - return (float)(acos(sgScalarProductVec3(v1,v2))*SG_RADIANS_TO_DEGREES) ; + float f = sgScalarProductVec3 ( v1, v2 ) ; + + return (float)(acos((f>=1.0f)?1.0f:(f<=-1.0f)?-1.0f:f)*SG_RADIANS_TO_DEGREES) ; } // Fast code. Result is in the range 0..pi: |
From: Sebastian U. <ud...@us...> - 2002-06-11 19:35:16
|
Update of /cvsroot/plib/plib/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv30655 Modified Files: puValue.cxx Log Message: Changed strtoint () to handle plus signs and whitespace between sign and number Index: puValue.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puValue.cxx,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- puValue.cxx 11 Jun 2002 18:58:15 -0000 1.18 +++ puValue.cxx 11 Jun 2002 19:35:12 -0000 1.19 @@ -24,10 +24,15 @@ #include "puLocal.h" +inline void skip_whitespace ( const char **str ) +{ + while ( isspace ( **str ) != 0 ) + (*str)++ ; +} + static int strtoint ( const char *str ) { - while ( isspace ( *str ) != 0 ) - str++ ; + skip_whitespace ( &str ) ; if ( *str == '\0') return 0 ; @@ -37,10 +42,15 @@ if ( *str == '-' ) { result = -1 ; - str++ ; + skip_whitespace ( &(++str) ) ; } else + { result = 1 ; + + if ( *str == '+' ) + skip_whitespace ( &(++str) ) ; + } if ( ulStrNEqual ( str, "0x", 2 ) == TRUE ) result *= (int) strtol ( str + 2, NULL, 16 ) ; /* try hexadecimal */ |
From: Sebastian U. <ud...@us...> - 2002-06-11 18:58:20
|
Update of /cvsroot/plib/plib/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv16933 Modified Files: puValue.cxx Log Message: Changed strtoint () to handle negative hex / binary / octal numbers Index: puValue.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puValue.cxx,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- puValue.cxx 10 Jun 2002 19:16:55 -0000 1.17 +++ puValue.cxx 11 Jun 2002 18:58:15 -0000 1.18 @@ -31,14 +31,27 @@ if ( *str == '\0') return 0 ; - else if ( ulStrNEqual ( str, "0x", 2 ) == TRUE ) - return (int) strtol ( str + 2, NULL, 16 ) ; /* try hexadecimal */ + + int result ; + + if ( *str == '-' ) + { + result = -1 ; + str++ ; + } + else + result = 1 ; + + if ( ulStrNEqual ( str, "0x", 2 ) == TRUE ) + result *= (int) strtol ( str + 2, NULL, 16 ) ; /* try hexadecimal */ else if ( ulStrNEqual ( str, "0o", 2 ) == TRUE ) - return (int) strtol ( str + 2, NULL, 8 ) ; /* try octal */ + result *= (int) strtol ( str + 2, NULL, 8 ) ; /* try octal */ else if ( ulStrNEqual ( str, "0b", 2 ) == TRUE ) - return (int) strtol ( str + 2, NULL, 2 ) ; /* try binary */ + result *= (int) strtol ( str + 2, NULL, 2 ) ; /* try binary */ else - return (int) strtol ( str, NULL, 10 ) ; /* try decimal */ + result *= (int) strtol ( str, NULL, 10 ) ; /* try decimal */ + + return result ; } |
From: Sebastian U. <ud...@us...> - 2002-06-11 12:44:46
|
Update of /cvsroot/plib/plib In directory usw-pr-cvs1:/tmp/cvs-serv23555 Modified Files: autogen.sh Log Message: Erik Hofman: Changes for IRIX Index: autogen.sh =================================================================== RCS file: /cvsroot/plib/plib/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- autogen.sh 16 Dec 2001 19:02:19 -0000 1.1 +++ autogen.sh 11 Jun 2002 12:44:43 -0000 1.2 @@ -1,9 +1,16 @@ #!/bin/sh +OSTYPE=`uname -s` + +AMFLAGS="--add-missing" +if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then + AMFLAGS=$AMFLAGS" --include-deps"; +fi + echo "Running aclocal" aclocal echo "Running automake" -automake --add-missing +automake $AMFLAGS echo "Running autoconf" autoconf |
From: Sebastian U. <ud...@us...> - 2002-06-11 12:40:43
|
Update of /cvsroot/plib/plib/src/ssgAux In directory usw-pr-cvs1:/tmp/cvs-serv22156 Modified Files: ssgaParticleSystem.cxx Log Message: Erik Hofman: Fixes for IRIX (and implicitly for MSVC, too) Index: ssgaParticleSystem.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaParticleSystem.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ssgaParticleSystem.cxx 23 Mar 2002 15:06:45 -0000 1.3 +++ ssgaParticleSystem.cxx 11 Jun 2002 12:40:37 -0000 1.4 @@ -31,7 +31,9 @@ particle = new ssgaParticle [ num ] ; - for ( int i = 0 ; i < num_verts ; i++ ) + int i ; + + for ( i = 0 ; i < num_verts ; i++ ) { sgSetVec3 ( getNormal ( i ), 0, -1, 0 ) ; sgSetVec4 ( getColour ( i ), 1, 1, 1, 1 ) ; @@ -39,7 +41,7 @@ *(getIndex( i )) = i ; } - for ( int i = 0 ; i < num_particles ; i++ ) + for ( i = 0 ; i < num_particles ; i++ ) { sgSetVec2 ( getTexCoord ( i*4+0 ), 0, 0 ) ; sgSetVec2 ( getTexCoord ( i*4+1 ), 1, 0 ) ; @@ -48,7 +50,7 @@ } if ( particle_create ) - for ( int i = 0 ; i < initial_num ; i++ ) + for ( i = 0 ; i < initial_num ; i++ ) (*particle_create) ( this, i, & particle [ i ] ) ; update ( 0.1 ) ; |
From: Sebastian U. <ud...@us...> - 2002-06-10 23:32:49
|
Update of /cvsroot/plib/plib/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv13153 Modified Files: pu.h puFilePicker.cxx puFileSelector.cxx Log Message: James Jones / me: Added puSliderInit / puBiSliderInit functions; Misc. Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.105 retrieving revision 1.106 diff -u -d -r1.105 -r1.106 --- pu.h 10 Jun 2002 19:16:55 -0000 1.105 +++ pu.h 10 Jun 2002 23:32:46 -0000 1.106 @@ -1093,6 +1093,17 @@ int cb_mode ; float slider_fraction ; void draw_slider_box ( int dx, int dy, float val, const char *box_label = NULL ) ; + + void puSliderInit ( int vertical ) + { + type |= PUCLASS_SLIDER ; + slider_fraction = 0.1f ; + getValue ( & last_cb_value ) ; // was last_cb_value = -1.0f ; + vert = vertical ; + cb_delta = 0.1f ; [...130 lines suppressed...] + } + puFileSelector ( int x, int y, int arrows, - const char* dir, const char *title = "Pick a file" ) ; + const char* dir, const char *title = "Pick a file" ) : + puDialogBox ( x, y ) + { + puFileSelectorInit ( x, y, arrows, 220, 170, dir, title ) ; + } + puFileSelector ( int x, int y, - const char* dir, const char *title = "Pick a file" ) ; + const char* dir, const char *title = "Pick a file" ) : + puDialogBox ( x, y ) + { + puFileSelectorInit ( x, y, 220, 170, 1, dir, title ) ; + } ~puFileSelector () ; Index: puFilePicker.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puFilePicker.cxx,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- puFilePicker.cxx 15 Apr 2002 21:44:58 -0000 1.25 +++ puFilePicker.cxx 10 Jun 2002 23:32:46 -0000 1.26 @@ -252,30 +252,6 @@ ok_button->setPosition ( (w<170)?(w/2+5):90, 10 ) ; } -puFilePicker::puFilePicker ( int x, int y, int w, int h, int arrows, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFilePickerInit ( x, y, w, h, arrows, dir, title ) ; -} - -puFilePicker::puFilePicker ( int x, int y, int w, int h, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFilePickerInit ( x, y, w, h, 1, dir, title ) ; -} - -puFilePicker::puFilePicker ( int x, int y, int arrows, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFilePickerInit ( x, y, arrows, 220, 170, dir, title ) ; -} - -puFilePicker::puFilePicker ( int x, int y, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFilePickerInit ( x, y, 220, 170, 1, dir, title ) ; -} - puFilePicker::~puFilePicker () { if ( files ) Index: puFileSelector.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puFileSelector.cxx,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- puFileSelector.cxx 29 May 2002 12:58:28 -0000 1.22 +++ puFileSelector.cxx 10 Jun 2002 23:32:46 -0000 1.23 @@ -285,30 +285,6 @@ ok_button->setPosition ( (w<170)?(w/2+5):90, 10 ) ; } -puFileSelector::puFileSelector ( int x, int y, int w, int h, int arrows, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFileSelectorInit ( x, y, w, h, arrows, dir, title ) ; -} - -puFileSelector::puFileSelector ( int x, int y, int w, int h, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFileSelectorInit ( x, y, w, h, 1, dir, title ) ; -} - -puFileSelector::puFileSelector ( int x, int y, int arrows, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFileSelectorInit ( x, y, arrows, 220, 170, dir, title ) ; -} - -puFileSelector::puFileSelector ( int x, int y, const char* dir, const char *title ) - : puDialogBox ( x, y ) -{ - puFileSelectorInit ( x, y, 220, 170, 1, dir, title ) ; -} - puFileSelector::~puFileSelector () { delete [] startDir ; |
From: Sebastian U. <ud...@us...> - 2002-06-10 23:10:17
|
Update of /cvsroot/plib/plib/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv7793 Modified Files: puDial.cxx Log Message: James Jones: Implemented different CBModes for puDial Index: puDial.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puDial.cxx,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- puDial.cxx 4 Dec 2001 21:22:15 -0000 1.20 +++ puDial.cxx 10 Jun 2002 23:10:13 -0000 1.21 @@ -147,8 +147,33 @@ setValue ( angle ) ; - puSetActiveWidget ( this, x, y ) ; - invokeCallback () ; + switch ( cb_mode ) + { + case PUSLIDER_CLICK : + if ( updown == active_mouse_edge ) + { + last_cb_value = angle ; + puSetActiveWidget ( this, x, y ) ; + invokeCallback () ; + } + break ; + + case PUSLIDER_DELTA : + if ( fabs ( last_cb_value - angle ) >= cb_delta ) + { + last_cb_value = angle ; + puSetActiveWidget ( this, x, y ) ; + invokeCallback () ; + } + break ; + + case PUSLIDER_ALWAYS : + default : + last_cb_value = angle ; + puSetActiveWidget ( this, x, y ) ; + invokeCallback () ; + break ; + } } } |
From: Sebastian U. <ud...@us...> - 2002-06-10 22:43:32
|
Update of /cvsroot/plib/plib/demos/exposer/src In directory usw-pr-cvs1:/tmp/cvs-serv554 Modified Files: boneGUI.cxx bones.cxx exposer.cxx load_save.cxx merge_tweens.cxx model.cxx timebox.cxx vertices.cxx Log Message: Cleanups Index: boneGUI.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/boneGUI.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- boneGUI.cxx 22 Jul 2001 18:49:15 -0000 1.1 +++ boneGUI.cxx 10 Jun 2002 22:43:20 -0000 1.2 @@ -1,14 +1,14 @@ #include "exposer.h" -puSlider *XtranslateSlider ; -puSlider *YtranslateSlider ; -puSlider *ZtranslateSlider ; -puInput *XtranslateInput ; -puInput *YtranslateInput ; -puInput *ZtranslateInput ; +static puSlider *XtranslateSlider ; +static puSlider *YtranslateSlider ; +static puSlider *ZtranslateSlider ; [...71 lines suppressed...] float v = (((puSlider *)sl) -> getFloatValue () - 0.5 ) * 5.0f ; @@ -163,7 +163,7 @@ -void currTranslateYCB ( puObject *sl ) +static void currTranslateYCB ( puObject *sl ) { float v = (((puSlider *)sl) -> getFloatValue () - 0.5 ) * 5.0f ; @@ -180,7 +180,7 @@ -void currTranslateZCB ( puObject *sl ) +static void currTranslateZCB ( puObject *sl ) { float v = (((puSlider *)sl) -> getFloatValue () - 0.5 ) * 5.0f ; Index: bones.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/bones.cxx,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- bones.cxx 19 Jan 2002 20:37:20 -0000 1.14 +++ bones.cxx 10 Jun 2002 22:43:22 -0000 1.15 @@ -1,9 +1,9 @@ #include "exposer.h" -sgVec3 curr_translate = { 0.0f, 0.0f, 0.0f } ; +static sgVec3 curr_translate = { 0.0f, 0.0f, 0.0f } ; -ssgSimpleState *boneState = NULL ; -Bone *bone = NULL ; +static ssgSimpleState *boneState = NULL ; +static Bone *bone = NULL ; ssgSimpleState *getBoneState () { return boneState ; } float *getCurrTranslate () { return curr_translate ; } @@ -181,7 +181,7 @@ #define NUM_COLOURS 13 -sgVec4 colourTable [] = +static sgVec4 colourTable [] = { { 1, 0, 0, 0.3f }, { 0, 1, 0, 0.3f }, { 0, 0, 1, 0.3f }, { 1, 1, 0, 0.3f }, { 1, 0, 1, 0.3f }, { 0, 1, 1, 0.3f }, Index: exposer.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/exposer.cxx,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- exposer.cxx 19 Jan 2002 20:46:08 -0000 1.19 +++ exposer.cxx 10 Jun 2002 22:43:23 -0000 1.20 @@ -1,7 +1,7 @@ #include "exposer.h" -int curr_button = 0 ; -int scroll_controllers = 0 ; +static int curr_button = 0 ; +static int scroll_controllers = 0 ; EventList * eventList = NULL ; TimeBox * timebox = NULL ; @@ -11,29 +11,29 @@ ssgRoot * boneScene = NULL ; [...154 lines suppressed...] - NULL, - reverseRegionCB, - deleteRegionAndCompressCB, - deleteRegionCB, - deleteEventCB, - addNewEventCB, - NULL } ; +static puCallback time_submenu_cb [] = { add_5_CB, + add_2_CB, + add_1_CB, + NULL, + reverseRegionCB, + deleteRegionAndCompressCB, + deleteRegionCB, + deleteEventCB, + addNewEventCB, + NULL } ; static void init_graphics () Index: load_save.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/load_save.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- load_save.cxx 8 Jun 2002 00:00:32 -0000 1.9 +++ load_save.cxx 10 Jun 2002 22:43:24 -0000 1.10 @@ -3,24 +3,24 @@ #define FILE_SELECTOR_ARGS (640-320)/2,(480-270)/2,320,270,1 -float tweeninterval = 1.0f/8.0f ; +static float tweeninterval = 1.0f/8.0f ; void setTweenInterval ( float t ) { tweeninterval = t ; } float getTweenInterval () { return tweeninterval ; } -puFileSelector *file_selector = NULL ; [...62 lines suppressed...] char path [ PUSTRING_MAX ] ; @@ -348,7 +348,7 @@ -void scpickfn ( puObject * ) +static void scpickfn ( puObject * ) { char path [ PUSTRING_MAX ] ; char fname [ PUSTRING_MAX ] ; @@ -398,7 +398,7 @@ } -void pickfn ( puObject * ) +static void pickfn ( puObject * ) { char path [ PUSTRING_MAX ] ; Index: merge_tweens.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/merge_tweens.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- merge_tweens.cxx 7 Jun 2002 23:57:54 -0000 1.2 +++ merge_tweens.cxx 10 Jun 2002 22:43:24 -0000 1.3 @@ -16,11 +16,11 @@ } -int numBones = 0 ; -int totalEvents = 0 ; -float totalTime = 0.0f ; -float floor_z = 0.0f ; -float ground_speed = 0.0f ; +static int numBones = 0 ; +static int totalEvents = 0 ; +static float totalTime = 0.0f ; +static float floor_z = 0.0f ; +static float ground_speed = 0.0f ; int main ( int argc, char **argv ) { Index: model.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/model.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- model.cxx 22 Jul 2001 23:45:03 -0000 1.6 +++ model.cxx 10 Jun 2002 22:43:24 -0000 1.7 @@ -1,11 +1,11 @@ #include "exposer.h" -int rootBone = -1 ; -int nextBone = 0 ; +static int rootBone = -1 ; +static int nextBone = 0 ; int getNumBones () { return nextBone ; } -void findChildBones ( int root ) +static void findChildBones ( int root ) { float *v0 = getBone ( root ) -> vx[0] ; float *v1 = getBone ( root ) -> vx[1] ; @@ -146,7 +146,7 @@ } -void tweenify ( ssgBranch *root ) +static void tweenify ( ssgBranch *root ) { for ( int i = 0 ; i < root -> getNumKids () ; i++ ) { @@ -196,7 +196,7 @@ } -void walkBones ( ssgBranch *root, sgMat4 mat ) +static void walkBones ( ssgBranch *root, sgMat4 mat ) { if ( root == NULL ) return ; @@ -349,7 +349,7 @@ } -void walkTransforms ( ssgBranch *root, sgMat4 mat ) +static void walkTransforms ( ssgBranch *root, sgMat4 mat ) { if ( root == NULL ) return ; Index: timebox.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/timebox.cxx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- timebox.cxx 22 Jul 2001 16:41:34 -0000 1.4 +++ timebox.cxx 10 Jun 2002 22:43:24 -0000 1.5 @@ -12,44 +12,44 @@ /* GUI callback functions. */ -void vcr_fastReverse ( puObject *ob ) +static void vcr_fastReverse ( puObject *ob ) { TimeBox *timebox = (TimeBox *) ob -> getUserData () ; timebox -> setReplaySpeed (-3.0f); } -void vcr_reverse ( puObject *ob ) +static void vcr_reverse ( puObject *ob ) { TimeBox *timebox = (TimeBox *) ob -> getUserData () ; timebox -> setReplaySpeed (-1.0f); } -void vcr_stop ( puObject *ob ) +static void vcr_stop ( puObject *ob ) { TimeBox *timebox = (TimeBox *) ob -> getUserData () ; timebox -> setReplaySpeed ( 0.0f); } -void vcr_play ( puObject *ob ) +static void vcr_play ( puObject *ob ) { TimeBox *timebox = (TimeBox *) ob -> getUserData () ; timebox -> setReplaySpeed ( 1.0f); } -void vcr_fastPlay ( puObject *ob ) +static void vcr_fastPlay ( puObject *ob ) { TimeBox *timebox = (TimeBox *) ob -> getUserData () ; timebox -> setReplaySpeed ( 3.0f); } -void vcr_groundSpeed ( puObject *ob ) +static void vcr_groundSpeed ( puObject *ob ) { TimeBox *timebox = (TimeBox *) ob -> getUserData () ; timebox -> setGroundSpeed ( ob -> getFloatValue () ) ; } -void timescrollerCB ( puObject *ob ) +static void timescrollerCB ( puObject *ob ) { TimeBox *timebox = (TimeBox *) ob -> getUserData () ; Index: vertices.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/vertices.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vertices.cxx 22 Jul 2001 18:49:15 -0000 1.1 +++ vertices.cxx 10 Jun 2002 22:43:24 -0000 1.2 @@ -13,11 +13,11 @@ } ; -int nextVertex = 0 ; +static int nextVertex = 0 ; #define MAX_VERTICES (64*1024) -Vertex vertex [ MAX_VERTICES ] ; +static Vertex vertex [ MAX_VERTICES ] ; |
Update of /cvsroot/plib/plib/demos/ttt3d/src In directory usw-pr-cvs1:/tmp/cvs-serv21543 Modified Files: cell.cxx game.cxx gfx.cxx material.cxx material.h p3d.h sound.cxx sound.h status.cxx status.h ttt3d.cxx Log Message: Solved some compiler warnings; Cleanups Index: cell.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/cell.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cell.cxx 20 Jun 2001 05:40:10 -0000 1.1 +++ cell.cxx 10 Jun 2002 22:13:30 -0000 1.2 @@ -2,9 +2,9 @@ #include "p3d.h" #include <plib/ssgAux.h> -ssgBranch *wire_cube = NULL ; -ssgBranch * X_cube = NULL ; -ssgBranch * O_cube = NULL ; +static ssgBranch *wire_cube = NULL ; +static ssgBranch * X_cube = NULL ; +static ssgBranch * O_cube = NULL ; ssgTransform *makeGround () @@ -163,7 +163,7 @@ } -void makeWireCube() +static void makeWireCube() { wire_cube = new ssgBranch () ; @@ -204,7 +204,7 @@ } -ssgBranch *X () +static ssgBranch *X () { ssgaCube *XXX = new ssgaCube () ; @@ -215,7 +215,7 @@ } -ssgBranch *O () +static ssgBranch *O () { ssgaSphere *OOO = new ssgaSphere ( 300 ) ; @@ -226,14 +226,14 @@ } -void makeXcube () +static void makeXcube () { X_cube = new ssgBranch () ; X_cube -> addKid ( X () ) ; } -void makeOcube () +static void makeOcube () { O_cube = new ssgBranch () ; O_cube -> addKid ( O () ) ; Index: game.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/game.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- game.cxx 21 Jun 2001 02:02:04 -0000 1.2 +++ game.cxx 10 Jun 2002 22:13:31 -0000 1.3 @@ -4,19 +4,19 @@ #include <ctype.h> #include "game.h" -char board [4][4][4] ; -int last_x = -1 ; -int last_y = -1 ; -int last_z = -1 ; +static char board [4][4][4] ; +static int last_x = -1 ; +static int last_y = -1 ; +static int last_z = -1 ; #define NUM_ROWS ( 3 * 16 + 3 * 8 + 4 ) -char *row [ NUM_ROWS ][ 4 ] ; -char rowptr [ 4 ][ 4 ][ 4 ][ 8 ] ; -char rowptrctr [ 4 ][ 4 ][ 4 ] ; +static char *row [ NUM_ROWS ][ 4 ] ; +static char rowptr [ 4 ][ 4 ][ 4 ][ 8 ] ; +static char rowptrctr [ 4 ][ 4 ][ 4 ] ; -void setupRowArray () +static void setupRowArray () { int x, y, z; @@ -184,7 +184,7 @@ } -void clearBoard () +static void clearBoard () { for ( int x = 0 ; x < 4 ; x++ ) for ( int y = 0 ; y < 4 ; y++ ) @@ -193,7 +193,7 @@ } -void printBoard ( int winrow ) +/*void printBoard ( int winrow ) { int x, y, z; @@ -275,11 +275,11 @@ printf ( "\n" ) ; printf ( "\n" ) ; -} +}*/ -int value [4][4] = /* Value of 1000000 means play here to win. */ +static int value [4][4] = /* Value of 1000000 means play here to win. */ { { 1, 3,10, 1000000 }, /* No enemy, 0,1,2,3 of ours */ { 2, 0, 0, 0 }, /* One enemy, 0,1,2,3 of ours */ @@ -292,7 +292,7 @@ static int win = STILL_PLAYING ; -int countRow ( int r ) +static int countRow ( int r ) { int x = 0 ; int o = 0 ; @@ -318,7 +318,7 @@ -int getLoc ( char *msg ) +/*int getLoc ( char *msg ) { while ( 1 ) @@ -348,7 +348,7 @@ else printf ( "Please type a NUMBER in the range 0 to 63.\n" ) ; } -} +}*/ Index: gfx.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/gfx.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gfx.cxx 20 Jun 2001 06:11:48 -0000 1.2 +++ gfx.cxx 10 Jun 2002 22:13:31 -0000 1.3 @@ -20,12 +20,12 @@ return k ; } -void reshape ( int w, int h ) +static void reshape ( int w, int h ) { glViewport ( 0, 0, w, h ) ; } -void initWindow ( int w, int h ) +static void initWindow ( int w, int h ) { int fake_argc = 1 ; char *fake_argv[3] ; Index: material.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/material.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- material.cxx 20 Jun 2001 05:40:10 -0000 1.1 +++ material.cxx 10 Jun 2002 22:13:31 -0000 1.2 @@ -3,7 +3,7 @@ ssgSimpleState *default_gst, *O_gst, *X_gst, *ground_gst, *ctrls_gst ; -Material gs_setup [] = +static Material gs_setup [] = { /* gst texture_map clamp, trans,aref,light,frctn,0 */ { &default_gst, "", FALSE, TRUE , 0.0, FALSE, 1.0, 0 }, @@ -61,7 +61,7 @@ -ssgState *getAppState ( char *fname ) +static ssgState *getAppState ( char *fname ) { if ( fname == NULL || fname[0] == '\0' ) return gs_setup [ 0 ] . getState() ; @@ -139,7 +139,7 @@ } -Material *getMaterial ( ssgState *s ) +/*Material *getMaterial ( ssgState *s ) { return & ( gs_setup [ s -> getExternalPropertyIndex () ] ) ; } @@ -148,5 +148,5 @@ Material *getMaterial ( ssgLeaf *l ) { return getMaterial ( l -> getState () ) ; -} +}*/ Index: material.h =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/material.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- material.h 20 Jun 2001 05:40:10 -0000 1.1 +++ material.h 10 Jun 2002 22:13:31 -0000 1.2 @@ -21,8 +21,8 @@ void initMaterials () ; -Material *getMaterial ( ssgState *s ) ; -Material *getMaterial ( ssgLeaf *l ) ; +/*Material *getMaterial ( ssgState *s ) ; +Material *getMaterial ( ssgLeaf *l ) ;*/ extern ssgSimpleState *default_gst, *O_gst, *X_gst, *ground_gst, *ctrls_gst ; Index: p3d.h =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/p3d.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- p3d.h 20 Jun 2001 05:40:10 -0000 1.1 +++ p3d.h 10 Jun 2002 22:13:31 -0000 1.2 @@ -43,7 +43,7 @@ extern int game_state ; extern ssgRoot *scene ; -extern char *ttt3d_datadir ; +//extern const char *ttt3d_datadir ; void startLevel () ; void makeMove () ; Index: sound.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/sound.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sound.cxx 20 Jun 2001 05:40:10 -0000 1.1 +++ sound.cxx 10 Jun 2002 22:13:31 -0000 1.2 @@ -3,7 +3,7 @@ struct Sound { - char *fname ; + const char *fname ; slSample *s ; } ; @@ -33,7 +33,7 @@ } -void SoundSystem::change_track ( char *fname ) +void SoundSystem::change_track ( const char *fname ) { if ( fname == NULL ) fname = "" ; Index: sound.h =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/sound.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sound.h 20 Jun 2001 05:40:10 -0000 1.1 +++ sound.h 10 Jun 2002 22:13:31 -0000 1.2 @@ -23,7 +23,7 @@ sched -> setSafetyMargin ( t ) ; } - void change_track ( char *fname ) ; + void change_track ( const char *fname ) ; void disable_music () ; void enable_music () ; Index: status.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/status.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- status.cxx 28 Dec 2001 23:15:19 -0000 1.2 +++ status.cxx 10 Jun 2002 22:13:31 -0000 1.3 @@ -10,13 +10,13 @@ #define MAX_STRING 30 #define MAX_STRING_LENGTH 256 -int displayed_score = 0 ; +static int displayed_score = 0 ; static fntRenderer *text = NULL ; char debug_strings [ MAX_STRING ][ MAX_STRING_LENGTH ] ; -int next_string = 0 ; -int stats_enabled = FALSE ; [...127 lines suppressed...] static int timer = 0 ; @@ -255,7 +255,7 @@ } -void drawGameIntroText () +static void drawGameIntroText () { static int timer = 0 ; @@ -279,7 +279,7 @@ } -void drawGameRunningText ( int score ) +static void drawGameRunningText ( int score ) { displayed_score = score ; drawInGameScore () ; Index: status.h =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/status.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- status.h 20 Jun 2001 05:40:10 -0000 1.1 +++ status.h 10 Jun 2002 22:13:31 -0000 1.2 @@ -1,17 +1,17 @@ void drawStatusText ( int score ) ; -void stPrintf ( char *fmt, ... ) ; -void stToggle () ; +/*void stPrintf ( char *fmt, ... ) ; +void stToggle () ;*/ -void memorial () ; +//void memorial () ; void about () ; void credits () ; void versions () ; void help () ; void hide_status () ; -double read_time_of_day () ; +/*double read_time_of_day () ; void start_stopwatch () ; -extern int time_out ; +extern int time_out ;*/ Index: ttt3d.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/ttt3d/src/ttt3d.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ttt3d.cxx 21 Jun 2001 02:02:04 -0000 1.2 +++ ttt3d.cxx 10 Jun 2002 22:13:31 -0000 1.3 @@ -11,17 +11,17 @@ # define F_OK 04 #endif -char *ttt3d_datadir = NULL ; +static const char *ttt3d_datadir = NULL ; GFX *gfx = NULL ; GUI *gui = NULL ; SoundSystem *sound = NULL ; ssgRoot *scene = NULL ; -ssgTransform *spin = NULL ; +static ssgTransform *spin = NULL ; Puzzle *puzzle = NULL ; -float spin_rot = 0.0f ; -float spin_alt = 0.0f ; -float spin_pit = 0.0f ; -float zoom = 60.0f ; +static float spin_rot = 0.0f ; +static float spin_alt = 0.0f ; +static float spin_pit = 0.0f ; +static float zoom = 60.0f ; int game_state = GAME_START_OF_DAY ; Level level ; @@ -133,7 +133,7 @@ -void spinPuzzle () +static void spinPuzzle () { sgMat4 rot, pit, final ; |
From: Sebastian U. <ud...@us...> - 2002-06-10 20:58:08
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv23171 Modified Files: ssg.cxx ssgParser.cxx Log Message: Cleanups Index: ssg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.cxx,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- ssg.cxx 10 Jun 2002 14:15:13 -0000 1.53 +++ ssg.cxx 10 Jun 2002 20:58:03 -0000 1.54 @@ -64,8 +64,8 @@ sgVec2 _ssgTexCoord00 = { 0.0f, 0.0f } ; short _ssgIndex0 = 0; -ssgLight _ssgLights [ 8 ] ; -int _ssgFrameCounter = 0 ; +static ssgLight _ssgLights [ 8 ] ; +static int _ssgFrameCounter = 0 ; int ssgGetFrameCounter () { return _ssgFrameCounter ; } void ssgSetFrameCounter ( int fc ) { _ssgFrameCounter = fc ; } Index: ssgParser.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgParser.cxx,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ssgParser.cxx 18 Dec 2001 16:35:59 -0000 1.24 +++ ssgParser.cxx 10 Jun 2002 20:58:03 -0000 1.25 @@ -270,7 +270,7 @@ onechartokenbuf_ptr += 2; // prepare for nect onechartoken } -char *mystrchr( const char *string, int c ) +static char *mystrchr( const char *string, int c ) // like strchr, but string may be NULL { if (string == NULL ) |
From: Sebastian U. <ud...@us...> - 2002-06-10 20:41:54
|
Update of /cvsroot/plib/plib/src/ssgAux In directory usw-pr-cvs1:/tmp/cvs-serv17823 Modified Files: ssgaShapes.cxx ssgaShapes.h Log Message: Frederic Bouvier: Updates Index: ssgaShapes.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaShapes.cxx,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ssgaShapes.cxx 7 Nov 2001 23:51:10 -0000 1.20 +++ ssgaShapes.cxx 10 Jun 2002 20:41:46 -0000 1.21 @@ -173,12 +173,12 @@ ssgaSphere ::~ssgaSphere (void) {} ssgaCylinder::~ssgaCylinder (void) {} -char *ssgaShape ::getTypeName(void) { return "ssgaShape" ; } -char *ssgaCube ::getTypeName(void) { return "ssgaCube" ; } -char *ssgaSphere ::getTypeName(void) { return "ssgaSphere" ; } -char *ssgaCylinder::getTypeName(void) { return "ssgaCylinder" ; } -char *ssgaPatch ::getTypeName(void) { return "ssgaPatch" ; } -char *ssgaTeapot ::getTypeName(void) { return "ssgaTeapot" ; } +const char *ssgaShape ::getTypeName(void) { return "ssgaShape" ; } +const char *ssgaCube ::getTypeName(void) { return "ssgaCube" ; } +const char *ssgaSphere ::getTypeName(void) { return "ssgaSphere" ; } +const char *ssgaCylinder::getTypeName(void) { return "ssgaCylinder" ; } +const char *ssgaPatch ::getTypeName(void) { return "ssgaPatch" ; } +const char *ssgaTeapot ::getTypeName(void) { return "ssgaTeapot" ; } void ssgaCube ::regenerate () Index: ssgaShapes.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaShapes.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ssgaShapes.h 7 Nov 2001 23:51:10 -0000 1.9 +++ ssgaShapes.h 10 Jun 2002 20:41:49 -0000 1.10 @@ -57,7 +57,7 @@ ssgaShape (void) ; ssgaShape ( int numtris ) ; virtual ~ssgaShape (void) ; - virtual char *getTypeName(void) ; + virtual const char *getTypeName(void) ; void makeCorrupt () { corrupted = TRUE ; } int isCorrupt () { return corrupted ; } @@ -107,7 +107,7 @@ ssgaCube (void) ; ssgaCube ( int numtris ) ; virtual ~ssgaCube (void) ; - virtual char *getTypeName(void) ; + virtual const char *getTypeName(void) ; virtual void regenerate () ; } ; @@ -140,7 +140,7 @@ void getControlPoint ( int s, int t, sgVec3 xyz, sgVec2 uv, sgVec4 rgba ) ; virtual ~ssgaPatch (void) ; - virtual char *getTypeName(void) ; + virtual const char *getTypeName(void) ; virtual void regenerate () ; virtual int load ( FILE * ) ; @@ -160,7 +160,7 @@ ssgaTeapot (void) ; ssgaTeapot ( int numtris ) ; virtual ~ssgaTeapot (void) ; - virtual char *getTypeName(void) ; + virtual const char *getTypeName(void) ; virtual void regenerate () ; virtual int load ( FILE * ) ; @@ -182,7 +182,7 @@ ssgaSphere (void) ; ssgaSphere ( int numtris ) ; virtual ~ssgaSphere (void) ; - virtual char *getTypeName(void) ; + virtual const char *getTypeName(void) ; virtual void regenerate () ; void setLatLongStyle ( int ll ) { latlong_style = ll ; regenerate () ; } @@ -205,7 +205,7 @@ ssgaCylinder (void) ; ssgaCylinder ( int numtris ) ; virtual ~ssgaCylinder (void) ; - virtual char *getTypeName(void) ; + virtual const char *getTypeName(void) ; virtual void regenerate () ; void makeCapped ( int c ) { capped = c ; regenerate () ; } |
From: Sebastian U. <ud...@us...> - 2002-06-10 20:25:38
|
Update of /cvsroot/plib/plib/src/ssg In directory usw-pr-cvs1:/tmp/cvs-serv9832 Modified Files: ssgSaveAC.cxx Log Message: Cleanups Index: ssgSaveAC.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgSaveAC.cxx,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ssgSaveAC.cxx 23 Mar 2002 15:06:45 -0000 1.17 +++ ssgSaveAC.cxx 10 Jun 2002 20:25:34 -0000 1.18 @@ -39,7 +39,7 @@ static saveTriangle *tlist ; -int ssgSaveLeaf ( ssgEntity *ent ) +static int ssgSaveLeaf ( ssgEntity *ent ) { int i; assert ( ent -> isAKindOf ( ssgTypeLeaf() ) ) ; @@ -143,7 +143,7 @@ -int ssgSaveACInner ( ssgEntity *ent ) +static int ssgSaveACInner ( ssgEntity *ent ) { /* WARNING - RECURSIVE! */ |