gleExtrusion






gleExtrusion ‐ Extrude arbitrary 2D contour along arbitrary
3D path.



void gleExtrusion (int ncp,
                gleDouble contour[][2],
                gleDouble cont_normal[][2],
                gleDouble up[3],
                int npoints,
                gleDouble point_array[][3],
                float color_array[][3]);



ncp       number of contour points

contour   2D contour

cont_normal
          2D contour normals

up        up vector for contour

npoints   numpoints in poly‐line

point_array
          polyline vertices

color_array
          colors at polyline verts



Extrude arbitrary 2D contour along arbitrary 3D path. The
argument "contour" specifies the 2D contour to be extruded,
while the argument "point_array" specifies the path along
which to extrude.  The vector "up" defines the orientation
of the contour y‐axis in real 3D space.

Note that neither the very first segment, nor the very last
segment are drawn. The first and last segments serve only to
define the angle of the join at the very ends of the
polyline. Thus, to draw one segment, three must be
specified. To draw two segments, four must be specified,
etc.

The normal array may be NULL. If it is, normal vectors will
NOT be automatically generated, and the object will look
terrible when lit.

The color array may be NULL. If NULL, the current color is
used. If not NULL, the glColor3f() routine is used to set
the color; therefore, specifying the glColorMaterial()









                             ‐2‐


subroutine before this primitive can be used to set diffuse,
specular, ambient, etc. colors.


gleTwistExtrusion, gleSuperExtrusion

Linas Vepstas (linas@linas.org)