Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 10 files). Show all
Unified · Split
| @@ -54,7 +54,6 @@ void MetavoxelSystem::processData(const QByteArray& data, const HifiSockAddr& se · 53 unmodified lines | |||
| 54 | void MetavoxelSystem::simulate(float deltaTime) { | 54 | void MetavoxelSystem::simulate(float deltaTime) { |
| 55 | // simulate the clients | 55 | // simulate the clients |
| 56 | _points.clear(); | 56 | _points.clear(); |
| 57 | _data.guide(_pointVisitor); | ||
| 58 | foreach (MetavoxelClient* client, _clients) { | 57 | foreach (MetavoxelClient* client, _clients) { |
| 59 | client->simulate(deltaTime, _pointVisitor); | 58 | client->simulate(deltaTime, _pointVisitor); |
| 60 | } | 59 | } |
| @@ -180,8 +179,7 @@ static QByteArray createDatagramHeader(const QUuid& sessionID) { · 119 unmodified lines | |||
| 180 | MetavoxelClient::MetavoxelClient(const HifiSockAddr& address) : | 179 | MetavoxelClient::MetavoxelClient(const HifiSockAddr& address) : |
| 181 | _address(address), | 180 | _address(address), |
| 182 | _sessionID(QUuid::createUuid()), | 181 | _sessionID(QUuid::createUuid()), |
| 183 | _sequencer(createDatagramHeader(_sessionID)), | 182 | _sequencer(createDatagramHeader(_sessionID)) { |
| 184 | _data(new MetavoxelData()) { | ||
| 185 | 183 | ||
| 186 | connect(&_sequencer, SIGNAL(readyToWrite(const QByteArray&)), SLOT(sendData(const QByteArray&))); | 184 | connect(&_sequencer, SIGNAL(readyToWrite(const QByteArray&)), SLOT(sendData(const QByteArray&))); |
| 187 | connect(&_sequencer, SIGNAL(readyToRead(Bitstream&)), SLOT(readPacket(Bitstream&))); | 185 | connect(&_sequencer, SIGNAL(readyToRead(Bitstream&)), SLOT(readPacket(Bitstream&))); |
| @@ -197,7 +195,7 @@ void MetavoxelClient::applyEdit(const MetavoxelEdit& edit) { · 9 unmodified lines | |||
| 197 | edit.apply(_data); | 195 | edit.apply(_data); |
| 198 | 196 | ||
| 199 | // start sending it out | 197 | // start sending it out |
| 200 | _sequencer.sendHighPriorityMessage(QVariant::fromValue(edit)); | 198 | // _sequencer.sendHighPriorityMessage(QVariant::fromValue(edit)); |
| 201 | } | 199 | } |
| 202 | 200 | ||
| 203 | void MetavoxelClient::simulate(float deltaTime, MetavoxelVisitor& visitor) { | 201 | void MetavoxelClient::simulate(float deltaTime, MetavoxelVisitor& visitor) { |
| @@ -206,7 +204,7 @@ void MetavoxelClient::simulate(float deltaTime, MetavoxelVisitor& visitor) { · 2 unmodified lines | |||
| 206 | out << QVariant::fromValue(state); | 204 | out << QVariant::fromValue(state); |
| 207 | _sequencer.endPacket(); | 205 | _sequencer.endPacket(); |
| 208 | 206 | ||
| 209 | _data->guide(visitor); | 207 | _data.guide(visitor); |
| 210 | } | 208 | } |
| 211 | 209 | ||
| 212 | void MetavoxelClient::receivedData(const QByteArray& data, const HifiSockAddr& sender) { | 210 | void MetavoxelClient::receivedData(const QByteArray& data, const HifiSockAddr& sender) { |
| @@ -238,7 +236,7 @@ void MetavoxelClient::clearReceiveRecordsBefore(int index) { · 25 unmodified lines | |||
| 238 | void MetavoxelClient::handleMessage(const QVariant& message, Bitstream& in) { | 236 | void MetavoxelClient::handleMessage(const QVariant& message, Bitstream& in) { |
| 239 | int userType = message.userType(); | 237 | int userType = message.userType(); |
| 240 | if (userType == MetavoxelDeltaMessage::Type) { | 238 | if (userType == MetavoxelDeltaMessage::Type) { |
| 241 | readDelta(_data, _receiveRecords.first().data, in); | 239 | // readDelta(_data, _receiveRecords.first().data, in); |
| 242 | 240 | ||
| 243 | } else if (userType == QMetaType::QVariantList) { | 241 | } else if (userType == QMetaType::QVariantList) { |
| 244 | foreach (const QVariant& element, message.toList()) { | 242 | foreach (const QVariant& element, message.toList()) { |