next up previous contents index
Next: Global Settings and Matrix Up: GraphicDevice Previous: GraphicDevice

Primitive Graphic Routines

  These are the basic functions for creating lines and patches. Functions like attribute or transform would fit in this list, but they have a global character as well.

void move (VEC3 point)
The line drawing pen position is set to point.

void draw (VEC3 point)
Draw a line from the current pen position to the position point and update the pen position. The line regards type and color settings.

void begin_patch (void)
This starts the definition of a patch. The patch's border is a polygon. Each line is defined by vertices and each vertex may have a normal.

void patch_vertex (VEC3 point)
This defines the next vertex of the patch. This vertex point regards the current patch attributes (e.g. normal, color, ...).

void patch_normal (VEC3 normal)
This defines the normal for all patch vertices following before the next call to this function. If the attribute G_LIGHT_MODEL is set to ON this normal is taken into account to calculate the lighting.

void patch_color (VEC3 color)
This defines the color for the following patch vertices. The setting is changed by another call to this function. It should be used only in between dev->begin_patch and dev->end_patch.

void end_patch (void)
This closes the definition of the actual patch.

void text (VEC3 point, char *string)
Displays the 2-D text string at the position point in three dimensional coordinates regarding the current text attributes for color, font, etc. The point will be transformed into screen coordinates by the actual matrices. It is machine dependent if the transformation has to be performed by the device driver.



SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.