pointers in Particles object should be ref_ptr
This commit is contained in:
parent
74d3bdc68c
commit
29aad066f0
@ -477,7 +477,7 @@ void Particles::operator()(osg::Node* node, osg::NodeVisitor* nv)
|
|||||||
particleSys->getDefaultParticleTemplate().setSizeRange(osgParticle::rangef(startSize, endSize));
|
particleSys->getDefaultParticleTemplate().setSizeRange(osgParticle::rangef(startSize, endSize));
|
||||||
if (lifeValue)
|
if (lifeValue)
|
||||||
particleSys->getDefaultParticleTemplate().setLifeTime(lifeValue->getValue());
|
particleSys->getDefaultParticleTemplate().setLifeTime(lifeValue->getValue());
|
||||||
if (program) {
|
if (program.valid()) {
|
||||||
if (useGravity)
|
if (useGravity)
|
||||||
program->setAcceleration(GlobalParticleCallback::getGravityVector());
|
program->setAcceleration(GlobalParticleCallback::getGravityVector());
|
||||||
if (useWind)
|
if (useWind)
|
||||||
|
@ -97,8 +97,6 @@ public:
|
|||||||
endSizeValue(NULL),
|
endSizeValue(NULL),
|
||||||
lifeValue(NULL),
|
lifeValue(NULL),
|
||||||
counterCond(NULL),
|
counterCond(NULL),
|
||||||
refFrame(NULL),
|
|
||||||
program(NULL),
|
|
||||||
useGravity(false),
|
useGravity(false),
|
||||||
useWind(false)
|
useWind(false)
|
||||||
{
|
{
|
||||||
@ -265,16 +263,15 @@ protected:
|
|||||||
SGExpressiond* endSizeValue;
|
SGExpressiond* endSizeValue;
|
||||||
SGExpressiond* lifeValue;
|
SGExpressiond* lifeValue;
|
||||||
SGCondition* counterCond;
|
SGCondition* counterCond;
|
||||||
osg::MatrixTransform* refFrame;
|
|
||||||
float staticColorComponents[8];
|
float staticColorComponents[8];
|
||||||
float startSize;
|
float startSize;
|
||||||
float endSize;
|
float endSize;
|
||||||
float counterStaticValue;
|
float counterStaticValue;
|
||||||
float counterStaticExtraRange;
|
float counterStaticExtraRange;
|
||||||
osgParticle::RadialShooter* shooter;
|
osg::ref_ptr<osgParticle::RadialShooter> shooter;
|
||||||
osgParticle::RandomRateCounter* counter;
|
osg::ref_ptr<osgParticle::RandomRateCounter> counter;
|
||||||
osgParticle::ParticleSystem* particleSys;
|
osg::ref_ptr<osgParticle::ParticleSystem> particleSys;
|
||||||
osgParticle::FluidProgram* program;
|
osg::ref_ptr<osgParticle::FluidProgram> program;
|
||||||
bool useGravity;
|
bool useGravity;
|
||||||
bool useWind;
|
bool useWind;
|
||||||
static osg::ref_ptr<osgParticle::ParticleSystemUpdater> psu;
|
static osg::ref_ptr<osgParticle::ParticleSystemUpdater> psu;
|
||||||
|
Loading…
Reference in New Issue
Block a user