History

cleaned up some magic numbers

Jeffrey Ventrella committed 13 years ago

Commit 5e2dcfe1 parent aee29a04 files · +61 −47Browse files

Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all

Unified · Split

interface/src/Application.cpp+5−3
@@ -3650,10 +3650,12 @@ void Application::exportSettings() { · 3649 unmodified lines
36503650 }
36513651
36523652
3653−
36543653 void Application::updateParticleSystem(float deltaTime) {
36553654
36563655 if (!_particleSystemInitialized) {
3656+
3657+ const int LIFESPAN_IN_SECONDS = 100000.0f;
3658+ const float EMIT_RATE_IN_SECONDS = 10000.0;
36573659 // create a stable test emitter and spit out a bunch of particles
36583660 _coolDemoParticleEmitter = _particleSystem.addEmitter();
36593661
@@ -3662,9 +3664,9 @@ void Application::updateParticleSystem(float deltaTime) { · 2 unmodified lines
36623664 glm::vec3 particleEmitterPosition = glm::vec3(5.0f, 1.0f, 5.0f);
36633665
36643666 _particleSystem.setEmitterPosition (_coolDemoParticleEmitter, particleEmitterPosition);
3665− _particleSystem.setEmitterParticleLifespan(_coolDemoParticleEmitter, 100000.0f);
3667+ _particleSystem.setEmitterParticleLifespan(_coolDemoParticleEmitter, LIFESPAN_IN_SECONDS);
36663668 _particleSystem.setEmitterThrust (_coolDemoParticleEmitter, 0.0f);
3667− _particleSystem.setEmitterRate (_coolDemoParticleEmitter, 10000.0); // to emit a pile o particles now
3669+ _particleSystem.setEmitterRate (_coolDemoParticleEmitter, EMIT_RATE_IN_SECONDS); // to emit a pile o particles now
36683670 }
36693671
36703672 // signal that the particle system has been initialized

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t