Add scale as a property of every scenegraph node.

This commit is contained in:
Kalle Bladin
2016-08-26 20:32:08 -04:00
parent 99cfc4453f
commit a82ad66374
4 changed files with 15 additions and 7 deletions
+7 -3
View File
@@ -25,24 +25,28 @@
#include <modules/base/scale/staticscale.h>
namespace {
const std::string _loggerCat = "StaticScale";
const std::string KeyValue = "Scale";
}
namespace openspace {
StaticScale::StaticScale(const ghoul::Dictionary& dictionary)
: _scaleValue(1.0)
: _scaleValue("scale", "Scale", 1.0, 1.0, 1000.0)
{
const bool hasValue = dictionary.hasKeyAndValue<glm::vec3>(KeyValue);
if (hasValue) {
dictionary.getValue(KeyValue, _scaleValue);
float value;
dictionary.getValue(KeyValue, value);
_scaleValue.setValue(value);
}
Scale::addProperty(_scaleValue);
}
StaticScale::~StaticScale() {}
double StaticScale::scaleValue() const {
return _scaleValue;
return _scaleValue.value();
}
void StaticScale::update(const UpdateData&) {}