30
Chapter 2: Creating Geometries
Cosmo 3D-Derived csGeoSet Objects
Cosmo 3D provides the following csGeoSet collections. Each is a derivative of
csGeoSet.
• csPointSet—A collection of equally-sized points.
• csLineSet—A collection of lines of equal length.
• csIndexedLineSet—A set of indexed line strips.
• csLineStripSet—A collection of linestrips, also known as polylines.
• csTriSet—A collection of triangles.
• csTriFanStrip—A collection of triangles that share a common vertex.
• csTriStripSet—A collection of triangle strips.
• csPolySet—A collection of convex, coplanar polygons.
• csQuadSet—A collection of quadrilaterals.
• csIndexedFaceSet—A polygon with faces that are indexed.
The following sections describe each of these primitive collections.
All of the classes contain virtual draw() and calcBound() methods. The draw() method
specifies how a csGeoSet object is drawn. The calcBound() method specifies how the
bounding box is computed. Other fields are specific to their geometries.
Using csPointSet
A csPointSet object contains a collection of equally-sized points. Point size is the
diameter of each point in pixels.
csPointSet contains the following fields:
void setSize(csFloat size);
csFloat getSize();
The setSize() and getSize() methods allow you to specify and find out, respectively, the
diameter, in pixels, of all the points in a csPointSet object.