DATASERV (kgeom) functions


LIBRARY ROUTINE

kgeom_remove_primitive - remove a primitive from a geometry object

LIBRARY CALL

int
kgeom_remove_primitive(
   kgeom_object *object,
   kgeom_primitive *primitive)

INPUT

OUTPUT

none

RETURN VALUE

TRUE on success, FALSE on failure

DESCRIPTION

This routine will remove the given primitive from the primitive list of the specified object. If the given primitive is not on the primitive list of that object, then no action is taken.

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().

The number of primitives which have been added to the primitive list of an object is returned by the function kgeom_number_primitives(). A primitive at a specific position in the primitive list 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.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATASERV/objects/library/kgeom/src/object.c

SEE ALSO

kgeom(3), kgeom_primitive, kgeom_new_primitive, kgeom_blast_primitive, kgeom_add_primitive, kgeom_get_primitive, kgeom_number_primitives

COPYRIGHT

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