History

implemented support for PACKET_TYPE_PARTICLE_ERASE

Brad Hefta-Gaub committed 12 years ago

Commit 97b0ed21 parent 347933f17 files · +427 −113Browse files

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

Unified · Split

interface/src/ParticleTreeRenderer.cpp+11−6
@@ -11,7 +11,7 @@ · 10 unmodified lines
11 11
12#include "ParticleTreeRenderer.h"12#include "ParticleTreeRenderer.h"
13 13
14ParticleTreeRenderer::ParticleTreeRenderer() : 14ParticleTreeRenderer::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 element32 // 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 aspoints43 // 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
64void ParticleTreeRenderer::processEraseMessage(const QByteArray& dataByteArray, const HifiSockAddr& senderSockAddr,
65 Node* sourceNode) {
66 static_cast<ParticleTree*>(_tree)->processEraseMessage(dataByteArray, senderSockAddr, sourceNode);
67}

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