DATASERV (koldgeom) functions


LIBRARY ROUTINE

kgeom_create_primitive_list - create a primitive list on a data object.

LIBRARY CALL

kobject kgeom_create_primitive_list(
   kobject object)

INPUT

OUTPUT

none

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

This function is used to instantiate an empty primitive list within a data services object. Geometry Service primitives are stored and retrieved from this primitive list.

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.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATASERV/objects/library/koldgeom/src/geometry.c

SEE ALSO

koldgeom(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.