A SERVICE OF

logo

188
Appendix A: Cosmo Basic Types
Cosmo 3D provides two bounding shapes as well as an abstract class from which you can
derive your own bounding shapes.
csBound is the abstract base class from which bounding objects are derived.
csBoxBoundprescribes the minimum-sized box that can enclose an object.
csSphereBoundprescribes the minimum-sized sphere that can enclose an object.
csBound provides methods to compute a bounding object around a group of points,
boxes, or spheres, and to extend an existing bounding object by any of these. In addition,
there are methods to determine if a point, bounding box, or bounding sphere is contained
entirely within a bounding object. Methods are also provided to transform bounding
objects using a matrix, test it for emptiness, or test it for intersection with a line segment.
csNodes use csSphereBound for efcient bounding updates and checking.
csGeoSets contain a csBoxBound because it provides a tighter bound around the
vertices.
Field Classes
Together, elds and methods comprise a scene graph node. A eld is a class with set()
and get() methods that set and return the values of the eld. Fields can also have other
methods that perform other operations related to setting or returning the eld value.
Cosmo 3D contains the following Field classes:
csField represents a simple data type, such as oat, csVec3f, and arrays of simple
types.
csFieldInfomaintains information about the elds of a class including string
name, integer id, default value, and a pointer to a member in csContainer.
csMField is an abstract class containing some of the functionality common to
arrays.
csAtomField<Type>is a single-valued atomic eld type.
csArrayField<Type>is a single-valued array eld type.
You can substitute for <Type> any character type, such as Int, Short, or Field. The
following sections describe each of these eld classes.