diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index cba0f8a4e6..37306cc296 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2633,20 +2633,10 @@ void Application::queryOctree(NODE_TYPE serverType, PACKET_TYPE packetType) { for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) { -/** -qDebug() << "Query... " << *node << "\n"; -qDebug(" node->getActiveSocket()=%p\n",node->getActiveSocket()); -qDebug(" node->getType()=%c\n",node->getType()); -qDebug(" serverType=%c\n",serverType); -/**/ - // only send to the NodeTypes that are serverType if (node->getActiveSocket() != NULL && node->getType() == serverType) { totalServers++; -//qDebug("LINE:%d -- Servers: total %d, in view %d, unknown jurisdiction %d \n", -// __LINE__, totalServers, inViewServers, unknownJurisdictionServers); - // get the server bounds for this server QUuid nodeUUID = node->getUUID(); diff --git a/interface/src/ParticleTreeRenderer.cpp b/interface/src/ParticleTreeRenderer.cpp index 02b5216731..6fad170e4f 100644 --- a/interface/src/ParticleTreeRenderer.cpp +++ b/interface/src/ParticleTreeRenderer.cpp @@ -27,16 +27,33 @@ void ParticleTreeRenderer::renderElement(OctreeElement* element) { uint16_t numberOfParticles = particles.size(); - glPointSize(20.0f); - glBegin(GL_POINTS); + bool drawAsSphere = true; + + if (!drawAsSphere) { + glPointSize(20.0f); + glBegin(GL_POINTS); + } + for (uint16_t i = 0; i < numberOfParticles; i++) { const Particle& particle = particles[i]; // render particle aspoints glm::vec3 position = particle.getPosition() * (float)TREE_SCALE; - printf("glVertex3f(%f, %f, %f)\n", position.x, position.y, position.z); + glColor3ub(particle.getColor()[RED_INDEX],particle.getColor()[GREEN_INDEX],particle.getColor()[BLUE_INDEX]); - glVertex3f(position.x, position.y, position.z); + //printf("particle at... (%f, %f, %f)\n", position.x, position.y, position.z); + + if (drawAsSphere) { + float sphereRadius = particle.getRadius() * (float)TREE_SCALE; + glPushMatrix(); + glTranslatef(position.x, position.y, position.z); + glutSolidSphere(sphereRadius, 15, 15); + glPopMatrix(); + } else { + glVertex3f(position.x, position.y, position.z); + } + } + if (!drawAsSphere) { + glEnd(); } - glEnd(); }