kgeom_primitive *
kgeom_get_primitive(
kgeom_object *object,
int position)
none
Geometry Primitives and Primitive Lists
A geometry primitive contains geometric data which describes a shape in space. Lines, triangles, and spheres, are all considered to be geometric primitives. For a complete description of all the geometry primitives, see the kgeom_primitive man page.
Each geometry object contains a list of such geometry
primitives. New primitives can be created using the
function kgeom_new_primitive()
. Once a new
primitive has been created and its data assigned, it
can be added to the primitive list of the object
using the function kgeom_add_primitive()
. A
corresponding function
kgeom_remove_primitive()
allows you to remove
a primitive from the primitive list of an object.
The number of primitives which have been added to the
primitive list of an object is returned by the
function kgeom_number_primitives()
.
The primitive functions should be the only means used for accessing the primitives on a primitive list. Even though the primitive list of the geometry object could be acccessed directly, it should be considered to be private. By using the primitive list function calls, you can be certain to maintain the integrity of the primitive list.
Note that if the primitive being returned is another geometry object, then the return value should be cast to \f(CWkgeom_object *fP before assigning it to a geometry object variable.
none
$DATASERV/objects/library/kgeom/src/object.c