Classes defining Geometric Objects
13
Classes defining Geometric Objects
The actual geometric objects in a Cosmo 3D scene graph are derived as follows:
• As a direct subclass of csGeometry. These subclasses include csCone, csSphere, and
so on.
• A csGeoSet is a collection of primitives, such as points, lines, triangles, and triangle
strips, that, when arranged, create a geometry.
For more information, see Chapter 2, “Creating Geometries.”
Steps for Creating and Displaying a Simple Scene Graph
The following procedure summarizes the steps you take to create and render the simple
scene graph shown in Figure 1-1. This scene graph is created by the example program
discussed in Appendix B, “Cosmo 3D Sample Application.”
1. Create csAppearance and csGeometry containers to define the appearance and the
geometry of a shape.
For more information on setting csAppearance values, see Chapter 3, “Specifying
the Appearance of Geometries.” For more information on setting csGeometry
values, see Chapter 2, “Creating Geometries.”
2. Create csShape and csTransform nodes.
For more information on setting csShape values, see Chapter 2, “Creating
Geometries.”
3. Associate the csAppearance and csGeometry containers using the csShape node.
4. Add the csShape node as a child of a csTransform node.
The csTransform node orients and positions the geometry encapsulated in the
csShape node. For more information on setting csTransform values, see Chapter 6,
“Placing Shapes in a Scene.”
Note: A csShape node by itself can be a complete scene graph. Typically, however,
scene graphs have many csShape nodes, most of which are connected to other parts
of the scene graph with csTransform nodes.