SPHIGS(local)

." @(#)SPHIGS

NAME
SPHIGS - Simple PHIGS (v0.8)

DESCRIPTION
The fundamentals of this package is described fully in Chapter 7 of "Computer Graphics" by Foley, van Dam, Feiner, and Hughes. A complete reference manual is included with all shipments of SPHIGS. This manpage only lists the functions, their parameters' data types, and their return values, and offers no insight into the functionality thereof. The functions are listed twice: once arranged categorically, and once alphabetically.

IMPORTANT DATA STRUCTURES
typedef double point[3], vector[3], matrix[4][4];
typedef short  vertex_index;
typedef char   name;      /* a number from 1 to 32 */

PICK CORRELATION
typedef struct {
   point position;
   int   view_index;
   int   button_chord[3];
   int   button_of_last_transition;
} locator_measure;
typedef struct {
   int structureID;
   int elementIndex;
   int elementType;    /* symbolic constants in elementType.h */
   int pickID;
} pickPathItem;
typedef pickPathItem pickPath[MAX_HIERARCHY_LEVEL];
typedef struct {
   int pickLevel;
   pickPath path;
} pickInformation;

PARAMETER DATA TYPES

All functions return void unless otherwise noted. Parameters whose names are all uppercase are integers whose values are to be chosen from a set of defined constants.

int rendering_mode;  /* WIREFRAME_RAW, WIREFRAME, FLAT, LIT_FLAT */
int matrix_concat_type; /* ASSIGN, PRECONCATENATE, POSTCONCATENATE */
int projection_type;  /* ORTHOGRAPHIC, PERSPECTIVE */
int edge_flag;  /* EDGE_VISIBLE, EDGE_INVISIBLE */
int implicit_regeneration_mode;  /* SUPPRESSED, ALLOWED */
int rendering_algorithm;  /* RENDER_PAINTERS, RENDER_BSP */

ROUTINES (arranged by category)

  Housekeeping
void SPH_begin (int width, int height, int planecount, int shadecount);
void SPH_end (void);
void SPH_setMaxStructureID (int);
void SPH_setMaxNameID (int);
void SPH_setMaxViewIndex (int);
void SPH_setMaxLightSourceIndex (int);

  Conveniences
double *SPH_defPoint (double *pt, double x, double y, double z);
NDC_rectangle SPH_defNDCrectangle (double lx, double by, double rx, double ty);

  Filtering
void SPH_addToInvisFilter (int viewID, name);
void SPH_removeFromInvisFilter (int viewID, name);

  Structure Elements
void SPH_addToNameSet (name);
void SPH_removeFromNameSet (name);
void SPH_polyhedron (int nverts, int nfacets,
	             point *verts, vertex_index *facets);
void SPH_fillArea (int vCount, point *vertices);
void SPH_polyMarker(int vCount, point *vertices);
void SPH_polyLine (int vCount, point *vertices);
void SPH_text (point origin, char *string);
void SPH_setInteriorColor (int value);
void SPH_setLineStyle (int LINE_STYLE);
void SPH_setLineColor (int value);
void SPH_setLineWidthScaleFactor (double value);
void SPH_setEdgeFlag (int value);
void SPH_setEdgeStyle (int LINE_STYLE);
void SPH_setEdgeColor (int value);
void SPH_setEdgeWidthScaleFactor (double value);
void SPH_setMarkerStyle (int MARKER_STYLE);
void SPH_setMarkerColor (int value);
void SPH_setMarkerSizeScaleFactor (double value);
void SPH_setTextFont (int value);
void SPH_setTextColor (int value);
void SPH_setModelingTransformation (matrix, int method);
void SPH_clearModelingTransformation (void);
void SPH_label (int);
void SPH_setPickIdentifier (int);
void SPH_executeStructure (int structID);

  Display Posting
void SPH_postRoot (int structID, int viewID);
void SPH_unpostRoot (int structID, int viewID);
void SPH_unpostAllRoots (int viewID);

  Structure Editing
void SPH_openStructure (int structID);
void SPH_closeStructure (void);
void SPH_copyStructure (int structID);
void SPH_setElementPointer (int elptr);
int  SPH_inquireElementPointer (void);
void SPH_offsetElementPointer (int offset);
void SPH_moveElementPointerToLabel (int label);
void SPH_deleteElement (void);
void SPH_deleteElementsInRange (int index1, int index2);
void SPH_deleteElementsBetweenLabels (int lab1, int lab2);

  Refreshing
void SPH_setDoubleBufferingFlag (boolean);
void SPH_setRenderingMode (int viewindex, int value);
void SPH_setImplicitRegenerationMode (int mode);
void SPH_regenerateScreen (void);

  View Specification
void SPH_evaluateViewOrientationMatrix
        (point  view_ref_point,
         vector view_plane_normal,
         vector view_up_vector,
         matrix vo_matrix /*varparm*/ );
void SPH_evaluateViewMappingMatrix
        (double umin, double umax,
         double vmin, double vmax,
         int proj_type,  /* ORTHOGRAPHIC or PERSPECTIVE */
         point proj_ref_point,
         double front_plane_dist,
         double back_plane_dist,
         double vp_minx, double vp_maxx,
         double vp_miny, double vp_maxy,
         double vp_minz, double vp_maxz,
         matrix vm_matrix /*varparm*/ );
void SPH_setViewRepresentation
        (int viewIndex,
         matrix vo_matrix,
         matrix vm_matrix,
         double vp_minx, double vp_maxx,
         double vp_miny, double vp_maxy,
         double vp_minz, double vp_maxz);

void SPH_enableView (int viewIndex);
void SPH_disableView (int viewIndex);
void SPH_setViewBackgroundColor (int viewIndex, int color);
void SPH_setViewRenderAlgorithm (int viewIndex, int algorithm);
void SPH_setViewPointLightSource (int viewIndex,
         double u, double v, double n);
void SPH_addPointLightSource (int viewIndex, int lightIndex,
         point position, boolean cameraRelative,
         double intensity, double attenuation);
void SPH_removePointLightSource (int viewIndex, int lightIndex);

  Input Handling
#define SPH_setInputMode                SRGP_setInputMode
#define SPH_waitEvent                   SRGP_waitEvent
#define SPH_getKeyboard                 SRGP_getKeyboard
#define SPH_sampleKeyboard              SRGP_sampleKeyboard
#define SPH_setKeyboardProcessingMode   SRGP_setKeyboardProcessingMode
#define SPH_setKeyboardEchoColor        SRGP_setKeyboardEchoColor
#define SPH_setKeyboardEchoFont         SRGP_setKeyboardEchoFont
#define SPH_setKeyboardMeasure          SRGP_setKeyboardMeasure
#define SPH_setLocatorEchoCursorShape   SRGP_setLocatorEchoCursorShape
#define SPH_setLocatorButtonMask        SRGP_setLocatorButtonMask
void SPH_getLocator (locator_measure*);
void SPH_sampleLocator (locator_measure*);
void SPH_setLocatorMeasure (point position);
void SPH_setKeyboardEchoOrigin (point position);
void SPH_pickCorrelate (point npc_position, int viewindex,
     	  	        pickInformation *pickinfo);

  Modeling Transformations
void SPH_scale (double x, double y, double z, matrix result);
void SPH_rotateX (double angle, matrix result);
void SPH_rotateY (double angle, matrix result);
void SPH_rotateZ (double angle, matrix result);
void SPH_translate (double x, double y, double z, matrix result);
void SPH_oldComposeMatrix (matrix m1, matrix m2, matrix result);
void SPH_composeMatrix (matrix m1, matrix m2, matrix result);

  Color Table Modification
#define SPH_loadFont			SRGP_loadFont
void SPH_loadCommonColor (int microcolorindex, char *name);

ROUTINES (arranged alphabetically)

void SPH_addPointLightSource (int viewIndex, int lightIndex,
         point position, boolean cameraRelative,
         double intensity, double attenuation);
void SPH_addToInvisFilter (int viewID, name);
void SPH_addToNameSet (name);
void SPH_begin (int width, int height, int planecount, int shadecount);
void SPH_clearModelingTransformation (void);
void SPH_closeStructure (void);
void SPH_composeMatrix (matrix m1, matrix m2, matrix result);
void SPH_copyStructure (int structID);
NDC_rectangle SPH_defNDCrectangle (double lx, double by, double rx, double ty);
double *SPH_defPoint (double *pt, double x, double y, double z);
void SPH_deleteElement (void);
void SPH_deleteElementsBetweenLabels (int lab1, int lab2);
void SPH_deleteElementsInRange (int index1, int index2);
void SPH_disableView (int viewIndex);
void SPH_enableView (int viewIndex);
void SPH_end (void);
void SPH_evaluateViewMappingMatrix
        (double umin, double umax,
         double vmin, double vmax,
         int proj_type,  /* ORTHOGRAPHIC or PERSPECTIVE */
         point proj_ref_point,
         double front_plane_dist,
         double back_plane_dist,
         double vp_minx, double vp_maxx,
         double vp_miny, double vp_maxy,
         double vp_minz, double vp_maxz,
         matrix vm_matrix /*varparm*/ );
void SPH_evaluateViewOrientationMatrix
        (point  view_ref_point,
         vector view_plane_normal,
         vector view_up_vector,
         matrix vo_matrix /*varparm*/ );
void SPH_executeStructure (int structID);
void SPH_fillArea (int vCount, point *vertices);
void SPH_getLocator (locator_measure*);
int  SPH_inquireElementPointer (void);
void SPH_label (int);
void SPH_loadCommonColor (int microcolorindex, char *name);
void SPH_moveElementPointerToLabel (int label);
void SPH_offsetElementPointer (int offset);
void SPH_oldComposeMatrix (matrix m1, matrix m2, matrix result);
void SPH_openStructure (int structID);
void SPH_pickCorrelate (point npc_position, int viewindex,
     	  	        pickInformation *pickinfo);
void SPH_polyhedron (int nverts, int nfacets,
		point *verts, vertex_index *facets);
void SPH_polyLine (int vCount, point *vertices);
void SPH_polyMarker(int vCount, point *vertices);
void SPH_postRoot (int structID, int viewID);
void SPH_regenerateScreen (void);
void SPH_removeFromInvisFilter (int viewID, name);
void SPH_removeFromNameSet (name);
void SPH_removePointLightSource (int viewIndex, int lightIndex);
void SPH_rotateX (double angle, matrix result);
void SPH_rotateY (double angle, matrix result);
void SPH_rotateZ (double angle, matrix result);
void SPH_sampleLocator (locator_measure*);
void SPH_scale (double x, double y, double z, matrix result);
void SPH_setDoubleBufferingFlag (boolean);
void SPH_setEdgeColor (int value);
void SPH_setEdgeFlag (int value);
void SPH_setEdgeStyle (int LINE_STYLE);
void SPH_setEdgeWidthScaleFactor (double value);
void SPH_setElementPointer (int elptr);
void SPH_setImplicitRegenerationMode (int mode);
void SPH_setInteriorColor (int value);
void SPH_setKeyboardEchoOrigin (point position);
void SPH_setLineColor (int value);
void SPH_setLineStyle (int LINE_STYLE);
void SPH_setLineWidthScaleFactor (double value);
void SPH_setLocatorMeasure (point position);
void SPH_setMarkerColor (int value);
void SPH_setMarkerSizeScaleFactor (double value);
void SPH_setMarkerStyle (int MARKER_STYLE);
void SPH_setMaxLightSourceIndex (int);
void SPH_setMaxNameID (int);
void SPH_setMaxStructureID (int);
void SPH_setMaxViewIndex (int);
void SPH_setModelingTransformation (matrix, int method);
void SPH_setPickIdentifier (int);
void SPH_setRenderingMode (int viewindex, int value);
void SPH_setTextColor (int value);
void SPH_setTextFont (int value);
void SPH_setViewBackgroundColor (int viewIndex, int color);
void SPH_setViewPointLightSource (int viewIndex,
         double u, double v, double n);
void SPH_setViewRenderAlgorithm (int viewIndex, int algorithm);
void SPH_setViewRepresentation
        (int viewIndex,
         matrix vo_matrix,
         matrix vm_matrix,
         double vp_minx, double vp_maxx,
         double vp_miny, double vp_maxy,
         double vp_minz, double vp_maxz);
void SPH_text (point origin, char *string);
void SPH_translate (double x, double y, double z, matrix result);
void SPH_unpostAllRoots (int viewID);
void SPH_unpostRoot (int structID, int viewID);

BUGS
Please consult section 0 of the SPHIGS Reference Manual for details on omissions, known bugs, and differences with the textual specification.

AUTHOR
David Sklar, Chris R. Brown