From b48161ae2693e82650546c8382a5cae6213ddb3f Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 19 Dec 2013 09:59:36 -0800 Subject: [PATCH] cleanup debug --- libraries/particles/src/Particle.cpp | 2 +- libraries/particles/src/ParticleCollisionSystem.cpp | 7 +++++-- libraries/particles/src/ParticleTree.cpp | 7 ------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/libraries/particles/src/Particle.cpp b/libraries/particles/src/Particle.cpp index ebad0480a1..e4afcd90e7 100644 --- a/libraries/particles/src/Particle.cpp +++ b/libraries/particles/src/Particle.cpp @@ -438,7 +438,7 @@ void Particle::update() { bool shouldDie = !isInHand && !isStillMoving && isReallyOld; setShouldDie(shouldDie); - bool wantDebug = true; + bool wantDebug = false; if (wantDebug) { printf("Particle::update()... timeElapsed: %f lifeTime:%f editedAgo:%f " "isInHand:%s isStillMoveing:%s isReallyOld:%s shouldDie:%s\n", diff --git a/libraries/particles/src/ParticleCollisionSystem.cpp b/libraries/particles/src/ParticleCollisionSystem.cpp index 7b773540b0..e1286f91e2 100644 --- a/libraries/particles/src/ParticleCollisionSystem.cpp +++ b/libraries/particles/src/ParticleCollisionSystem.cpp @@ -214,8 +214,11 @@ void ParticleCollisionSystem::applyHardCollision(Particle* particle, const glm:: velocity *= 0.f; } } -printf("ParticleCollisionSystem::applyHardCollision() particle id:%d new velocity:%f,%f,%f inHand:%s\n", - particle->getID(), velocity.x, velocity.y, velocity.z, debug::valueOf(particle->getInHand())); + const bool wantDebug = false; + if (wantDebug) { + printf("ParticleCollisionSystem::applyHardCollision() particle id:%d new velocity:%f,%f,%f inHand:%s\n", + particle->getID(), velocity.x, velocity.y, velocity.z, debug::valueOf(particle->getInHand())); + } ParticleEditHandle particleEditHandle(_packetSender, _particles, particle->getID()); particleEditHandle.updateParticle(position, particle->getRadius(), particle->getXColor(), velocity, diff --git a/libraries/particles/src/ParticleTree.cpp b/libraries/particles/src/ParticleTree.cpp index 576f0f1c19..e770347fd8 100644 --- a/libraries/particles/src/ParticleTree.cpp +++ b/libraries/particles/src/ParticleTree.cpp @@ -111,7 +111,6 @@ bool ParticleTree::findNearPointOperation(OctreeElement* element, void* extraDat } const Particle* ParticleTree::findClosestParticle(glm::vec3 position, float targetRadius) { - // First, look for the existing particle in the tree.. FindNearPointArgs args = { position, targetRadius, false, NULL, FLT_MAX }; lockForRead(); recurseTreeWithOperation(findNearPointOperation, &args); @@ -133,7 +132,6 @@ bool ParticleTree::findByIDOperation(OctreeElement* element, void* extraData) { // if already found, stop looking if (args->found) { - printf("ParticleTree::findByIDOperation(id[%d]) already found, ending search...\n",args->id); return false; } @@ -142,20 +140,15 @@ bool ParticleTree::findByIDOperation(OctreeElement* element, void* extraData) { if (foundParticle) { args->foundParticle = foundParticle; args->found = true; - printf("ParticleTree::findByIDOperation(id[%d]) FOUND IT particle=%p...\n",args->id, foundParticle); return false; } // keep looking - printf("ParticleTree::findByIDOperation(id[%d]) keep looking\n",args->id); return true; } const Particle* ParticleTree::findParticleByID(uint32_t id) { - -printf("ParticleTree::findParticleByID(id[%d])\n",id); - // First, look for the existing particle in the tree.. FindByIDArgs args = { id, false, NULL }; lockForRead(); recurseTreeWithOperation(findByIDOperation, &args);