[Plib-cvs] plib/src/ssgAux ssgaBillboards.cxx,1.3,1.4
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-02-25 15:46:52
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13982/plib/src/ssgAux Modified Files: ssgaBillboards.cxx Log Message: Fixed some compilation problems for AIX (and added UL_AIX). Fixed some warnings in ssgLoadMDL.cxx Index: ssgaBillboards.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaBillboards.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ssgaBillboards.cxx 21 Jan 2004 22:33:46 -0000 1.3 +++ ssgaBillboards.cxx 25 Feb 2004 15:39:34 -0000 1.4 @@ -22,6 +22,7 @@ */ +#include <math.h> #include "ssgaBillboards.h" @@ -244,7 +245,7 @@ // fast path when Z is up - float wx, wy, hz, len; + float wx, wy, heightz, len; wx = z_axis[1]; wy = -z_axis[0]; @@ -254,7 +255,7 @@ wx *= 0.5f * width / len; wy *= 0.5f * width / len; - hz = height; + heightz = height; for (int i = 0; i < n; i++) { float x, y, z, s, dx, dy; @@ -273,7 +274,7 @@ glTexCoord2f(1, 0); glVertex3f(x + dx, y + dy, z); - z += s * hz; + z += s * heightz; glTexCoord2f(1, 1); glVertex3f(x + dx, y + dy, z); @@ -292,15 +293,15 @@ float len = sgLengthVec3(xy); if (len > 1e-6f) { - float wx, wy, wz, hx, hy, hz; + float wx, wy, wz, heightx, heighty, heightz; wx = 0.5f * width * xy[0] / len; wy = 0.5f * width * xy[1] / len; wz = 0.5f * width * xy[2] / len; - hx = height * up[0]; - hy = height * up[1]; - hz = height * up[2]; + heightx = height * up[0]; + heighty = height * up[1]; + heightz = height * up[2]; for (int i = 0; i < n; i++) { float x, y, z, s, dx, dy, dz; @@ -320,9 +321,9 @@ glTexCoord2f(1, 0); glVertex3f(x + dx, y + dy, z + dz); - x += s * hx; - y += s * hy; - z += s * hz; + x += s * heightx; + y += s * heighty; + z += s * heightz; glTexCoord2f(1, 1); glVertex3f(x + dx, y + dy, z + dz); |