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

OUTPUT

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.