DATASERV (kgeom) functions
LIBRARY ROUTINE
kgeom_copy_primitive - copy a geometry primitive
LIBRARY CALL
kgeom_primitive *
kgeom_copy_primitive(
kgeom_object *object,
kgeom_primitive *primitive,
kgeom_primitive *new_primitive)
INPUT
- object - object to which original primitive belongs
- primitive - primitive to copy
OUTPUT
- new_primitive - a pointer to geometry primitive that will
serve as a destination for the copy. If
NULL, then a new destination primitive will
be allocated.
RETURN VALUE
copy of primitive
DESCRIPTION
This routine will copy a given primitive and all
associated data into another primitive structure. If
another primitive structure is not provided for the
destination of the copy, a new one will be
constructed.
The object presentation is used to determine how much
data is present in the primitive, so make certain the
has_alpha, layout, location_dim, and other fields
correctly reflect the data in the primitive. The
copied primitive will not be added to the object, so
you are free to destroy it or add it to another
object.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$DATASERV/objects/library/kgeom/src/prim_copy.c
SEE ALSO
kgeom(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.