A SERVICE OF

logo

15
Chapter 2
2. Creating Geometries
csGeometry is an abstract class. All derivations of the class represent one or more
geometric objects, either concrete (such as a sphere or cube) or abstract (such as geoSet).
The appearance of a shapewhether a sphere is dotted or striped is characterized by
a csAppearance object, csContext object, or both. Combining a geometry with an
appearance completely describes the graphic content of a rendered object.
A csGeoSet is a collection of primitives, such as points, lines, triangles, and triangle
strips, that, when arranged, create a geometry. For example, a collection of points can
represent a star eld and a collection of triangles can be arranged to form a sphere or a
landscape.
After a brief terminology overview, the rst part of this chapter discusses the ready-made
geometries available in Cosmo 3D, such as csSphere and csCube. The remainder of the
chapter discusses how to create your own csGeoSet-derived classes and how to use the
csGeoSet-derived classes provided by Cosmo 3D.
These are the sections in this chapter:
•“Geometry Terminology on page 16
•“Using Large Geometries on page 16.
•“csGeoSet Attributes on page 20.
•“Setting Attributes on page 22.
•“Cosmo 3D-Derived csGeoSet Objects on page 30.