<house> ‐ A set of three ruled surface generated by six Bezier curves
This element defines a set of three ruled surface; each of these surfaces is generated by two Bezier curves. The integer value of the segments attribute is the number of steps that will be used to build the meshes of the ruled surfaces when rendering them.
This element can have elements in its scope that define the properties of the house: color, material, materialRaytrace, shader, texture, or video. In addition to these optional elements, it must have six Bezier curves as child elements that define the geometry of the house. The value of the location attribute of these six curves must be ne, se, n, s, nw, and sw. The three ruled surfaces are generated by the three pairs of curves: (ne, se), (n, s), and (nw, sw).
The following elements must occur in house: six Bezier curves and, possibly, color, material, materialRaytrace, shader, texture, or video.
The example below defines a silverish house generated by six 4-point Bezier curves. The coordinates of the control points of the curves are omitted for conciseness.
<node id="node_house_#1"> <house id="house_#1" segments="10"> <material id="silver"> <ambient r="0.19225" g="0.19225" b="0.19225" a="1.0"/> <diffuse r="0.5075" g="0.5075" b="0.5075" a="1.0"/> <specular r="0.50827" g="0.50827" b="0.50827" a="1.0"/> <emission r="0.0" g="0.0" b="0.0" a="1.0"/> <shininess s="51.2"/> </material> <bezier size="4" location="ne" x1="0.10" y1="0.20" z1="0.00" x2="0.10" y2="0.20" z2="0.00" x3="0.10" y3="0.10" z3="0.00" x4="0.10" y4="0.00" z4="0.00" /> <bezier size="4" location="se" ... /> <bezier size="4" location="n" ... /> <bezier size="4" location="s" ... /> <bezier size="4" location="nw" ... /> <bezier size="4" location="sw" ... /> </house> </node>
The attribute values of the Bezier curves that define a house can be accessed through the sequence node:location:attribute in which node is the wave node ID, location is value of the location attribute (ne, se, n, s, nw, or sw), and attribute is the curve attribute.
The example below prints the z1 attribute of the ne Bezier curve in the house named node_house.
<action> <write_console value="Bezier ne z1 ({$node_house:ne:z1})" /> </action>