Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -31,26 +31,26 @@ ExplosionEffect::ExplosionEffect(bool automaticSetup):
|
||||
ParticleEffect(automaticSetup)
|
||||
{
|
||||
setDefaults();
|
||||
|
||||
|
||||
_position.set(0.0f,0.0f,0.0f);
|
||||
_scale = 1.0f;
|
||||
_intensity = 1.0f;
|
||||
|
||||
|
||||
_emitterDuration = 1.0;
|
||||
|
||||
|
||||
if (_automaticSetup) buildEffect();
|
||||
}
|
||||
|
||||
ExplosionEffect::ExplosionEffect(const osg::Vec3& position, float scale, float intensity)
|
||||
{
|
||||
setDefaults();
|
||||
|
||||
|
||||
_position = position;
|
||||
_scale = scale;
|
||||
_intensity = intensity;
|
||||
|
||||
|
||||
_emitterDuration = 1.0;
|
||||
|
||||
|
||||
if (_automaticSetup) buildEffect();
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ ExplosionEffect::ExplosionEffect(const ExplosionEffect& copy, const osg::CopyOp&
|
||||
void ExplosionEffect::setDefaults()
|
||||
{
|
||||
ParticleEffect::setDefaults();
|
||||
|
||||
_textureFileName = "Images/smoke.rgb";
|
||||
|
||||
_textureFileName = "Images/smoke.rgb";
|
||||
_emitterDuration = 1.0;
|
||||
|
||||
// set up unit particle.
|
||||
@@ -72,7 +72,7 @@ void ExplosionEffect::setDefaults()
|
||||
_defaultParticleTemplate.setSizeRange(osgParticle::rangef(0.75f, 3.0f));
|
||||
_defaultParticleTemplate.setAlphaRange(osgParticle::rangef(0.1f, 1.0f));
|
||||
_defaultParticleTemplate.setColorRange(osgParticle::rangev4(
|
||||
osg::Vec4(1.0f, 0.8f, 0.2f, 1.0f),
|
||||
osg::Vec4(1.0f, 0.8f, 0.2f, 1.0f),
|
||||
osg::Vec4(1.0f, 0.4f, 0.1f, 0.0f)));
|
||||
|
||||
}
|
||||
@@ -92,12 +92,12 @@ void ExplosionEffect::setUpEmitterAndProgram()
|
||||
|
||||
osgParticle::Particle& ptemplate = _particleSystem->getDefaultParticleTemplate();
|
||||
|
||||
float radius = 0.4f*_scale;
|
||||
float radius = 0.4f*_scale;
|
||||
float density = 1.2f; // 1.0kg/m^3
|
||||
|
||||
ptemplate.setLifeTime(_defaultParticleTemplate.getLifeTime());
|
||||
|
||||
// the following ranges set the envelope of the respective
|
||||
// the following ranges set the envelope of the respective
|
||||
// graphical properties in time.
|
||||
ptemplate.setSizeRange(osgParticle::rangef(radius*_defaultParticleTemplate.getSizeRange().minimum,
|
||||
radius*_defaultParticleTemplate.getSizeRange().maximum));
|
||||
@@ -108,7 +108,7 @@ void ExplosionEffect::setUpEmitterAndProgram()
|
||||
ptemplate.setRadius(radius);
|
||||
ptemplate.setMass(density*radius*radius*radius*osg::PI*4.0f/3.0f);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// set up emitter
|
||||
@@ -154,15 +154,15 @@ void ExplosionEffect::setUpEmitterAndProgram()
|
||||
|
||||
// set up the program
|
||||
if (!_program)
|
||||
{
|
||||
{
|
||||
_program = new osgParticle::FluidProgram;
|
||||
}
|
||||
|
||||
|
||||
if (_program.valid())
|
||||
{
|
||||
_program->setParticleSystem(_particleSystem.get());
|
||||
_program->setWind(_wind);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user