Added .osg support for new ParticleEffect::s/getDefaultParticleTemplate.
This commit is contained in:
@@ -54,8 +54,6 @@ void FireEffect::setDefaults()
|
||||
|
||||
// set up unit particle.
|
||||
_defaultParticleTemplate.setLifeTime(0.5+0.1*_scale);
|
||||
_defaultParticleTemplate.setRadius(1.0f);
|
||||
_defaultParticleTemplate.setMass(osg::PI*4.0f/3.0f);
|
||||
_defaultParticleTemplate.setSizeRange(osgParticle::rangef(0.75f, 3.0f));
|
||||
_defaultParticleTemplate.setAlphaRange(osgParticle::rangef(0.1f, 1.0f));
|
||||
_defaultParticleTemplate.setColorRange(osgParticle::rangev4(
|
||||
@@ -91,9 +89,9 @@ void FireEffect::setUpEmitterAndProgram()
|
||||
ptemplate.setColorRange(_defaultParticleTemplate.getColorRange());
|
||||
|
||||
// these are physical properties of the particle
|
||||
float r = _defaultParticleTemplate.getRadius()*radius;
|
||||
ptemplate.setRadius(r);
|
||||
ptemplate.setMass(density*r*r*r*_defaultParticleTemplate.getMass());
|
||||
// these are physical properties of the particle
|
||||
ptemplate.setRadius(radius);
|
||||
ptemplate.setMass(density*radius*radius*radius*osg::PI*4.0f/3.0f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user