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

_tmesh(renderer) Rendering _tmesh(renderer)

NAME

_tmesh - rendering primitive for a mesh built from triangle strips

NOTE

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

DESCRIPTION

The _tmesh class is a geomtric interface to the rendering system. It is used to render one or more triangle strips on the display. This class can only be used from within a program.

Trangle meshes cannot turn corners without modifying the order of the vertices in the strip. This class handles this case by building a mesh out of separate strips. If normals are not calculated and supplied for the entire mesh, shading discontinuities will be present along edges between strips.

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 numstrips; int *numpts; float *coords; float *colors; float *normals; float *textures;

numstrips is the total number of triangle strips being defined. numpts is an array of the total number of vertices in each triangle mesh. coords is an array of XYZ triplets for each vertex. The topology of the triangle strip is implicit by the ordering of these veritices. The first three vertices define the first triangle. After that, each vertex defines another triangle with itself and the previous two vertices. Thus, the total number of

triangles is (*numpts - 2). If the colors argument is non-null, it points to an array of RGB triplets - one for each vertex. The triangle's 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.

draw! This message causes the geometry last passed into the object (via build!) to be rendered.

EXAMPLES

see display_triangle_strips.cls for an example of how to use this class.


Please send comments and suggestions to
consult@rpi.edu