mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 16:18:03 +02:00
Merge branch 'master' into vr-edit-a
This commit is contained in:
commit
b0c951a2c4
11 changed files with 85 additions and 4276 deletions
|
@ -57,7 +57,7 @@ module.exports = {
|
||||||
"print": false,
|
"print": false,
|
||||||
"RayPick": false,
|
"RayPick": false,
|
||||||
"LaserPointers": false,
|
"LaserPointers": false,
|
||||||
"ContextOverlay": false
|
"ContextOverlay": false,
|
||||||
"module": false
|
"module": false
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
|
|
@ -137,48 +137,11 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Left gray MouseArea
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.left: parent.left;
|
anchors.fill: parent
|
||||||
anchors.right: textContainer.left;
|
|
||||||
anchors.top: textContainer.top;
|
|
||||||
anchors.bottom: textContainer.bottom;
|
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
letterbox.visible = false
|
letterbox.visible = false;
|
||||||
}
|
|
||||||
}
|
|
||||||
// Right gray MouseArea
|
|
||||||
MouseArea {
|
|
||||||
anchors.left: textContainer.left;
|
|
||||||
anchors.right: parent.left;
|
|
||||||
anchors.top: textContainer.top;
|
|
||||||
anchors.bottom: textContainer.bottom;
|
|
||||||
acceptedButtons: Qt.LeftButton
|
|
||||||
onClicked: {
|
|
||||||
letterbox.visible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Top gray MouseArea
|
|
||||||
MouseArea {
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.top: parent.top;
|
|
||||||
anchors.bottom: textContainer.top;
|
|
||||||
acceptedButtons: Qt.LeftButton
|
|
||||||
onClicked: {
|
|
||||||
letterbox.visible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Bottom gray MouseArea
|
|
||||||
MouseArea {
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.top: textContainer.bottom;
|
|
||||||
anchors.bottom: parent.bottom;
|
|
||||||
acceptedButtons: Qt.LeftButton
|
|
||||||
onClicked: {
|
|
||||||
letterbox.visible = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,9 +387,9 @@ ScrollingWindow {
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: treeView
|
target: treeView.selection
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
var path = scriptsModel.data(treeView.currentIndex, 0x100)
|
var path = scriptsModel.data(treeView.selection.currentIndex, 0x100)
|
||||||
if (path) {
|
if (path) {
|
||||||
selectedScript.text = path
|
selectedScript.text = path
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -416,9 +416,9 @@ Rectangle {
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: treeView
|
target: treeView.selection
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
var path = scriptsModel.data(treeView.currentIndex, 0x100)
|
var path = scriptsModel.data(treeView.selection.currentIndex, 0x100)
|
||||||
if (path) {
|
if (path) {
|
||||||
selectedScript.text = path
|
selectedScript.text = path
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -121,14 +121,19 @@ bool PolyLineEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityP
|
||||||
}
|
}
|
||||||
|
|
||||||
void PolyLineEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) {
|
void PolyLineEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) {
|
||||||
|
static const QUrl DEFAULT_POLYLINE_TEXTURE = QUrl(PathUtils::resourcesPath() + "images/paintStroke.png");
|
||||||
|
QUrl entityTextures = DEFAULT_POLYLINE_TEXTURE;
|
||||||
if (entity->texturesChanged()) {
|
if (entity->texturesChanged()) {
|
||||||
entity->resetTexturesChanged();
|
entity->resetTexturesChanged();
|
||||||
auto textures = entity->getTextures();
|
auto textures = entity->getTextures();
|
||||||
QString path = textures.isEmpty() ? PathUtils::resourcesPath() + "images/paintStroke.png" : textures;
|
if (!textures.isEmpty()) {
|
||||||
if (!_texture || _lastTextures != path) {
|
entityTextures = QUrl(textures);
|
||||||
_texture = DependencyManager::get<TextureCache>()->getTexture(QUrl(path));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_texture || _texture->getURL() != entityTextures) {
|
||||||
|
_texture = DependencyManager::get<TextureCache>()->getTexture(entityTextures);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PolyLineEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) {
|
void PolyLineEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) {
|
||||||
|
@ -140,6 +145,10 @@ void PolyLineEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPo
|
||||||
auto normalsChanged = entity->normalsChanged();
|
auto normalsChanged = entity->normalsChanged();
|
||||||
entity->resetPolyLineChanged();
|
entity->resetPolyLineChanged();
|
||||||
|
|
||||||
|
_polylineTransform = Transform();
|
||||||
|
_polylineTransform.setTranslation(entity->getPosition());
|
||||||
|
_polylineTransform.setRotation(entity->getRotation());
|
||||||
|
|
||||||
if (pointsChanged) {
|
if (pointsChanged) {
|
||||||
_lastPoints = entity->getLinePoints();
|
_lastPoints = entity->getLinePoints();
|
||||||
}
|
}
|
||||||
|
@ -217,13 +226,13 @@ void PolyLineEntityRenderer::doRender(RenderArgs* args) {
|
||||||
Q_ASSERT(args->_batch);
|
Q_ASSERT(args->_batch);
|
||||||
|
|
||||||
gpu::Batch& batch = *args->_batch;
|
gpu::Batch& batch = *args->_batch;
|
||||||
batch.setModelTransform(Transform{ _modelTransform }.setScale(vec3(1)));
|
batch.setModelTransform(_polylineTransform);
|
||||||
batch.setUniformBuffer(PAINTSTROKE_UNIFORM_SLOT, _uniformBuffer);
|
batch.setUniformBuffer(PAINTSTROKE_UNIFORM_SLOT, _uniformBuffer);
|
||||||
|
|
||||||
if (_texture->isLoaded()) {
|
if (_texture && _texture->isLoaded()) {
|
||||||
batch.setResourceTexture(PAINTSTROKE_TEXTURE_SLOT, _texture->getGPUTexture());
|
batch.setResourceTexture(PAINTSTROKE_TEXTURE_SLOT, _texture->getGPUTexture());
|
||||||
} else {
|
} else {
|
||||||
batch.setResourceTexture(PAINTSTROKE_TEXTURE_SLOT, nullptr);
|
batch.setResourceTexture(PAINTSTROKE_TEXTURE_SLOT, DependencyManager::get<TextureCache>()->getWhiteTexture());
|
||||||
}
|
}
|
||||||
|
|
||||||
batch.setInputFormat(polylineFormat);
|
batch.setInputFormat(polylineFormat);
|
||||||
|
|
|
@ -47,6 +47,7 @@ protected:
|
||||||
void updateGeometry(const std::vector<Vertex>& vertices);
|
void updateGeometry(const std::vector<Vertex>& vertices);
|
||||||
static std::vector<Vertex> updateVertices(const QVector<glm::vec3>& points, const QVector<glm::vec3>& normals, const QVector<float>& strokeWidths);
|
static std::vector<Vertex> updateVertices(const QVector<glm::vec3>& points, const QVector<glm::vec3>& normals, const QVector<float>& strokeWidths);
|
||||||
|
|
||||||
|
Transform _polylineTransform;
|
||||||
QVector<glm::vec3> _lastPoints;
|
QVector<glm::vec3> _lastPoints;
|
||||||
QVector<glm::vec3> _lastNormals;
|
QVector<glm::vec3> _lastNormals;
|
||||||
QVector<float> _lastStrokeWidths;
|
QVector<float> _lastStrokeWidths;
|
||||||
|
@ -54,7 +55,6 @@ protected:
|
||||||
gpu::BufferView _uniformBuffer;
|
gpu::BufferView _uniformBuffer;
|
||||||
uint32_t _numVertices { 0 };
|
uint32_t _numVertices { 0 };
|
||||||
bool _empty{ true };
|
bool _empty{ true };
|
||||||
QString _lastTextures;
|
|
||||||
NetworkTexturePointer _texture;
|
NetworkTexturePointer _texture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,10 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen
|
||||||
_lastRotation = entity->getRotation();
|
_lastRotation = entity->getRotation();
|
||||||
_lastDimensions = entity->getDimensions();
|
_lastDimensions = entity->getDimensions();
|
||||||
|
|
||||||
|
_keyLightProperties = entity->getKeyLightProperties();
|
||||||
|
_stageProperties = entity->getStageProperties();
|
||||||
|
_skyboxProperties = entity->getSkyboxProperties();
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (_lastShapeURL != _typedEntity->getCompoundShapeURL()) {
|
if (_lastShapeURL != _typedEntity->getCompoundShapeURL()) {
|
||||||
|
@ -196,14 +200,14 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
updateKeyZoneItemFromEntity(entity);
|
updateKeyZoneItemFromEntity();
|
||||||
|
|
||||||
if (sunChanged) {
|
if (sunChanged) {
|
||||||
updateKeySunFromEntity(entity);
|
updateKeySunFromEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sunChanged || skyboxChanged) {
|
if (sunChanged || skyboxChanged) {
|
||||||
updateKeyAmbientFromEntity(entity);
|
updateKeyAmbientFromEntity();
|
||||||
}
|
}
|
||||||
if (backgroundChanged || skyboxChanged) {
|
if (backgroundChanged || skyboxChanged) {
|
||||||
updateKeyBackgroundFromEntity(entity);
|
updateKeyBackgroundFromEntity(entity);
|
||||||
|
@ -265,19 +269,19 @@ bool ZoneEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPoint
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneEntityRenderer::updateKeySunFromEntity(const TypedEntityPointer& entity) {
|
void ZoneEntityRenderer::updateKeySunFromEntity() {
|
||||||
const auto& sunLight = editSunLight();
|
const auto& sunLight = editSunLight();
|
||||||
sunLight->setType(model::Light::SUN);
|
sunLight->setType(model::Light::SUN);
|
||||||
sunLight->setPosition(_lastPosition);
|
sunLight->setPosition(_lastPosition);
|
||||||
sunLight->setOrientation(_lastRotation);
|
sunLight->setOrientation(_lastRotation);
|
||||||
|
|
||||||
// Set the keylight
|
// Set the keylight
|
||||||
sunLight->setColor(ColorUtils::toVec3(entity->getKeyLightProperties().getColor()));
|
sunLight->setColor(ColorUtils::toVec3(_keyLightProperties.getColor()));
|
||||||
sunLight->setIntensity(entity->getKeyLightProperties().getIntensity());
|
sunLight->setIntensity(_keyLightProperties.getIntensity());
|
||||||
sunLight->setDirection(entity->getKeyLightProperties().getDirection());
|
sunLight->setDirection(_keyLightProperties.getDirection());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneEntityRenderer::updateKeyAmbientFromEntity(const TypedEntityPointer& entity) {
|
void ZoneEntityRenderer::updateKeyAmbientFromEntity() {
|
||||||
const auto& ambientLight = editAmbientLight();
|
const auto& ambientLight = editAmbientLight();
|
||||||
ambientLight->setType(model::Light::AMBIENT);
|
ambientLight->setType(model::Light::AMBIENT);
|
||||||
ambientLight->setPosition(_lastPosition);
|
ambientLight->setPosition(_lastPosition);
|
||||||
|
@ -285,24 +289,24 @@ void ZoneEntityRenderer::updateKeyAmbientFromEntity(const TypedEntityPointer& en
|
||||||
|
|
||||||
|
|
||||||
// Set the keylight
|
// Set the keylight
|
||||||
ambientLight->setAmbientIntensity(entity->getKeyLightProperties().getAmbientIntensity());
|
ambientLight->setAmbientIntensity(_keyLightProperties.getAmbientIntensity());
|
||||||
|
|
||||||
if (entity->getKeyLightProperties().getAmbientURL().isEmpty()) {
|
if (_keyLightProperties.getAmbientURL().isEmpty()) {
|
||||||
setAmbientURL(entity->getSkyboxProperties().getURL());
|
setAmbientURL(_skyboxProperties.getURL());
|
||||||
} else {
|
} else {
|
||||||
setAmbientURL(entity->getKeyLightProperties().getAmbientURL());
|
setAmbientURL(_keyLightProperties.getAmbientURL());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneEntityRenderer::updateKeyBackgroundFromEntity(const TypedEntityPointer& entity) {
|
void ZoneEntityRenderer::updateKeyBackgroundFromEntity(const TypedEntityPointer& entity) {
|
||||||
editBackground();
|
editBackground();
|
||||||
setBackgroundMode(entity->getBackgroundMode());
|
setBackgroundMode(entity->getBackgroundMode());
|
||||||
setSkyboxColor(entity->getSkyboxProperties().getColorVec3());
|
setSkyboxColor(_skyboxProperties.getColorVec3());
|
||||||
setProceduralUserData(entity->getUserData());
|
setProceduralUserData(entity->getUserData());
|
||||||
setSkyboxURL(entity->getSkyboxProperties().getURL());
|
setSkyboxURL(_skyboxProperties.getURL());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneEntityRenderer::updateKeyZoneItemFromEntity(const TypedEntityPointer& entity) {
|
void ZoneEntityRenderer::updateKeyZoneItemFromEntity() {
|
||||||
/* TODO: Implement the sun model behavior / Keep this code here for reference, this is how we
|
/* TODO: Implement the sun model behavior / Keep this code here for reference, this is how we
|
||||||
{
|
{
|
||||||
// Set the stage
|
// Set the stage
|
||||||
|
|
|
@ -41,9 +41,9 @@ protected:
|
||||||
virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override;
|
virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateKeyZoneItemFromEntity(const TypedEntityPointer& entity);
|
void updateKeyZoneItemFromEntity();
|
||||||
void updateKeySunFromEntity(const TypedEntityPointer& entity);
|
void updateKeySunFromEntity();
|
||||||
void updateKeyAmbientFromEntity(const TypedEntityPointer& entity);
|
void updateKeyAmbientFromEntity();
|
||||||
void updateKeyBackgroundFromEntity(const TypedEntityPointer& entity);
|
void updateKeyBackgroundFromEntity(const TypedEntityPointer& entity);
|
||||||
void updateAmbientMap();
|
void updateAmbientMap();
|
||||||
void updateSkyboxMap();
|
void updateSkyboxMap();
|
||||||
|
@ -89,6 +89,10 @@ private:
|
||||||
bool _needAmbientUpdate{ true };
|
bool _needAmbientUpdate{ true };
|
||||||
bool _needBackgroundUpdate{ true };
|
bool _needBackgroundUpdate{ true };
|
||||||
|
|
||||||
|
KeyLightPropertyGroup _keyLightProperties;
|
||||||
|
StagePropertyGroup _stageProperties;
|
||||||
|
SkyboxPropertyGroup _skyboxProperties;
|
||||||
|
|
||||||
// More attributes used for rendering:
|
// More attributes used for rendering:
|
||||||
QString _ambientTextureURL;
|
QString _ambientTextureURL;
|
||||||
NetworkTexturePointer _ambientTexture;
|
NetworkTexturePointer _ambientTexture;
|
||||||
|
|
|
@ -49,8 +49,10 @@ ZoneEntityItem::ZoneEntityItem(const EntityItemID& entityItemID) : EntityItem(en
|
||||||
EntityItemProperties ZoneEntityItem::getProperties(EntityPropertyFlags desiredProperties) const {
|
EntityItemProperties ZoneEntityItem::getProperties(EntityPropertyFlags desiredProperties) const {
|
||||||
EntityItemProperties properties = EntityItem::getProperties(desiredProperties); // get the properties from our base class
|
EntityItemProperties properties = EntityItem::getProperties(desiredProperties); // get the properties from our base class
|
||||||
|
|
||||||
|
// Contains a QString property, must be synchronized
|
||||||
_keyLightProperties.getProperties(properties);
|
withReadLock([&] {
|
||||||
|
_keyLightProperties.getProperties(properties);
|
||||||
|
});
|
||||||
|
|
||||||
_stageProperties.getProperties(properties);
|
_stageProperties.getProperties(properties);
|
||||||
|
|
||||||
|
@ -58,7 +60,10 @@ EntityItemProperties ZoneEntityItem::getProperties(EntityPropertyFlags desiredPr
|
||||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(compoundShapeURL, getCompoundShapeURL);
|
COPY_ENTITY_PROPERTY_TO_PROPERTIES(compoundShapeURL, getCompoundShapeURL);
|
||||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(backgroundMode, getBackgroundMode);
|
COPY_ENTITY_PROPERTY_TO_PROPERTIES(backgroundMode, getBackgroundMode);
|
||||||
|
|
||||||
_skyboxProperties.getProperties(properties);
|
// Contains a QString property, must be synchronized
|
||||||
|
withReadLock([&] {
|
||||||
|
_skyboxProperties.getProperties(properties);
|
||||||
|
});
|
||||||
|
|
||||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(flyingAllowed, getFlyingAllowed);
|
COPY_ENTITY_PROPERTY_TO_PROPERTIES(flyingAllowed, getFlyingAllowed);
|
||||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(ghostingAllowed, getGhostingAllowed);
|
COPY_ENTITY_PROPERTY_TO_PROPERTIES(ghostingAllowed, getGhostingAllowed);
|
||||||
|
@ -88,8 +93,10 @@ bool ZoneEntityItem::setProperties(const EntityItemProperties& properties) {
|
||||||
bool ZoneEntityItem::setSubClassProperties(const EntityItemProperties& properties) {
|
bool ZoneEntityItem::setSubClassProperties(const EntityItemProperties& properties) {
|
||||||
bool somethingChanged = EntityItem::setSubClassProperties(properties); // set the properties in our base class
|
bool somethingChanged = EntityItem::setSubClassProperties(properties); // set the properties in our base class
|
||||||
|
|
||||||
|
// Contains a QString property, must be synchronized
|
||||||
_keyLightPropertiesChanged = _keyLightProperties.setProperties(properties);
|
withWriteLock([&] {
|
||||||
|
_keyLightPropertiesChanged = _keyLightProperties.setProperties(properties);
|
||||||
|
});
|
||||||
|
|
||||||
_stagePropertiesChanged = _stageProperties.setProperties(properties);
|
_stagePropertiesChanged = _stageProperties.setProperties(properties);
|
||||||
|
|
||||||
|
@ -101,11 +108,13 @@ bool ZoneEntityItem::setSubClassProperties(const EntityItemProperties& propertie
|
||||||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(ghostingAllowed, setGhostingAllowed);
|
SET_ENTITY_PROPERTY_FROM_PROPERTIES(ghostingAllowed, setGhostingAllowed);
|
||||||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(filterURL, setFilterURL);
|
SET_ENTITY_PROPERTY_FROM_PROPERTIES(filterURL, setFilterURL);
|
||||||
|
|
||||||
_skyboxPropertiesChanged = _skyboxProperties.setProperties(properties);
|
// Contains a QString property, must be synchronized
|
||||||
|
withWriteLock([&] {
|
||||||
|
_skyboxPropertiesChanged = _skyboxProperties.setProperties(properties);
|
||||||
|
});
|
||||||
|
|
||||||
somethingChanged = somethingChanged || _keyLightPropertiesChanged || _stagePropertiesChanged || _skyboxPropertiesChanged;
|
somethingChanged = somethingChanged || _keyLightPropertiesChanged || _stagePropertiesChanged || _skyboxPropertiesChanged;
|
||||||
|
|
||||||
|
|
||||||
return somethingChanged;
|
return somethingChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,8 +125,12 @@ int ZoneEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,
|
||||||
int bytesRead = 0;
|
int bytesRead = 0;
|
||||||
const unsigned char* dataAt = data;
|
const unsigned char* dataAt = data;
|
||||||
|
|
||||||
int bytesFromKeylight = _keyLightProperties.readEntitySubclassDataFromBuffer(dataAt, (bytesLeftToRead - bytesRead), args,
|
int bytesFromKeylight;
|
||||||
propertyFlags, overwriteLocalData, _keyLightPropertiesChanged);
|
withWriteLock([&] {
|
||||||
|
bytesFromKeylight = _keyLightProperties.readEntitySubclassDataFromBuffer(dataAt, (bytesLeftToRead - bytesRead), args,
|
||||||
|
propertyFlags, overwriteLocalData, _keyLightPropertiesChanged);
|
||||||
|
});
|
||||||
|
|
||||||
somethingChanged = somethingChanged || _keyLightPropertiesChanged;
|
somethingChanged = somethingChanged || _keyLightPropertiesChanged;
|
||||||
bytesRead += bytesFromKeylight;
|
bytesRead += bytesFromKeylight;
|
||||||
dataAt += bytesFromKeylight;
|
dataAt += bytesFromKeylight;
|
||||||
|
@ -132,8 +145,11 @@ int ZoneEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,
|
||||||
READ_ENTITY_PROPERTY(PROP_COMPOUND_SHAPE_URL, QString, setCompoundShapeURL);
|
READ_ENTITY_PROPERTY(PROP_COMPOUND_SHAPE_URL, QString, setCompoundShapeURL);
|
||||||
READ_ENTITY_PROPERTY(PROP_BACKGROUND_MODE, BackgroundMode, setBackgroundMode);
|
READ_ENTITY_PROPERTY(PROP_BACKGROUND_MODE, BackgroundMode, setBackgroundMode);
|
||||||
|
|
||||||
int bytesFromSkybox = _skyboxProperties.readEntitySubclassDataFromBuffer(dataAt, (bytesLeftToRead - bytesRead), args,
|
int bytesFromSkybox;
|
||||||
propertyFlags, overwriteLocalData, _skyboxPropertiesChanged);
|
withWriteLock([&] {
|
||||||
|
bytesFromSkybox = _skyboxProperties.readEntitySubclassDataFromBuffer(dataAt, (bytesLeftToRead - bytesRead), args,
|
||||||
|
propertyFlags, overwriteLocalData, _skyboxPropertiesChanged);
|
||||||
|
});
|
||||||
somethingChanged = somethingChanged || _skyboxPropertiesChanged;
|
somethingChanged = somethingChanged || _skyboxPropertiesChanged;
|
||||||
bytesRead += bytesFromSkybox;
|
bytesRead += bytesFromSkybox;
|
||||||
dataAt += bytesFromSkybox;
|
dataAt += bytesFromSkybox;
|
||||||
|
@ -150,13 +166,18 @@ int ZoneEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,
|
||||||
EntityPropertyFlags ZoneEntityItem::getEntityProperties(EncodeBitstreamParams& params) const {
|
EntityPropertyFlags ZoneEntityItem::getEntityProperties(EncodeBitstreamParams& params) const {
|
||||||
EntityPropertyFlags requestedProperties = EntityItem::getEntityProperties(params);
|
EntityPropertyFlags requestedProperties = EntityItem::getEntityProperties(params);
|
||||||
|
|
||||||
requestedProperties += _keyLightProperties.getEntityProperties(params);
|
withReadLock([&] {
|
||||||
|
requestedProperties += _keyLightProperties.getEntityProperties(params);
|
||||||
|
});
|
||||||
|
|
||||||
requestedProperties += PROP_SHAPE_TYPE;
|
requestedProperties += PROP_SHAPE_TYPE;
|
||||||
requestedProperties += PROP_COMPOUND_SHAPE_URL;
|
requestedProperties += PROP_COMPOUND_SHAPE_URL;
|
||||||
requestedProperties += PROP_BACKGROUND_MODE;
|
requestedProperties += PROP_BACKGROUND_MODE;
|
||||||
requestedProperties += _stageProperties.getEntityProperties(params);
|
requestedProperties += _stageProperties.getEntityProperties(params);
|
||||||
requestedProperties += _skyboxProperties.getEntityProperties(params);
|
|
||||||
|
withReadLock([&] {
|
||||||
|
requestedProperties += _skyboxProperties.getEntityProperties(params);
|
||||||
|
});
|
||||||
|
|
||||||
requestedProperties += PROP_FLYING_ALLOWED;
|
requestedProperties += PROP_FLYING_ALLOWED;
|
||||||
requestedProperties += PROP_GHOSTING_ALLOWED;
|
requestedProperties += PROP_GHOSTING_ALLOWED;
|
||||||
|
|
|
@ -63,12 +63,12 @@ public:
|
||||||
QString getCompoundShapeURL() const;
|
QString getCompoundShapeURL() const;
|
||||||
virtual void setCompoundShapeURL(const QString& url);
|
virtual void setCompoundShapeURL(const QString& url);
|
||||||
|
|
||||||
const KeyLightPropertyGroup& getKeyLightProperties() const { return _keyLightProperties; }
|
KeyLightPropertyGroup getKeyLightProperties() const { return resultWithReadLock<KeyLightPropertyGroup>([&] { return _keyLightProperties; }); }
|
||||||
|
|
||||||
void setBackgroundMode(BackgroundMode value) { _backgroundMode = value; _backgroundPropertiesChanged = true; }
|
void setBackgroundMode(BackgroundMode value) { _backgroundMode = value; _backgroundPropertiesChanged = true; }
|
||||||
BackgroundMode getBackgroundMode() const { return _backgroundMode; }
|
BackgroundMode getBackgroundMode() const { return _backgroundMode; }
|
||||||
|
|
||||||
const SkyboxPropertyGroup& getSkyboxProperties() const { return _skyboxProperties; }
|
SkyboxPropertyGroup getSkyboxProperties() const { return resultWithReadLock<SkyboxPropertyGroup>([&] { return _skyboxProperties; }); }
|
||||||
const StagePropertyGroup& getStageProperties() const { return _stageProperties; }
|
const StagePropertyGroup& getStageProperties() const { return _stageProperties; }
|
||||||
|
|
||||||
bool getFlyingAllowed() const { return _flyingAllowed; }
|
bool getFlyingAllowed() const { return _flyingAllowed; }
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue