20
Chapter 2: Creating Geometries
csGeoSet Attributes
csGeoSet is a virtual class from which all geometric primitives are derived. Cosmo
3D-supplied csGeoSet-derived classes include, for example:
• csPointSet—A collection of equally-sized points.
• csLineStripSet—A collection of linestrips, also known as polylines, of equal width.
• csTriStripSet—A collection of triangle strips.
• csPolySet—A collection of convex, coplanar polygons.
All of the primitives within a given set are equal in size. These primitives are defined by
an array of four attributes:
• color—(red, green, blue, alpha)
• normal—(N
x
, N
y
, N
z
)
• texture coordinates—(S, T)
• coordinates—(X, Y, Z)
Each attribute consists of an array of two to four values; a primitive is defined by these
twelve values.
Note: Although texture coordinates can be specified using four values (S, T, R, Q), the R
value has no current meaning in Cosmo 3D because it does not support textures greater
than two dimensions, and the Q value is always one.
Attribute Bindings
Not all attributes can be applied with the same level of specificity. The levels of specificity
include
• The entire collection of primitives in a csGeoSet object.
• Individual primitives in a csGeoSet object.
• Individual vertices of individual primitives in a csGeoSet object.