7.16. SetCurveValues

set_house_curve_value ‐ Dynamic modification of the Bezier curves that define a house element

set_patch_curve_value ‐ Dynamic modification of the Bezier curves that define a patch element

set_path_curve_value ‐ Dynamic modification of the Bezier curves that define a path element

set_wall_curve_value ‐ Dynamic modification of the Bezier curves that define a wall element

set_wave_curve_value ‐ Dynamic modification of the Bezier curves that define a wave element

set_revolution_curve_value ‐ Dynamic modification of the Bezier curves that define a revolution element

set_transformation_path_curve_value ‐ Dynamic modification of one of the Bezier curves that define a path transformation element

7.16.1. Attributes

NameTypeDefaults
locationSTRINGNone (required)
operatorSTRINGNone (required)

7.16.2. Description

This action is used to modify the values associated with a Bezier curve that defines a patch, a path, a wave, a revolution, a wall, a house, or a path transformation element. 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 string value of the location attribute is used to distinguish between the multiple curves that can be associated with a geometric primitive. The string value of the operator attribute is an operator string. The values of the operator must be "=", "=", "+=", "-=", "*=", or "/=". The child node is a bezier element that contains at least one attribute and its associated value.

The attributes of the child node are called source attributes. If the target node contains a Bezier curve, the location of which is equal to the value of the location attribute, the values of the source attributes are used to modify the values of the corresponding attributes of the target curve.

For instance if the action is set_wall_curve_value, if the value of the location attribute is equal to top, if the Bezier parameter contains the attributes x1, y1, and z1, and if the operator is "=", the coordinates of the first point in the Bezier child node replace the coordinates of the first point in the target Bezier curve (the top curve). The other operators respectively correspond to addition, substraction, multiplication, and division of the target values by the source values. The attributes of the target Bezier curve that are not instantiated in the source Bezier (the child node) are not modified by this action.

7.16.3. Expected children

The following element must occur in set_house_curve_value, set_patch_curve_value, set_path_curve_value, set_wall_curve_value, set_wave_curve_value, set_revolution_curve_value, or set_transformation_path_curve_value: one bezier element.

7.16.4. Expected target

The target node must be a house, a patch, a path, a wall, a wave, a revolution, or a path transformation element.

7.16.5. Examples

The example below defines an action that translates the second and third control points of the top curve of the target wall by 0.1 units in the x and z direction.

<set_wall_curve_value location="top" operator="+=">
  <bezier x2="0.1" z2="0.1" x3="0.1" z3="0.1"/>
</set_wall_curve_value>

The example below defines an action that modifies the first and fourth control points of the first curve of the path transformation birdPath_{#n}.

<action>
   <set_transformation_path_curve_value location="1" operator="="> 
      <bezier x1 = "({$root:perchLocX[({$birdPath_{#n}:initial})]})" 
              y1 = "({$root:perchLocY[({$birdPath_{#n}:initial})]})" 
              z1 = "({$root:perchLocZ[({$birdPath_{#n}:initial})]})" 
              x4 = "({$root:perchLocX[({$birdPath_{#n}:final})]})" 
              y4 = "({$root:perchLocY[({$birdPath_{#n}:final})]})" 
              z4 = "({$root:perchLocZ[({$birdPath_{#n}:final})]})" /> 
   </set_transformation_path_curve_value>
   <target type="single_node" value="#birdPath_{#n}" />
</action>