Chapter 7. VC Command References

This chapter provides a detailed definition of the various elementary actions used in script commands.

7.1. AddNode

add_node ‐ A node addition action

7.1.2. Description

This action is used to add a node. The node that is included in the add_node element defines the new node that will be added as daughter node of the target node(s) when the action is executed.

7.1.3. Expected children

One of the following elements must occur in add_node: node or use.

7.1.5. Example

The example below defines an action that adds a new sphere node.

<add_node>
  <node id="sphere_#{#n}">
    <sphere id="sphere" radius="(0.05+({#n}*.02))" 
     sky_sphere="false" segments="{#segments}">
        <texture encoding="jpeg" xlink:href="sky.jpg" 
              id="sky" tile_s="1" tile_t="-1" />
    </sphere>
  </node/>
</add_node>