[Plib-cvs] plib/src/ssgAux ssgaBillboards.cxx,NONE,1.1 ssgaBillboards.h,NONE,1.1 Makefile.am,1.15,1.
Brought to you by:
sjbaker
From: M?rten Str?m. <str...@us...> - 2003-11-30 20:29:08
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv25800 Modified Files: Makefile.am Added Files: ssgaBillboards.cxx ssgaBillboards.h Log Message: ssgaBillboards initial checkin --- NEW FILE: ssgaBillboards.cxx --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 1998,2002 Steve Baker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net [...367 lines suppressed...] void ssgaBillboards::transform(const sgMat4 m) { float scale = sgLengthVec3(m[0]); for (int i = 0; i < getNum(); i++) sgXformPnt3(array.get(i), array.get(i), m); sgXformVec3(up, up, m); sgNormaliseVec3(up); width *= scale; height *= scale; } /* Local Variables: mode: C++ c-basic-offset: 4 c-file-offsets: ((substatement-open 0) (case-label 0)) End: */ --- NEW FILE: ssgaBillboards.h --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 1998,2002 Steve Baker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net [...190 lines suppressed...] assert( ss && ss->isAKindOf( ssgTypeSimpleState() )); ss->setTexture(tex); } inline ssgTexture *ssgaBillboards::getTexture() { ssgSimpleState *ss = (ssgSimpleState *) getState(); assert( ss && ss->isAKindOf( ssgTypeSimpleState() )); return ss->getTexture(); } /* Local Variables: mode: C++ c-basic-offset: 4 c-file-offsets: ((substatement-open 0) (case-label 0)) End: */ Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.am 4 Aug 2003 22:33:46 -0000 1.15 +++ Makefile.am 30 Nov 2003 20:29:05 -0000 1.16 @@ -10,7 +10,8 @@ ssgaScreenDump.h \ ssgaSky.h \ ssgaSphere.h \ - ssgaFire.h + ssgaFire.h \ + ssgaBillboards.h libplibssgaux_a_SOURCES = ssgAux.cxx \ ssgaShapes.cxx \ @@ -27,7 +28,8 @@ ssgaStars.cxx \ ssgaSkyDome.cxx \ ssgaSky.cxx \ - ssgaTeapot.cxx + ssgaTeapot.cxx \ + ssgaBillboards.cxx INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/ssg INCLUDES += -I$(top_srcdir)/src/util |