SDLsetPrimitive(3DTM)

NAME
SDLsetPrimitive, SDLgetPrimitive - Surface description language primitive typing macros.

SYNOPSIS
#include <sdl.h>

SDLsetPrimitive(char *header, SDLprim_t primitive_type)

SDLgetPrimitive(char *header, SDLprim_t *primitive_type)

DESCRIPTION
SDLsetPrimitive inserts into the header the tag SDLprimitive immediately followed by a tag identifying the primitive type of the data. The primitive_type should be one of the following: SDLpoint, SDLlineseg, SDLtriangle, SDLquad, or SDLsphere. See SDLclass for more information about these types.

SDLgetPrimitive examines the character string header, and if the SDLprimitive tag if found, sets the argument primitive_type to be the succeeding value. The defined values that can be returned are SDLpoint, SDLlineseg, SDLtriangle, SDLquad, and SDLsphere. See SDLclass for more information about these types. If the SDLprimitive tag was not found within the header, the primitive_type argument receives a default value of SDLpoint.

SEE ALSO
DTM, SDLclass

DIAGNOSTICS
SDLgetPrimitive returns the error DTMERROR if the header does not contain the tag SDLprimitive or if no value follows the SDLprimitive tag. In either case, the value of raster_type still defaults to SDLpoint.

BUGS
SDLsetPrimitive has no way of determining if the header contains sufficient space to hold the SDLprimitive tag and the primitive_type value. The results of attempting to store this information beyond the end of the allocated space are undefined.