From 65278609f2ceae5388c5fd8e531e6d632c33cf9f Mon Sep 17 00:00:00 2001 From: Jeffrey Ventrella Date: Fri, 26 Jul 2013 15:40:06 -0700 Subject: [PATCH] cleanup --- interface/src/ParticleSystem.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/interface/src/ParticleSystem.cpp b/interface/src/ParticleSystem.cpp index 9ff175cc2b..6469cdbbf0 100644 --- a/interface/src/ParticleSystem.cpp +++ b/interface/src/ParticleSystem.cpp @@ -16,6 +16,7 @@ const float DEFAULT_PARTICLE_BOUNCE = 1.0f; const float DEFAULT_PARTICLE_AIR_FRICTION = 2.0f; const float DEFAULT_PARTICLE_LIFESPAN = 1.0f; const int DEFAULT_PARTICLE_SPHERE_RESOLUTION = 6; +const float DEFAULT_EMITTER_RENDER_LENGTH = 0.2f; ParticleSystem::ParticleSystem() { @@ -325,7 +326,7 @@ void ParticleSystem::render() { } if (_emitter[e].visible) { - renderEmitter(e, 0.2f); + renderEmitter(e, DEFAULT_EMITTER_RENDER_LENGTH); } }; @@ -447,14 +448,14 @@ void ParticleSystem::renderParticle(int p) { } } - void ParticleSystem::renderEmitter(int e, float size) { - glLineWidth(2.0f); + glm::vec3 v = _emitter[e].direction * size; + glColor3f(0.4f, 0.4, 0.8); glBegin(GL_LINES); glVertex3f(_emitter[e].position.x, _emitter[e].position.y, _emitter[e].position.z); - glVertex3f(_emitter[e].position.x + _emitter[e].direction.x, _emitter[e].position.y + _emitter[e].direction.y, _emitter[e].position.z + _emitter[e].direction.z); + glVertex3f(_emitter[e].position.x + v.x, _emitter[e].position.y + v.y, _emitter[e].position.z + v.z); glEnd(); }