[Plib-cvs] plib/src/ssgAux ssgaBillboards.cxx,1.1,1.2 ssgaBillboards.h,1.1,1.2
Brought to you by:
sjbaker
From: M?rten Str?m. <str...@us...> - 2004-01-21 16:30:24
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv15870 Modified Files: ssgaBillboards.cxx ssgaBillboards.h Log Message: fabsf and hypotf missing on Mac systems. Index: ssgaBillboards.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaBillboards.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaBillboards.cxx 30 Nov 2003 20:29:05 -0000 1.1 +++ ssgaBillboards.cxx 21 Jan 2004 16:30:20 -0000 1.2 @@ -21,12 +21,19 @@ $Id$ */ -// $Id$ - #include "ssgaBillboards.h" +#ifdef UL_MAC_OSX +#define fabsf(x) ((x) < 0 ? -(x) : (x)) +#define hypotf(x, y) sqrtf((x)*(x) + (y)*(y)) +#endif + + +int ssgaBillboards::total_drawn = 0; + + inline float max3f(const float v[3]) { float tmp = v[0] >= v[1] ? v[0] : v[1]; @@ -34,9 +41,6 @@ } -int ssgaBillboards::total_drawn = 0; - - inline double random_value() { #ifdef UL_WIN32 @@ -93,7 +97,7 @@ sgSphere sph; sgCopyVec3(sph.center, get(i)); float s = get(i)[3]; - sph.radius = s * width; + sph.radius = 0.5f * s * width; bsphere.extend(&sph); sgAddScaledVec3(sph.center, up, s * height); bsphere.extend(&sph); Index: ssgaBillboards.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaBillboards.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaBillboards.h 30 Nov 2003 20:29:05 -0000 1.1 +++ ssgaBillboards.h 21 Jan 2004 16:30:20 -0000 1.2 @@ -21,8 +21,6 @@ $Id$ */ -// $Id - /* * ssgaBillboards * |