-void
-ValueNode_Scale::set_scalar(Real x)
-{
- set_link("scalar",ValueNode::Handle(ValueNode_Const::create(x)));
-}
-
-bool
-ValueNode_Scale::set_scalar(const ValueNode::Handle &x)
-{
- if(!x
- || x->get_type()!=ValueBase::TYPE_REAL
- && !PlaceholderValueNode::Handle::cast_dynamic(x)
- )
- return false;
- scalar=x;
- return true;
-}
-
-ValueNode::Handle
-ValueNode_Scale::get_scalar()const
-{
- return scalar;
-}
-
-bool
-ValueNode_Scale::set_value_node(const ValueNode::Handle &x)
-{
- assert(get_type());
-
- // if this isn't a proper value
- if(!x ||
- // or we don't have a type, and this value isn't one of the types we accept
- (get_type()==ValueBase::TYPE_NIL && !check_type(x->get_type())) ||
- // or we have a type and this value is a different type and (placeholder?)
- (get_type()!=ValueBase::TYPE_NIL && x->get_type()!=get_type() && !PlaceholderValueNode::Handle::cast_dynamic(x)))
- // then fail to set the value
- return false;
-
- value_node=x;
-
- return true;
-}
-
-ValueNode::Handle
-ValueNode_Scale::get_value_node()const
-{
- return value_node;
-}
-
-