Move the PropertyOwner name specification into the constructor and adjust accordingly

This commit is contained in:
Alexander Bock
2017-03-02 18:23:39 -05:00
parent aba3536caa
commit 1689dc4047
27 changed files with 180 additions and 148 deletions
+6 -4
View File
@@ -97,7 +97,8 @@ std::unique_ptr<ScreenSpaceRenderable> ScreenSpaceRenderable::createFromDictiona
}
ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary)
: _enabled("enabled", "Is Enabled", true)
: properties::PropertyOwner("")
, _enabled("enabled", "Is Enabled", true)
, _useFlatScreen("flatScreen", "Flat Screen", true)
, _euclideanPosition(
"euclideanPosition",
@@ -130,14 +131,15 @@ ScreenSpaceRenderable::ScreenSpaceRenderable(const ghoul::Dictionary& dictionary
addProperty(_alpha);
addProperty(_delete);
dictionary.getValue(KeyFlatScreen, _useFlatScreen);
useEuclideanCoordinates(_useFlatScreen);
if (_useFlatScreen)
if (_useFlatScreen) {
dictionary.getValue(KeyPosition, _euclideanPosition);
else
}
else {
dictionary.getValue(KeyPosition, _sphericalPosition);
}
dictionary.getValue(KeyScale, _scale);