2
Chapter 1: Getting Started with Cosmo 3D
Understanding a Cosmo 3D Scene Graph
A scene graph is a directed acyclical graph of nodes that embodies the semantics of what
is to be drawn, but not how it is to be drawn. Developers interacting with a scene graph
are interested in achieving a result, usually seeing a model on screen and manipulating
it. They leave it up to Cosmo 3D to achieve this result in the most efficient way.
A Cosmo 3D scene graph consists of objects that inherit appropriate methods and fields
from the Cosmo 3D classes. Conceptually, there are four kinds of classes:
• Base classes—csObject, csField, csContainer, and csNode. These classes are never
instantiated directly. Instead, applications create subclasses that inherit certain
functionality from the base classes. Base classes are discussed in this chapter.
• Scene graph construction classes—csGroup, csShape, csGeometry, and
csAppearance determine appearance in a general way.
• Specific appearance classes—csContext, csDrawTraversal, csEnvironment and
some of their subclasses determine how things are drawn, for example, whether
lights or fog are applied.
• Geometry classes, such as csSphere or csCylinder, are the building blocks of the
model itself.
This manual starts by discussing the different kinds of classes. It then briefly lists the
steps required to create a simple sample program. The sample program itself is listed in
Appendix B, “Cosmo 3D Sample Application.”
Scene Graph Base Classes
This section discusses the following abstract, base classes that provide the functionality
that is necessary to implement a scene graph:
•“The csObject Class”
•“The csContainer Class”
•“The csField Class”
•“The csNode Class”