Showing the changes to interface/src/ParticleTreeRenderer.cpp (1 of 17 files). Show all
Unified · Split
| @@ -11,7 +11,7 @@ · 10 unmodified lines | |||
| 11 | 11 | ||
| 12 | #include "ParticleTreeRenderer.h" | 12 | #include "ParticleTreeRenderer.h" |
| 13 | 13 | ||
| 14 | ParticleTreeRenderer::ParticleTreeRenderer() : | 14 | ParticleTreeRenderer::ParticleTreeRenderer() : |
| 15 | OctreeRenderer() { | 15 | OctreeRenderer() { |
| 16 | } | 16 | } |
| 17 | 17 | ||
| @@ -31,13 +31,13 @@ void ParticleTreeRenderer::renderElement(OctreeElement* element, RenderArgs* arg · 13 unmodified lines | |||
| 31 | // actually render it here... | 31 | // actually render it here... |
| 32 | // we need to iterate the actual particles of the element | 32 | // we need to iterate the actual particles of the element |
| 33 | ParticleTreeElement* particleTreeElement = (ParticleTreeElement*)element; | 33 | ParticleTreeElement* particleTreeElement = (ParticleTreeElement*)element; |
| 34 | 34 | ||
| 35 | const QList<Particle>& particles = particleTreeElement->getParticles(); | 35 | const QList<Particle>& particles = particleTreeElement->getParticles(); |
| 36 | 36 | ||
| 37 | uint16_t numberOfParticles = particles.size(); | 37 | uint16_t numberOfParticles = particles.size(); |
| 38 | 38 | ||
| 39 | bool drawAsSphere = true; | 39 | bool drawAsSphere = true; |
| 40 | 40 | ||
| 41 | for (uint16_t i = 0; i < numberOfParticles; i++) { | 41 | for (uint16_t i = 0; i < numberOfParticles; i++) { |
| 42 | const Particle& particle = particles[i]; | 42 | const Particle& particle = particles[i]; |
| 43 | // render particle aspoints | 43 | // render particle aspoints |
| @@ -46,7 +46,7 @@ void ParticleTreeRenderer::renderElement(OctreeElement* element, RenderArgs* arg · 2 unmodified lines | |||
| 46 | float sphereRadius = particle.getRadius() * (float)TREE_SCALE; | 46 | float sphereRadius = particle.getRadius() * (float)TREE_SCALE; |
| 47 | 47 | ||
| 48 | args->_renderedItems++; | 48 | args->_renderedItems++; |
| 49 | 49 | ||
| 50 | if (drawAsSphere) { | 50 | if (drawAsSphere) { |
| 51 | glPushMatrix(); | 51 | glPushMatrix(); |
| 52 | glTranslatef(position.x, position.y, position.z); | 52 | glTranslatef(position.x, position.y, position.z); |
| @@ -60,3 +60,8 @@ void ParticleTreeRenderer::renderElement(OctreeElement* element, RenderArgs* arg · 7 unmodified lines | |||
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | |||
| 64 | void ParticleTreeRenderer::processEraseMessage(const QByteArray& dataByteArray, const HifiSockAddr& senderSockAddr, | ||
| 65 | Node* sourceNode) { | ||
| 66 | static_cast<ParticleTree*>(_tree)->processEraseMessage(dataByteArray, senderSockAddr, sourceNode); | ||
| 67 | } | ||