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:
@@ -25,7 +25,9 @@ namespace osgParticle
|
||||
{
|
||||
public:
|
||||
|
||||
ExplosionDebrisEffect(const osg::Vec3& position=osg::Vec3(0.0f,0.0f,0.0f), float scale=1.0f, float intensity=1.0f);
|
||||
ExplosionDebrisEffect(bool automaticSetup=true);
|
||||
|
||||
ExplosionDebrisEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f);
|
||||
|
||||
ExplosionDebrisEffect(const ExplosionDebrisEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ namespace osgParticle
|
||||
{
|
||||
public:
|
||||
|
||||
ExplosionEffect(const osg::Vec3& position=osg::Vec3(0.0f,0.0f,0.0f), float scale=1.0f, float intensity=1.0f);
|
||||
ExplosionEffect(bool automaticSetup=true);
|
||||
|
||||
ExplosionEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f);
|
||||
|
||||
ExplosionEffect(const ExplosionEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ namespace osgParticle
|
||||
{
|
||||
public:
|
||||
|
||||
FireEffect(const osg::Vec3& position=osg::Vec3(0.0f,0.0f,0.0f), float scale=1.0f, float intensity=1.0f);
|
||||
FireEffect(bool automaticSetup=true);
|
||||
|
||||
FireEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f);
|
||||
|
||||
FireEffect(const FireEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace osgParticle
|
||||
{
|
||||
public:
|
||||
|
||||
ParticleEffect():
|
||||
ParticleEffect(bool automaticSetup=true):
|
||||
_automaticSetup(automaticSetup),
|
||||
_useLocalParticleSystem(true),
|
||||
_scale(1.0f),
|
||||
_intensity(1.0f),
|
||||
@@ -41,6 +42,9 @@ namespace osgParticle
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const ParticleEffect*>(obj) != 0; }
|
||||
virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } }
|
||||
|
||||
void setAutomaticSetup(bool flag) { _automaticSetup = flag; }
|
||||
bool getAutomaticSetup() const { return _automaticSetup; }
|
||||
|
||||
void setUseLocalParticleSystem(bool local);
|
||||
bool getUseLocalParticleSystem() const { return _useLocalParticleSystem; }
|
||||
|
||||
@@ -93,6 +97,8 @@ namespace osgParticle
|
||||
protected:
|
||||
|
||||
virtual ~ParticleEffect() {}
|
||||
|
||||
bool _automaticSetup;
|
||||
|
||||
osg::ref_ptr<ParticleSystem> _particleSystem;
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ namespace osgParticle
|
||||
{
|
||||
public:
|
||||
|
||||
SmokeEffect(const osg::Vec3& position=osg::Vec3(0.0f,0.0f,0.0f), float scale=1.0f, float intensity=1.0f);
|
||||
SmokeEffect(bool automaticSetup=true);
|
||||
|
||||
SmokeEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f);
|
||||
|
||||
SmokeEffect(const SmokeEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ namespace osgParticle
|
||||
{
|
||||
public:
|
||||
|
||||
SmokeTrailEffect(const osg::Vec3& position=osg::Vec3(0.0f,0.0f,0.0f), float scale=1.0f, float intensity=1.0f);
|
||||
SmokeTrailEffect(bool automaticSetup=true);
|
||||
|
||||
SmokeTrailEffect(const osg::Vec3& position, float scale=1.0f, float intensity=1.0f);
|
||||
|
||||
SmokeTrailEffect(const SmokeTrailEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user