Section 4 - Geometry and the Scene Hierarchy

The following figure shows the hierarchy of geometric entities in the system. NAMEDENTITY is the base class for all geometric entities, providing the NAME attribute.

Figure 1: Hierarchy of geometry-related entities

A MODEL represents a 3d transformation, specified by translate, rotate, and scale attributes. The resulting transformation is constructed by applying the scale, then the rotation (in the axis order x,y,z), then the translation. MODEL also provides the parent attribute, which allows a MODEL to be parented to another MODEL. If a MODEL has a parent, then its transformation is computed by first applying the translation/rotation components of the parent transform, then applying the local transform as described earlier.

A SHAPE represents a piece of geometry. It provides one attribute, shader, which specifies the surface shader to be used to render the shape. The actual geometric primitives supported by the system are subclassed from the SHAPE entity. RenderDude! supports the following primitives:

Any SHAPE can suppress consideration of normals and texture coordinates by setting their hasnormals and/or hastex attributes to false. If vertex normals are suppressed, polygonal face normals are used instead. If texture coordinates are suppressed, a value of (0,0) will be supplied to any texture requesting texture coordinates.