kobject kgeom_create_primitive_list(
kobject object)
none
Once created, the primitive list is accessed via the
KGEOM_PRIMITIVE_LIST
attribute. The length
of the primitive list is determined by the
KGEOM_NUMBER_PRIMITIVES
attribute.
The Geometry Services attribute and data functions
will always operate on the current primitive in the
primitive list. The current primitive is dictated
by the KGEOM_PRIMITIVE_POSITION
attribute.
The following example illustrates how this call would be used to create a primitive list on an output object. In this example, a primitive list with two primitives, a spheres list and a disjoint polyline, is created.
kobject obj;
obj = kgeom_open_output_object("newgeometry.viff");
kgeom_create_primtive_list(obj);
kgeom_set_attribute(obj, KGEOM_OBJECT,
KGEOM_NUMBER_PRIMITIVES, 2);
kgeom_put_data(obj, KGEOM_SPHERES, loc, NULL, rad);
kgeom_put_data(obj, KGEOM_POLYLINE_DISJOINT, loc, NULL);
As geometry primitive data is put into the data object with put data calls, the primitive position will be automatically incremented.
none
none
$DATASERV/objects/library/koldgeom/src/geometry.c