A SERVICE OF

logo

Leaf Nodes
57
Leaf Nodes
Leaf nodes are responsible for dening the visual and aural elements portrayed in a
scene. Leaf nodes cannot have child nodes.
The following list shows all of the different types of Cosmo 3D leaf nodes; all are
derivatives of csLeaf.
csShapeassociates a csGeometry object with a csAppearance object.
csLightis an abstract base class for light sources.
csDirectionalLightis a directional light source whose origin is at innity.
csPointLightis a point source of light that radiates equally in all directions.
csSpotLightis a conical spot light.
The following section describes csShape. All of the other nodes are described in
Chapter 8, Lighting and Fog.
csShape
A csShape node associates a csGeometry object with a csAppearance object. Together,
the csGeometry and csAppearance objects create a complete description of a shape.
To associate a csGeometry object with a csAppearance object, use the following
methods:
void setAppearance(csAppearance* appearance);
void setGeometry(csGeometry* geometry);
There is a corresponding set of get...() methods that return the current appearance and
geometry objects in the csShape object.