A SERVICE OF

logo

Array Storage Class Types
181
Array Classes
csArray is a virtual array class from which all other array classes are derived. Arrays are
used as storage vehicles for a variety of types. Cosmo 3D provides a wealth of
csArray-derived array classes for different types, including:
csPtrArrayAn array of pointers often used to point to values in other arrays.
csFieldArrayAn array of elds.
csByteArrayAn array of bytes.
csIntArrayAn array of integers.
csFloatArrayAn array of oats.
csVec2fArrayAn array of Vec2f classes.
csVec3fArrayAn array of Vec3f classes.
csVec3sArrayAn array of Vec3s classes.
csVec4fArrayAn array of Vec4f classes.
csMatrix4fArrayAn array of Matrix4f classes.
csRotationArrayAn array of rotation vectors.
csStringArrayAn array of strings.
csShortArrayAn array of shorts.
csFieldInfoArrayAn array of eld descriptions.
csRefArrayAn array of pointers to containers.
csEventArrayAn array of events; an event is a user action, such as a mouse click.
The methods in all of the array classes are similar, as described in the following section.
Array Methods
The methods in csArray and all of the derived array classes are similar; the differences
stem from the different types lling the arrays. The following example explains the
methods in csIntArray but you can easily apply the same descriptions to all of the other
array classes.