Next: DISCUSSION
Up: NEW CODE STRUCTURE
Previous: User interface
To write a custom application the programmer must supply the following
three routines:
- myinit(): called once at the start of the application.
Recommending for fetching parameters, reading data from files, initializing display variables,
and adding custom controls.
- mydraw(): called at the start of the program and each time a
display control is changed. This routine redraws the entire display object
in user coordinates. The drawing is initially scaled to fit the window.
- mycommand(command,value): Receives all command codes and optional values.
(Customization is the same as SEP-61 with one major change:
The file mybutton for configuring control interfaces
has been replaced by calling UICommandAdd() within myinit().)
These are the graphics and user interface routines available to
the custom routines:
*GraphicsSetRotate (x,y,z)
*GraphicsSetScale (x,y,z)
*GraphicsSetShift (x,y,z)
*GraphicsSetLight (x,y,z)
*UICommandAdd (com_type,control,label,code)
Erase ()
PointList (vert,nvert)
LineList (vert,nline)
PolyLine (vert,nvert)
Polygon (vert,nvert)
*PatchList (vert,npatch,patch_size)
*Mesh (vert,nvert,patch,npatch,patch_size)
*Raster2D (where,width,height,array)
*RasterList (where,width,height,array,npatch)
Text (where,text)
TextAlign (halign,valign)
Fat (fat)
Color (color)
*Shade (shade)
com_type = LABEL, TEXT, MENU, ITEM, SLIDER;
control = MENUBAR, CONTROL3D, CUSTOM;
Vector3D vert[], where[];
string label, code, text, color;
float x, y, z, width, height, shade;
int nvert, patch[], patch_size, npatch, fat, width[], height[];
byte array[][];
* added or changed since SEP--61
Next: DISCUSSION
Up: NEW CODE STRUCTURE
Previous: User interface
Stanford Exploration Project
1/13/1998