summaryrefslogtreecommitdiff
path: root/src/particleemitter.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-23 13:43:17 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-23 13:43:17 +0000
commit4b8df221acc3bd3e681357df912bdbc7a1ce6c3f (patch)
tree3b3d196dcbeacc67b1479d56e3eccc14dfef07e1 /src/particleemitter.cpp
parent4346b429cc875a85095fff271a8d82a46c2cfc91 (diff)
downloadmana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.tar.gz
mana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.tar.bz2
mana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.tar.xz
mana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.zip
Removed two useless popup related methods, used generic close button
functionality for the debug window and renamed Particle::mVector to Particle::mVelocity for clarity.
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r--src/particleemitter.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index 5b5e86b9..ea7b87d6 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -248,10 +248,9 @@ ParticleEmitter::readMinMax(xmlNodePtr propertyNode, T def)
{
MinMax<T> retval;
- def = (T)XML::getFloatProperty(propertyNode, "value", (double)def);
- retval.set ( (T)XML::getFloatProperty(propertyNode, "min", (double)def),
- (T)XML::getFloatProperty(propertyNode, "max", (double)def)
- );
+ def = (T) XML::getFloatProperty(propertyNode, "value", (double) def);
+ retval.set((T) XML::getFloatProperty(propertyNode, "min", (double) def),
+ (T) XML::getFloatProperty(propertyNode, "max", (double) def));
return retval;
}
@@ -284,19 +283,17 @@ ParticleEmitter::createParticles()
newParticle->setPosition(
- mParticlePosX.value(),
- mParticlePosY.value(),
- mParticlePosZ.value()
- );
+ mParticlePosX.value(),
+ mParticlePosY.value(),
+ mParticlePosZ.value());
float angleH = mParticleAngleHorizontal.value();
float angleV = mParticleAngleVertical.value();
float power = mParticlePower.value();
- newParticle->setVector(
- cos(angleH) * cos(angleV) * power,
- sin(angleH) * cos(angleV) * power,
- sin(angleV) * power
- );
+ newParticle->setVelocity(
+ cos(angleH) * cos(angleV) * power,
+ sin(angleH) * cos(angleV) * power,
+ sin(angleV) * power);
newParticle->setRandomnes(mParticleRandomnes.value());
newParticle->setGravity(mParticleGravity.value());
@@ -312,10 +309,9 @@ ParticleEmitter::createParticles()
newParticle->setFadeOut(mParticleFadeOut.value());
newParticle->setFadeIn(mParticleFadeIn.value());
- for ( std::list<ParticleEmitter>::iterator i = mParticleChildEmitters.begin();
- i != mParticleChildEmitters.end();
- i++
- )
+ for (std::list<ParticleEmitter>::iterator i = mParticleChildEmitters.begin();
+ i != mParticleChildEmitters.end();
+ i++)
{
newParticle->addEmitter(new ParticleEmitter(*i));
}