[Plib-cvs] plib/src/ssgAux ssgaFire.cxx,NONE,1.1 ssgaFire.h,NONE,1.1 Makefile.am,1.9,1.10 ssgAux.h,1
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-08-28 00:14:44
|
Update of /cvsroot/plib/plib/src/ssgAux In directory usw-pr-cvs1:/tmp/cvs-serv18783/plib/src/ssgAux Modified Files: Makefile.am ssgAux.h ssgaParticleSystem.cxx Added Files: ssgaFire.cxx ssgaFire.h Log Message: A *very* early attempt at fire. --- NEW FILE: ssgaFire.cxx --- #include "ssg.h" #include "ssgAux.h" void _ssgaFireParticleCreate ( ssgaParticleSystem *ps, int index, ssgaParticle *p ) { sgSetVec4 ( p -> col, 1.0f, 0.2f, 0.06f, 0.3 ) ; sgSetVec3 ( p -> pos, (float)(rand()%1000)/750.0f - 0.35f, (float)(rand()%1000)/750.0f - 0.35f, 0.0f ) ; sgSetVec3 ( p -> vel, 0, 0, 2.0f ) ; sgSetVec3 ( p -> acc, 0, 0, 0 ) ; p -> time_to_live = 3 ; p -> size = 0.4f ; } void _ssgaFireParticleUpdate ( float deltaTime, [...101 lines suppressed...] 4,20,36,51,67,83,99,115,131,147,162,178,193,207,220,229,230,221,209,194,179,164,148,133,117,101,85,69,53,38,22,6, 3,17,33,49,65,80,96,111,127,142,157,171,185,197,208,214,214,209,199,187,173,159,144,129,113,98,82,67,51,35,19,4, 1,14,30,45,61,76,91,106,121,135,149,163,175,185,194,198,199,194,187,176,164,151,137,123,108,93,78,63,47,32,16,2, 0,10,25,40,56,70,85,100,114,127,140,152,163,172,179,182,183,179,173,164,154,142,129,115,101,87,72,57,42,27,12,1, 0,5,20,35,49,64,78,92,105,118,129,140,150,158,163,167,167,164,159,151,142,131,119,106,93,79,65,51,36,22,7,0, 0,1,13,28,42,56,69,82,95,107,118,128,136,143,148,151,151,148,144,137,129,119,108,96,84,71,57,44,30,15,2,0, 0,0,6,20,34,47,60,72,84,95,105,114,122,128,132,135,135,133,129,123,115,106,96,85,74,61,49,35,22,8,0,0, 0,0,1,11,25,37,50,61,72,83,92,100,107,113,117,119,119,117,113,108,101,93,84,74,63,51,39,26,13,2,0,0, 0,0,0,3,15,27,39,50,60,70,78,86,92,97,101,103,103,101,98,93,87,79,71,61,51,40,28,16,4,0,0,0, 0,0,0,0,5,16,27,38,47,56,64,72,77,82,85,87,87,85,82,78,72,65,57,49,39,28,17,6,0,0,0,0, 0,0,0,0,0,5,15,25,34,43,50,57,62,66,69,71,71,69,67,63,57,51,44,35,26,16,6,0,0,0,0,0, 0,0,0,0,0,0,3,12,21,29,36,42,47,50,53,54,55,53,51,47,42,36,30,22,13,4,0,0,0,0,0,0, 0,0,0,0,0,0,0,1,7,14,21,27,31,35,37,38,39,38,35,32,27,22,15,8,2,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,2,6,11,16,19,21,22,22,22,19,16,12,7,2,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,6,6,6,4,2,1,0,0,0,0,0,0,0,0,0,0,0 } ; unsigned char *_ssgaGetFireTexture () { return fuzzyBlob ; } --- NEW FILE: ssgaFire.h --- #include "ssgAux.h" class ssgaFire : public ssgaParticleSystem { public: ssgaFire ( int num, int initial_num, float _create_rate, float bsphere_size ) ; virtual ~ssgaFire () ; virtual void update ( float t ) ; } ; unsigned char *_ssgaGetFireTexture () ; Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile.am 24 Aug 2002 16:56:53 -0000 1.9 +++ Makefile.am 28 Aug 2002 00:14:34 -0000 1.10 @@ -1,15 +1,21 @@ lib_LIBRARIES = libplibssgaux.a -include_HEADERS = ssgAux.h ssgaShapes.h ssgaLensFlare.h ssgaParticleSystem.h ssgaWaveSystem.h +include_HEADERS = ssgAux.h \ + ssgaShapes.h \ + ssgaLensFlare.h \ + ssgaParticleSystem.h \ + ssgaWaveSystem.h \ + ssgaFire.h -libplibssgaux_a_SOURCES = ssgAux.cxx \ - ssgaShapes.cxx \ - ssgaPatch.cxx \ - ssgaParticleSystem.cxx \ - ssgaWaveSystem.cxx \ - ssgaLensFlare.cxx \ +libplibssgaux_a_SOURCES = ssgAux.cxx \ + ssgaShapes.cxx \ + ssgaPatch.cxx \ + ssgaParticleSystem.cxx \ + ssgaWaveSystem.cxx \ + ssgaLensFlare.cxx \ ssgaLensFlareTexture.cxx \ + ssgaFire.cxx \ ssgaTeapot.cxx INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/ssg Index: ssgAux.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgAux.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ssgAux.h 24 Aug 2002 16:56:53 -0000 1.12 +++ ssgAux.h 28 Aug 2002 00:14:34 -0000 1.13 @@ -29,6 +29,7 @@ #include "ssg.h" #include "ssgaShapes.h" #include "ssgaParticleSystem.h" +#include "ssgaFire.h" #include "ssgaWaveSystem.h" #include "ssgaLensFlare.h" Index: ssgaParticleSystem.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaParticleSystem.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ssgaParticleSystem.cxx 27 Aug 2002 22:29:20 -0000 1.6 +++ ssgaParticleSystem.cxx 28 Aug 2002 00:14:34 -0000 1.7 @@ -74,8 +74,8 @@ sgSetVec3 ( xx, mat[0][0] * sz, mat[1][0] * sz, mat[2][0] * sz ) ; sgSetVec3 ( yy, mat[0][1] * sz, mat[1][1] * sz, mat[2][1] * sz ) ; - sgSetVec3 ( nxny, -xx[0]+yy[0], -xx[1]+yy[1], -xx[2]+yy[2] ) ; - sgSetVec3 ( nxyy, -xx[0]-yy[0], -xx[1]-yy[1], -xx[2]-yy[2] ) ; + sgSetVec3 ( nxny, -xx[0]-yy[0], -xx[1]-yy[1], -xx[2]-yy[2] ) ; + sgSetVec3 ( nxyy, -xx[0]+yy[0], -xx[1]+yy[1], -xx[2]+yy[2] ) ; sgSetVec3 ( xxny, xx[0]-yy[0], xx[1]-yy[1], xx[2]-yy[2] ) ; sgSetVec3 ( xxyy, xx[0]+yy[0], xx[1]+yy[1], xx[2]+yy[2] ) ; } |