<<<<<<<<<<<<<<<<<

_polygon(renderer) Rendering _polygon(renderer)

NAME

_polygon - rendering primitive for a set of polygons

NOTE

This class is actually a placeholder for a specific rendering class, such as phigs_polygon. Since its interface is identical across architecures, only one man page exists. Thus, throughout this man page you should think of _polygon as (class)_polygon where (class) is the name of the renderer of interest (i.e., gl, phigs, starbase, vogle).

DESCRIPTION

The _polygon class is a geomtric interface to the rendering system. It is used to render a set of polygons on the display.

SUPERCLASS

(class)_modeller

MESSAGES

build! args Send a new copy of the geometry to the rendering primitive. The next time the object is drawn, this geometry will be used. These are "hidden" arguments, that is, they can only be sent from within a program, not from scripts. They are:

int numpolys; int *lengths; float *coords; float *colors; float *normals; float *texture_coords

numpolys is the number of polygons in the set. lengths is an array of integers. Each entry contains the number of vertices in the corresponding polygon. coords is the array of vertex coordinates stored as (x0, y0, z0, x1, y1, z1, ..., xn, yn, zn), where n is the sum of the lengths of all the polylines. If the colors argument is non-null, it points to an array of RGB triplets - one for each vertex. The polygons vertices are then colored with this data and shaded dependent on the current properties. A null value ignores vertex colors and produces only the geometry. If the normals argument is non-null, it points to an array of IJK triplets - one for each vertex - defining the surface normal at that vertex. If shading is performed, the normal will be used in the lighting calculation to determine the color of the vertex. A null value ignores vertex colors and the system will perform the lighting calculation (if necessary) in its default

manner (dependent on each system).

draw! This message causes the geometry last passed into the object (via build!) to be rendered. There is some differences between the different renderers. For example gp_polygon will sort transparent polygons while the others currently do not.

EXAMPLES

See display_polygon.cls for an example of how to use this class.

SEE ALSO

renderer, gl, starbase, phigs, vogle, (class)_modeller, (class)_points, (class)_lines, (class)_indexed_polygon, (class)_tmesh, (class)_text, (class)_text_3d, (class)_text_an


Please send comments and suggestions to
consult@rpi.edu