Support constant scaling factor

This commit is contained in:
fredb
2007-01-21 10:33:34 +00:00
parent 40aecd688e
commit dd4326f7c4

View File

@@ -1050,9 +1050,9 @@ public:
if (!_condition || _condition->test()) {
SGScaleAnimation::Transform* transform;
transform = static_cast<SGScaleAnimation::Transform*>(node);
SGVec3d scale(_animationValue[0]->getValue(),
_animationValue[1]->getValue(),
_animationValue[2]->getValue());
SGVec3d scale(_animationValue[0] ? _animationValue[0]->getValue() : 1.0,
_animationValue[1] ? _animationValue[1]->getValue() : 1.0,
_animationValue[2] ? _animationValue[2]->getValue() : 1.0);
transform->setScaleFactor(scale);
}
traverse(node, nv);