Added the ability for osgParticle::ParticleEffect to switch off the automatic setup.

Normally the automatic setup is useful, but in the case of the .osg support this automatic
update was forcing premature loading of imagery that wasn't necessarily, and can lead to
reports of looking for files that arn't present.
This commit is contained in:
Robert Osfield
2005-11-18 17:04:55 +00:00
parent b0869a6f60
commit d0c9ef1e14
24 changed files with 163 additions and 46 deletions

View File

@@ -27,6 +27,20 @@
using namespace osgParticle;
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();
@@ -37,7 +51,7 @@ ExplosionEffect::ExplosionEffect(const osg::Vec3& position, float scale, float i
_emitterDuration = 1.0;
buildEffect();
if (_automaticSetup) buildEffect();
}
ExplosionEffect::ExplosionEffect(const ExplosionEffect& copy, const osg::CopyOp& copyop):