Minor cleanup.

This commit is contained in:
Nissim Hadar 2017-09-22 18:37:21 -07:00
parent 736a6aa311
commit c2eea7d40b
6 changed files with 13 additions and 11 deletions

View file

@ -179,9 +179,9 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen
_lastDimensions = entity->getDimensions();
_keyLightProperties = entity->getKeyLightProperties();
_stageProperties = entity->getStageProperties();
_skyboxProperties = entity->getSkyboxProperties();
_hazeProperties = entity->getHazeProperties();
_stageProperties = entity->getStageProperties();
#if 0
if (_lastShapeURL != _typedEntity->getCompoundShapeURL()) {

View file

@ -91,9 +91,9 @@ private:
bool _needBackgroundUpdate{ true };
KeyLightPropertyGroup _keyLightProperties;
StagePropertyGroup _stageProperties;
SkyboxPropertyGroup _skyboxProperties;
HazePropertyGroup _hazeProperties;
StagePropertyGroup _stageProperties;
// More attributes used for rendering:
QString _ambientTextureURL;

View file

@ -513,9 +513,9 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_BACKGROUND_MODE, backgroundMode, getBackgroundModeAsString());
_stage.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
_haze.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
_skybox.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
_haze.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
_stage.copyToScriptValue(_desiredProperties, properties, engine, skipDefaults, defaultEntityProperties);
COPY_PROPERTY_TO_QSCRIPTVALUE(PROP_FLYING_ALLOWED, flyingAllowed);
COPY_PROPERTY_TO_QSCRIPTVALUE(PROP_GHOSTING_ALLOWED, ghostingAllowed);
@ -1610,8 +1610,9 @@ bool EntityItemProperties::decodeEntityEditPacket(const unsigned char* data, int
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_SHAPE_TYPE, ShapeType, setShapeType);
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_COMPOUND_SHAPE_URL, QString, setCompoundShapeURL);
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_BACKGROUND_MODE, BackgroundMode, setBackgroundMode);
properties.getSkybox().decodeFromEditPacket(propertyFlags, dataAt, processedBytes);
properties.getHaze().decodeFromEditPacket(propertyFlags, dataAt, processedBytes);
properties.getSkybox().decodeFromEditPacket(propertyFlags, dataAt, processedBytes);
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_FLYING_ALLOWED, bool, setFlyingAllowed);
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_GHOSTING_ALLOWED, bool, setGhostingAllowed);

View file

@ -179,9 +179,9 @@ public:
DEFINE_PROPERTY_REF(PROP_NAME, Name, name, QString, ENTITY_ITEM_DEFAULT_NAME);
DEFINE_PROPERTY_REF_ENUM(PROP_BACKGROUND_MODE, BackgroundMode, backgroundMode, BackgroundMode, BACKGROUND_MODE_INHERIT);
DEFINE_PROPERTY_REF_ENUM(PROP_HAZE_MODE, HazeMode, hazeMode, HazeMode, HAZE_MODE_INHERIT);
DEFINE_PROPERTY_GROUP(Stage, stage, StagePropertyGroup);
DEFINE_PROPERTY_GROUP(Skybox, skybox, SkyboxPropertyGroup);
DEFINE_PROPERTY_GROUP(Haze, haze, HazePropertyGroup);
DEFINE_PROPERTY_GROUP(Stage, stage, StagePropertyGroup);
DEFINE_PROPERTY_GROUP(Animation, animation, AnimationPropertyGroup);
DEFINE_PROPERTY_REF(PROP_SOURCE_URL, SourceUrl, sourceUrl, QString, "");
DEFINE_PROPERTY(PROP_LINE_WIDTH, LineWidth, lineWidth, float, LineEntityItem::DEFAULT_LINE_WIDTH);

View file

@ -246,9 +246,9 @@ void ZoneEntityItem::debugDump() const {
qCDebug(entities) << " _backgroundMode:" << EntityItemProperties::getBackgroundModeString(_backgroundMode);
_keyLightProperties.debugDump();
_stageProperties.debugDump();
_skyboxProperties.debugDump();
_hazeProperties.debugDump();
_stageProperties.debugDump();
}
ShapeType ZoneEntityItem::getShapeType() const {
@ -312,8 +312,8 @@ void ZoneEntityItem::resetRenderingPropertiesChanged() {
withWriteLock([&] {
_keyLightPropertiesChanged = false;
_backgroundPropertiesChanged = false;
_stagePropertiesChanged = false;
_skyboxPropertiesChanged = false;
_hazePropertiesChanged = false;
_stagePropertiesChanged = false;
});
}

View file

@ -73,6 +73,7 @@ public:
HazeMode getHazeMode() const { return _hazeMode; }
SkyboxPropertyGroup getSkyboxProperties() const { return resultWithReadLock<SkyboxPropertyGroup>([&] { return _skyboxProperties; }); }
HazePropertyGroup getHazeProperties() const { return resultWithReadLock<HazePropertyGroup>([&] { return _hazeProperties; }); }
const StagePropertyGroup& getStageProperties() const { return _stageProperties; }
@ -86,9 +87,9 @@ public:
bool keyLightPropertiesChanged() const { return _keyLightPropertiesChanged; }
bool backgroundPropertiesChanged() const { return _backgroundPropertiesChanged; }
bool stagePropertiesChanged() const { return _stagePropertiesChanged; }
bool skyboxPropertiesChanged() const { return _skyboxPropertiesChanged; }
bool hazePropertiesChanged() const { return _hazePropertiesChanged; }
bool stagePropertiesChanged() const { return _stagePropertiesChanged; }
void resetRenderingPropertiesChanged();
@ -115,9 +116,9 @@ protected:
BackgroundMode _backgroundMode = BACKGROUND_MODE_INHERIT;
HazeMode _hazeMode = HAZE_MODE_INHERIT;
StagePropertyGroup _stageProperties;
SkyboxPropertyGroup _skyboxProperties;
HazePropertyGroup _hazeProperties;
StagePropertyGroup _stageProperties;
bool _flyingAllowed { DEFAULT_FLYING_ALLOWED };
bool _ghostingAllowed { DEFAULT_GHOSTING_ALLOWED };
@ -126,8 +127,8 @@ protected:
// Dirty flags turn true when either keylight properties is changing values.
bool _keyLightPropertiesChanged { false };
bool _backgroundPropertiesChanged{ false };
bool _hazePropertiesChanged{ false };
bool _skyboxPropertiesChanged { false };
bool _hazePropertiesChanged{ false };
bool _stagePropertiesChanged { false };
static bool _drawZoneBoundaries;