DATASERV (kgeom) functions


LIBRARY ROUTINE

kgeom_write_object - write a geometry object

LIBRARY CALL

int
kgeom_write_object(kgeom_object *object, char *filename)

INPUT

OUTPUT

none

RETURN VALUE

TRUE on success, FALSE otherwise

DESCRIPTION

This function will write the given geometry object to a specified file. The object can later be read from that file using the kgeom_read_object() function.

This function will write everything contained in the geometry object to the file. All the object information will be written followed by the information and data contained in each primitive in the object's primitive list.

After the object has been written, you may free it using the kgeom_blast_object() function.

ADDITIONAL INFORMATION

If the geometry set being written is too large to fit into memory, a series of incremental calls can be made to write out an object a primitive at a time. See the kgeom_write_primitive() man page for more details on this capability.

EXAMPLES

The following code would be used to write a geometry object out to the file "data.kgm":

kgeom_object *geom;

// presumably some primitives would be added here

kgeom_write_object(geom, "data.kgm");

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

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

SEE ALSO

kgeom(3), kgeom_read_object, kgeom_new_object, kgeom_blast_object

COPYRIGHT

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