set_user_attribute_value ‐ Dynamic modification of the attribute values of a user or of its child element (a navigation or a view_volume)
This action is used to modify the values associated with attributes in a user node or in a user child element (a navigation or a view_volume). The string value of the operator attribute is an operator string. The values of the operator must be "=", "=", "+=", "-=", "*=", or "/=". The child node (a user, a navigation or a view_volume element) must contain at least one attribute and its associated value. If the attribute values contain parenthesized expressions, they are dynamically evaluated as numerical expressions and their values are replaced in the attribute value strings.
The attributes of the child node (a user, a navigation or a view_volume element) are called source attributes. The values of the source attributes are used to modify the values of the corresponding attributes in the target user node, or navigation or view_volume child element of the target user node.
For instance if the source element is a view_volume that contains the attributes x_min, x_max, and y_min, y_max, and if the operator is "=", the source values replace the target values in the view_volume of the target user node. The other operators respectively correspond to addition, substraction, multiplication, and division of the target values by the source values. The attributes of the target element that are not instantiated in the source element are not modified by this action.
The following element must occur in set_user_attribute_value: one user element or a user child element (a navigation or a view_volume).
The target node must be a user node.
The example below defines an action that increases the values of the x_min, x_max, y_min, and y_max attributes of the view_volume in the target user node(s).
<set_user_attribute_value operator="*="> <view_volume x_min="1.001" x_max="1.001" y_min="1.001" y_max="1.001"/> </set_user_attribute_value>
The example below defines an action that entirely redefines the view_volume of target user node(s) as a view volume for orthogonal projection (see Figure 5-25).
<set_user_attribute_value operator="="> <view_volume type="ortho" x_min="-7.0" x_max="7.0" y_min="(-7.0*({#height}) / ({#width}))" y_max="(7.0*({#height}) / ({#width}))" near="-1100.0" far="1100.0"/> </set_user_attribute_value>