00001 /*************************************************************************** 00002 * Copyright (C) 2007 by * 00003 * Pierre-yves JEZEQUEL, Julien MICHOT, Loic MOISAN, * 00004 * Julien PAPILLON, Sebastien PINEAUD, Barthelemy SERRES * 00005 * * 00006 * https://sourceforge.net/projects/anidam * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU General Public License * 00019 * along with this program; if not, write to the * 00020 * Free Software Foundation, Inc., * 00021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00022 ***************************************************************************/ 00023 #ifndef C_CHUTE_H 00024 #define C_CHUTE_H 00025 00026 #include <osgProducer/Viewer> 00027 #include <osg/MatrixTransform> 00028 #include <osgDB/ReadFile> 00029 #include <osgDB/FileUtils> 00030 #include <osg/Group> 00031 #include <osg/Geode> 00032 #include <osg/BoundingBox> 00033 00034 #include <osgParticle/Particle> 00035 #include <osgParticle/ParticleSystem> 00036 #include <osgParticle/ParticleSystemUpdater> 00037 #include <osgParticle/ModularEmitter> 00038 #include <osgParticle/ModularProgram> 00039 #include <osgParticle/RandomRateCounter> 00040 #include <osgParticle/SectorPlacer> 00041 #include <osgParticle/RadialShooter> 00042 #include <osgParticle/AccelOperator> 00043 #include <osgParticle/FluidFrictionOperator> 00044 #include <osgParticle/AccelOperator> 00045 #include <osgParticle/MultiSegmentPlacer> 00046 #include <osgParticle/RadialShooter> 00047 #include <osgParticle/Interpolator> 00048 #include <osg/MatrixTransform> 00049 #include <osg/PositionAttitudeTransform> 00050 #include <osg/NodeCallback> 00051 00052 #include "CallbackParticle.h" 00053 00054 using namespace std; 00055 00056 class C_Chute{ 00057 public : 00058 osg::Group *rootNode; 00059 osg::Geode *geode; 00060 osg::Group *node_emitter; 00061 osgParticle::ParticleSystem *ChuteParticleSystem; 00062 osgParticle::ModularEmitter *emitter; 00063 osgParticle::SectorPlacer *placer; 00064 osgParticle::RadialShooter* smokeShooter; 00065 osgParticle::AccelOperator *accelUp; 00066 osgParticle::FluidFrictionOperator *airFriction; 00067 osgParticle::ParticleSystemUpdater *ChuteSystemUpdater; 00068 00069 int type; 00070 00071 string pathTexture; 00072 double lifeTime; //dur�e de vie de la particule en seconde 00073 double mass; //masse de la particule en kg 00074 double range_min; //taille particule min en metre 00075 double range_max; //taille particule max en metre 00076 int nbGenerate; //nombre de particules g�n�r�es par seconde 00077 double gravite; 00078 double radiusRangeMin; 00079 double radiusRangeMax; 00080 double thetaRangeMin; 00081 double speedRangeMin; 00082 double speedRangeMax; 00083 double phiRangeMax; 00084 double phiRangeMin; 00085 double thetaRangeMax; 00086 bool enableGrav; 00087 bool enableShooter; 00088 bool enableAcc; 00089 osg::Vec3 vecAcceleration; 00090 00091 C_Chute(osg::Group *g,osg::Group *n,string pathTextEau); 00092 00093 void Creer_Chute(double x, double y, double z); 00094 }; 00095 00096 #endif