int
kgeom_number_primitives(kgeom_object *object)
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()
. The function
kgeom_remove_primitive()
allows you to remove
a primitive from the primitive list of an object
after it has been added. A primitive
at any given position can be retrieved using the
function kgeom_get_primitive()
.
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 another geometry object contained on the primitive list of this object will be considered to be a single primitive. The primitives contained in a subobject is not considered when counting the number of primitives in the given object.
none
$DATASERV/objects/library/kgeom/src/object.c