mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
MetavoxelDataPointer -> MetavoxelData, grid spacing as power of 2.
This commit is contained in:
parent
5a095b57cd
commit
1ef6f5f7b3
10 changed files with 43 additions and 69 deletions
|
@ -18,8 +18,7 @@
|
||||||
const int SEND_INTERVAL = 50;
|
const int SEND_INTERVAL = 50;
|
||||||
|
|
||||||
MetavoxelServer::MetavoxelServer(const unsigned char* dataBuffer, int numBytes) :
|
MetavoxelServer::MetavoxelServer(const unsigned char* dataBuffer, int numBytes) :
|
||||||
ThreadedAssignment(dataBuffer, numBytes),
|
ThreadedAssignment(dataBuffer, numBytes) {
|
||||||
_data(new MetavoxelData()) {
|
|
||||||
|
|
||||||
_sendTimer.setSingleShot(true);
|
_sendTimer.setSingleShot(true);
|
||||||
connect(&_sendTimer, SIGNAL(timeout()), SLOT(sendDeltas()));
|
connect(&_sendTimer, SIGNAL(timeout()), SLOT(sendDeltas()));
|
||||||
|
@ -94,9 +93,10 @@ MetavoxelSession::MetavoxelSession(MetavoxelServer* server, const QUuid& session
|
||||||
connect(&_sequencer, SIGNAL(readyToWrite(const QByteArray&)), SLOT(sendData(const QByteArray&)));
|
connect(&_sequencer, SIGNAL(readyToWrite(const QByteArray&)), SLOT(sendData(const QByteArray&)));
|
||||||
connect(&_sequencer, SIGNAL(readyToRead(Bitstream&)), SLOT(readPacket(Bitstream&)));
|
connect(&_sequencer, SIGNAL(readyToRead(Bitstream&)), SLOT(readPacket(Bitstream&)));
|
||||||
connect(&_sequencer, SIGNAL(sendAcknowledged(int)), SLOT(clearSendRecordsBefore(int)));
|
connect(&_sequencer, SIGNAL(sendAcknowledged(int)), SLOT(clearSendRecordsBefore(int)));
|
||||||
|
connect(&_sequencer, SIGNAL(receivedHighPriorityMessage(const QVariant&)), SLOT(handleMessage(const QVariant&)));
|
||||||
|
|
||||||
// insert the baseline send record
|
// insert the baseline send record
|
||||||
SendRecord record = { 0, MetavoxelDataPointer(new MetavoxelData()) };
|
SendRecord record = { 0 };
|
||||||
_sendRecords.append(record);
|
_sendRecords.append(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ void MetavoxelSession::receivedData(const QByteArray& data, const HifiSockAddr&
|
||||||
void MetavoxelSession::sendDelta() {
|
void MetavoxelSession::sendDelta() {
|
||||||
Bitstream& out = _sequencer.startPacket();
|
Bitstream& out = _sequencer.startPacket();
|
||||||
out << QVariant::fromValue(MetavoxelDeltaMessage());
|
out << QVariant::fromValue(MetavoxelDeltaMessage());
|
||||||
writeDelta(_server->getData(), _sendRecords.first().data, out);
|
//writeDelta(_server->getData(), _sendRecords.first().data, out);
|
||||||
_sequencer.endPacket();
|
_sequencer.endPacket();
|
||||||
|
|
||||||
// record the send
|
// record the send
|
||||||
|
@ -134,25 +134,26 @@ void MetavoxelSession::sendData(const QByteArray& data) {
|
||||||
void MetavoxelSession::readPacket(Bitstream& in) {
|
void MetavoxelSession::readPacket(Bitstream& in) {
|
||||||
QVariant message;
|
QVariant message;
|
||||||
in >> message;
|
in >> message;
|
||||||
handleMessage(message, in);
|
handleMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelSession::clearSendRecordsBefore(int index) {
|
void MetavoxelSession::clearSendRecordsBefore(int index) {
|
||||||
_sendRecords.erase(_sendRecords.begin(), _sendRecords.begin() + index + 1);
|
_sendRecords.erase(_sendRecords.begin(), _sendRecords.begin() + index + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelSession::handleMessage(const QVariant& message, Bitstream& in) {
|
void MetavoxelSession::handleMessage(const QVariant& message) {
|
||||||
int userType = message.userType();
|
int userType = message.userType();
|
||||||
if (userType == ClientStateMessage::Type) {
|
if (userType == ClientStateMessage::Type) {
|
||||||
ClientStateMessage state = message.value<ClientStateMessage>();
|
ClientStateMessage state = message.value<ClientStateMessage>();
|
||||||
_position = state.position;
|
_position = state.position;
|
||||||
|
|
||||||
} else if (userType == MetavoxelDeltaMessage::Type) {
|
} else if (userType == MetavoxelEdit::Type) {
|
||||||
|
MetavoxelEdit edit = message.value<MetavoxelEdit>();
|
||||||
|
qDebug() << "got edit " << edit.granularity;
|
||||||
|
|
||||||
|
|
||||||
} else if (userType == QMetaType::QVariantList) {
|
} else if (userType == QMetaType::QVariantList) {
|
||||||
foreach (const QVariant& element, message.toList()) {
|
foreach (const QVariant& element, message.toList()) {
|
||||||
handleMessage(element, in);
|
handleMessage(element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
|
|
||||||
MetavoxelServer(const unsigned char* dataBuffer, int numBytes);
|
MetavoxelServer(const unsigned char* dataBuffer, int numBytes);
|
||||||
|
|
||||||
const MetavoxelDataPointer& getData() const { return _data; }
|
const MetavoxelData& getData() const { return _data; }
|
||||||
|
|
||||||
void removeSession(const QUuid& sessionId);
|
void removeSession(const QUuid& sessionId);
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ private:
|
||||||
|
|
||||||
QHash<QUuid, MetavoxelSession*> _sessions;
|
QHash<QUuid, MetavoxelSession*> _sessions;
|
||||||
|
|
||||||
MetavoxelDataPointer _data;
|
MetavoxelData _data;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Contains the state of a single client session.
|
/// Contains the state of a single client session.
|
||||||
|
@ -76,14 +76,14 @@ private slots:
|
||||||
|
|
||||||
void clearSendRecordsBefore(int index);
|
void clearSendRecordsBefore(int index);
|
||||||
|
|
||||||
private:
|
void handleMessage(const QVariant& message);
|
||||||
|
|
||||||
void handleMessage(const QVariant& message, Bitstream& in);
|
private:
|
||||||
|
|
||||||
class SendRecord {
|
class SendRecord {
|
||||||
public:
|
public:
|
||||||
int packetNumber;
|
int packetNumber;
|
||||||
MetavoxelDataPointer data;
|
MetavoxelData data;
|
||||||
};
|
};
|
||||||
|
|
||||||
MetavoxelServer* _server;
|
MetavoxelServer* _server;
|
||||||
|
|
|
@ -54,7 +54,6 @@ void MetavoxelSystem::processData(const QByteArray& data, const HifiSockAddr& se
|
||||||
void MetavoxelSystem::simulate(float deltaTime) {
|
void MetavoxelSystem::simulate(float deltaTime) {
|
||||||
// simulate the clients
|
// simulate the clients
|
||||||
_points.clear();
|
_points.clear();
|
||||||
_data.guide(_pointVisitor);
|
|
||||||
foreach (MetavoxelClient* client, _clients) {
|
foreach (MetavoxelClient* client, _clients) {
|
||||||
client->simulate(deltaTime, _pointVisitor);
|
client->simulate(deltaTime, _pointVisitor);
|
||||||
}
|
}
|
||||||
|
@ -180,8 +179,7 @@ static QByteArray createDatagramHeader(const QUuid& sessionID) {
|
||||||
MetavoxelClient::MetavoxelClient(const HifiSockAddr& address) :
|
MetavoxelClient::MetavoxelClient(const HifiSockAddr& address) :
|
||||||
_address(address),
|
_address(address),
|
||||||
_sessionID(QUuid::createUuid()),
|
_sessionID(QUuid::createUuid()),
|
||||||
_sequencer(createDatagramHeader(_sessionID)),
|
_sequencer(createDatagramHeader(_sessionID)) {
|
||||||
_data(new MetavoxelData()) {
|
|
||||||
|
|
||||||
connect(&_sequencer, SIGNAL(readyToWrite(const QByteArray&)), SLOT(sendData(const QByteArray&)));
|
connect(&_sequencer, SIGNAL(readyToWrite(const QByteArray&)), SLOT(sendData(const QByteArray&)));
|
||||||
connect(&_sequencer, SIGNAL(readyToRead(Bitstream&)), SLOT(readPacket(Bitstream&)));
|
connect(&_sequencer, SIGNAL(readyToRead(Bitstream&)), SLOT(readPacket(Bitstream&)));
|
||||||
|
@ -197,7 +195,7 @@ void MetavoxelClient::applyEdit(const MetavoxelEdit& edit) {
|
||||||
edit.apply(_data);
|
edit.apply(_data);
|
||||||
|
|
||||||
// start sending it out
|
// start sending it out
|
||||||
_sequencer.sendHighPriorityMessage(QVariant::fromValue(edit));
|
// _sequencer.sendHighPriorityMessage(QVariant::fromValue(edit));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelClient::simulate(float deltaTime, MetavoxelVisitor& visitor) {
|
void MetavoxelClient::simulate(float deltaTime, MetavoxelVisitor& visitor) {
|
||||||
|
@ -206,7 +204,7 @@ void MetavoxelClient::simulate(float deltaTime, MetavoxelVisitor& visitor) {
|
||||||
out << QVariant::fromValue(state);
|
out << QVariant::fromValue(state);
|
||||||
_sequencer.endPacket();
|
_sequencer.endPacket();
|
||||||
|
|
||||||
_data->guide(visitor);
|
_data.guide(visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelClient::receivedData(const QByteArray& data, const HifiSockAddr& sender) {
|
void MetavoxelClient::receivedData(const QByteArray& data, const HifiSockAddr& sender) {
|
||||||
|
@ -238,7 +236,7 @@ void MetavoxelClient::clearReceiveRecordsBefore(int index) {
|
||||||
void MetavoxelClient::handleMessage(const QVariant& message, Bitstream& in) {
|
void MetavoxelClient::handleMessage(const QVariant& message, Bitstream& in) {
|
||||||
int userType = message.userType();
|
int userType = message.userType();
|
||||||
if (userType == MetavoxelDeltaMessage::Type) {
|
if (userType == MetavoxelDeltaMessage::Type) {
|
||||||
readDelta(_data, _receiveRecords.first().data, in);
|
// readDelta(_data, _receiveRecords.first().data, in);
|
||||||
|
|
||||||
} else if (userType == QMetaType::QVariantList) {
|
} else if (userType == QMetaType::QVariantList) {
|
||||||
foreach (const QVariant& element, message.toList()) {
|
foreach (const QVariant& element, message.toList()) {
|
||||||
|
|
|
@ -72,7 +72,6 @@ private:
|
||||||
static ProgramObject _program;
|
static ProgramObject _program;
|
||||||
static int _pointScaleLocation;
|
static int _pointScaleLocation;
|
||||||
|
|
||||||
MetavoxelData _data;
|
|
||||||
QVector<Point> _points;
|
QVector<Point> _points;
|
||||||
PointVisitor _pointVisitor;
|
PointVisitor _pointVisitor;
|
||||||
QOpenGLBuffer _buffer;
|
QOpenGLBuffer _buffer;
|
||||||
|
@ -112,7 +111,7 @@ private:
|
||||||
class ReceiveRecord {
|
class ReceiveRecord {
|
||||||
public:
|
public:
|
||||||
int packetNumber;
|
int packetNumber;
|
||||||
MetavoxelDataPointer data;
|
MetavoxelData data;
|
||||||
};
|
};
|
||||||
|
|
||||||
HifiSockAddr _address;
|
HifiSockAddr _address;
|
||||||
|
@ -120,7 +119,7 @@ private:
|
||||||
|
|
||||||
DatagramSequencer _sequencer;
|
DatagramSequencer _sequencer;
|
||||||
|
|
||||||
MetavoxelDataPointer _data;
|
MetavoxelData _data;
|
||||||
|
|
||||||
QList<ReceiveRecord> _receiveRecords;
|
QList<ReceiveRecord> _receiveRecords;
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,15 +60,16 @@ MetavoxelEditor::MetavoxelEditor() :
|
||||||
_gridPlane->setCurrentIndex(GRID_PLANE_XZ);
|
_gridPlane->setCurrentIndex(GRID_PLANE_XZ);
|
||||||
|
|
||||||
formLayout->addRow("Grid Spacing:", _gridSpacing = new QDoubleSpinBox());
|
formLayout->addRow("Grid Spacing:", _gridSpacing = new QDoubleSpinBox());
|
||||||
_gridSpacing->setValue(0.1);
|
_gridSpacing->setMinimum(-FLT_MAX);
|
||||||
_gridSpacing->setMaximum(FLT_MAX);
|
_gridSpacing->setMaximum(FLT_MAX);
|
||||||
_gridSpacing->setSingleStep(0.01);
|
_gridSpacing->setPrefix("2^");
|
||||||
|
_gridSpacing->setValue(-3.0);
|
||||||
connect(_gridSpacing, SIGNAL(valueChanged(double)), SLOT(updateGridPosition()));
|
connect(_gridSpacing, SIGNAL(valueChanged(double)), SLOT(updateGridPosition()));
|
||||||
|
|
||||||
formLayout->addRow("Grid Position:", _gridPosition = new QDoubleSpinBox());
|
formLayout->addRow("Grid Position:", _gridPosition = new QDoubleSpinBox());
|
||||||
_gridPosition->setSingleStep(0.1);
|
|
||||||
_gridPosition->setMinimum(-FLT_MAX);
|
_gridPosition->setMinimum(-FLT_MAX);
|
||||||
_gridPosition->setMaximum(FLT_MAX);
|
_gridPosition->setMaximum(FLT_MAX);
|
||||||
|
updateGridPosition();
|
||||||
|
|
||||||
_value = new QGroupBox();
|
_value = new QGroupBox();
|
||||||
_value->setTitle("Value");
|
_value->setTitle("Value");
|
||||||
|
@ -119,7 +120,7 @@ bool MetavoxelEditor::eventFilter(QObject* watched, QEvent* event) {
|
||||||
float top = base + _height;
|
float top = base + _height;
|
||||||
glm::quat rotation = getGridRotation();
|
glm::quat rotation = getGridRotation();
|
||||||
glm::vec3 start = rotation * glm::vec3(glm::min(_startPosition, _endPosition), glm::min(base, top));
|
glm::vec3 start = rotation * glm::vec3(glm::min(_startPosition, _endPosition), glm::min(base, top));
|
||||||
float spacing = _gridSpacing->value();
|
float spacing = getGridSpacing();
|
||||||
glm::vec3 end = rotation * glm::vec3(glm::max(_startPosition, _endPosition) +
|
glm::vec3 end = rotation * glm::vec3(glm::max(_startPosition, _endPosition) +
|
||||||
glm::vec2(spacing, spacing), glm::max(base, top));
|
glm::vec2(spacing, spacing), glm::max(base, top));
|
||||||
|
|
||||||
|
@ -183,11 +184,9 @@ void MetavoxelEditor::createNewAttribute() {
|
||||||
|
|
||||||
void MetavoxelEditor::updateGridPosition() {
|
void MetavoxelEditor::updateGridPosition() {
|
||||||
// make sure our grid position matches our grid spacing
|
// make sure our grid position matches our grid spacing
|
||||||
double step = _gridSpacing->value();
|
double step = getGridSpacing();
|
||||||
if (step > 0.0) {
|
_gridPosition->setSingleStep(step);
|
||||||
_gridPosition->setSingleStep(step);
|
_gridPosition->setValue(step * floor(_gridPosition->value() / step));
|
||||||
_gridPosition->setValue(step * floor(_gridPosition->value() / step));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelEditor::render() {
|
void MetavoxelEditor::render() {
|
||||||
|
@ -209,7 +208,7 @@ void MetavoxelEditor::render() {
|
||||||
glm::quat inverseRotation = glm::inverse(rotation);
|
glm::quat inverseRotation = glm::inverse(rotation);
|
||||||
glm::vec3 rayOrigin = inverseRotation * Application::getInstance()->getMouseRayOrigin();
|
glm::vec3 rayOrigin = inverseRotation * Application::getInstance()->getMouseRayOrigin();
|
||||||
glm::vec3 rayDirection = inverseRotation * Application::getInstance()->getMouseRayDirection();
|
glm::vec3 rayDirection = inverseRotation * Application::getInstance()->getMouseRayDirection();
|
||||||
float spacing = _gridSpacing->value();
|
float spacing = getGridSpacing();
|
||||||
float position = _gridPosition->value();
|
float position = _gridPosition->value();
|
||||||
if (_state == RAISING_STATE) {
|
if (_state == RAISING_STATE) {
|
||||||
// find the plane at the mouse position, orthogonal to the plane, facing the eye position
|
// find the plane at the mouse position, orthogonal to the plane, facing the eye position
|
||||||
|
@ -318,6 +317,10 @@ QString MetavoxelEditor::getSelectedAttribute() const {
|
||||||
return selectedItems.isEmpty() ? QString() : selectedItems.first()->text();
|
return selectedItems.isEmpty() ? QString() : selectedItems.first()->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double MetavoxelEditor::getGridSpacing() const {
|
||||||
|
return pow(2.0, _gridSpacing->value());
|
||||||
|
}
|
||||||
|
|
||||||
glm::quat MetavoxelEditor::getGridRotation() const {
|
glm::quat MetavoxelEditor::getGridRotation() const {
|
||||||
// for simplicity, we handle the other two planes by rotating them onto X/Y and performing computation there
|
// for simplicity, we handle the other two planes by rotating them onto X/Y and performing computation there
|
||||||
switch (_gridPlane->currentIndex()) {
|
switch (_gridPlane->currentIndex()) {
|
||||||
|
@ -345,7 +348,7 @@ void MetavoxelEditor::applyValue(const glm::vec3& minimum, const glm::vec3& maxi
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
OwnedAttributeValue value(attribute, attribute->createFromVariant(getValue()));
|
OwnedAttributeValue value(attribute, attribute->createFromVariant(getValue()));
|
||||||
MetavoxelEdit edit = { minimum, maximum, _gridSpacing->value(), value };
|
MetavoxelEdit edit = { minimum, maximum, getGridSpacing(), value };
|
||||||
Application::getInstance()->getMetavoxels()->applyEdit(edit);
|
Application::getInstance()->getMetavoxels()->applyEdit(edit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ private:
|
||||||
|
|
||||||
void updateAttributes(const QString& select = QString());
|
void updateAttributes(const QString& select = QString());
|
||||||
QString getSelectedAttribute() const;
|
QString getSelectedAttribute() const;
|
||||||
|
double getGridSpacing() const;
|
||||||
glm::quat getGridRotation() const;
|
glm::quat getGridRotation() const;
|
||||||
void resetState();
|
void resetState();
|
||||||
void applyValue(const glm::vec3& minimum, const glm::vec3& maximum);
|
void applyValue(const glm::vec3& minimum, const glm::vec3& maximum);
|
||||||
|
|
|
@ -176,28 +176,6 @@ void MetavoxelData::decrementRootReferenceCounts() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeDelta(const MetavoxelDataPointer& data, const MetavoxelDataPointer& reference, Bitstream& out) {
|
|
||||||
if (data == reference) {
|
|
||||||
out << false;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
out << true;
|
|
||||||
data->writeDelta(*reference, out);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void readDelta(MetavoxelDataPointer& data, const MetavoxelDataPointer& reference, Bitstream& in) {
|
|
||||||
bool changed;
|
|
||||||
in >> changed;
|
|
||||||
if (changed) {
|
|
||||||
data.detach();
|
|
||||||
data->readDelta(*reference, in);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
data = reference;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MetavoxelNode::MetavoxelNode(const AttributeValue& attributeValue) : _referenceCount(1) {
|
MetavoxelNode::MetavoxelNode(const AttributeValue& attributeValue) : _referenceCount(1) {
|
||||||
_attributeValue = attributeValue.copy();
|
_attributeValue = attributeValue.copy();
|
||||||
for (int i = 0; i < CHILD_COUNT; i++) {
|
for (int i = 0; i < CHILD_COUNT; i++) {
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#define __interface__MetavoxelData__
|
#define __interface__MetavoxelData__
|
||||||
|
|
||||||
#include <QBitArray>
|
#include <QBitArray>
|
||||||
#include <QExplicitlySharedDataPointer>
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QSharedData>
|
#include <QSharedData>
|
||||||
#include <QScriptString>
|
#include <QScriptString>
|
||||||
|
@ -28,7 +27,7 @@ class MetavoxelVisitation;
|
||||||
class MetavoxelVisitor;
|
class MetavoxelVisitor;
|
||||||
|
|
||||||
/// The base metavoxel representation shared between server and client.
|
/// The base metavoxel representation shared between server and client.
|
||||||
class MetavoxelData : public QSharedData {
|
class MetavoxelData {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MetavoxelData();
|
MetavoxelData();
|
||||||
|
@ -56,12 +55,6 @@ private:
|
||||||
QHash<AttributePointer, MetavoxelNode*> _roots;
|
QHash<AttributePointer, MetavoxelNode*> _roots;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QExplicitlySharedDataPointer<MetavoxelData> MetavoxelDataPointer;
|
|
||||||
|
|
||||||
void writeDelta(const MetavoxelDataPointer& data, const MetavoxelDataPointer& reference, Bitstream& out);
|
|
||||||
|
|
||||||
void readDelta(MetavoxelDataPointer& data, const MetavoxelDataPointer& reference, Bitstream& in);
|
|
||||||
|
|
||||||
/// A single node within a metavoxel layer.
|
/// A single node within a metavoxel layer.
|
||||||
class MetavoxelNode {
|
class MetavoxelNode {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
|
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "MetavoxelData.h"
|
||||||
#include "MetavoxelMessages.h"
|
#include "MetavoxelMessages.h"
|
||||||
|
|
||||||
class EditVisitor : public MetavoxelVisitor {
|
class EditVisitor : public MetavoxelVisitor {
|
||||||
|
@ -47,8 +48,7 @@ bool EditVisitor::visit(MetavoxelInfo& info) {
|
||||||
return true; // subdivide
|
return true; // subdivide
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelEdit::apply(MetavoxelDataPointer& data) const {
|
void MetavoxelEdit::apply(MetavoxelData& data) const {
|
||||||
//data.detach();
|
|
||||||
EditVisitor visitor(*this);
|
EditVisitor visitor(*this);
|
||||||
data->guide(visitor);
|
data.guide(visitor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
|
|
||||||
#include "AttributeRegistry.h"
|
#include "AttributeRegistry.h"
|
||||||
#include "Bitstream.h"
|
#include "Bitstream.h"
|
||||||
#include "MetavoxelData.h"
|
|
||||||
|
class MetavoxelData;
|
||||||
|
|
||||||
/// A message containing the state of a client.
|
/// A message containing the state of a client.
|
||||||
class ClientStateMessage {
|
class ClientStateMessage {
|
||||||
|
@ -42,7 +43,7 @@ public:
|
||||||
STREAM float granularity;
|
STREAM float granularity;
|
||||||
STREAM OwnedAttributeValue value;
|
STREAM OwnedAttributeValue value;
|
||||||
|
|
||||||
void apply(MetavoxelDataPointer& data) const;
|
void apply(MetavoxelData& data) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_STREAMABLE_METATYPE(MetavoxelEdit)
|
DECLARE_STREAMABLE_METATYPE(MetavoxelEdit)
|
||||||
|
|
Loading…
Reference in a new issue