DoVarTriangleStrip(3D) — Kubota Pacfic Computer Inc. (\*(Dd)
NAME
DoVarTriangleStrip − Create a variable triangle strip primitive object
SYNOPSIS
C:
DtObject DoVarTriangleStrip(colormodel, vertexcount,
vertlocs, vertnorms, vertcolors)
DtColorModel colormodel;
DtInt vertexcount;
DtReal vertlocs[];
DtReal vertnorms[];
DtReal vertcolors[];
FORTRAN:
INTEGER∗4 DOVTRS(COLMOD, VTXCNT, VTXLOC,
VTXNRM, VTXCLR)
INTEGER∗4 COLMOD
INTEGER∗4 VTXCNT
REAL∗8 VTXLOC(∗)
REAL∗8 VTXNRM(∗)
REAL∗8 VTXCLR(∗)
DESCRIPTION
DoVarTriangleStrip creates a primitive object that defines a variable strip of connected triangles.
The main difference between a variable triangle strip and a triangle strip is that a variable triangle strip does not make a copy of the vertex data into its own data space. It simply maintains pointers to the vertex data (locations, normals and colors) in user space. A call to DpUpdVarTriangleStrip <DPUVTS> informs a variable triangle strip object that the user data has changed.
The parameter colormodel specifies the color model used if vertex colors are provided.
The parameter vertexcount specifies the total number of vertices in the strip. The first three vertices make up the first triangle. Each additional vertex adds an additional triangle. This means that the number of triangles drawn is two less than the number of vertices.
The parameter vertlocs is an array of vertex locations. The parameter vertnorms is an array of vertex normals. If vertex normals are not available use DcNullPtr <DCNULL>. The parameter vertcolors is an array of vertex colors. If vertex colors are not available use DcNullPtr <DCNULL>.
The geometric normal to each triangle is calculated using the right-hand rule (when the fingers of the right hand point in the order of the vertices, the thumb points in the direction of the normal) for triangles 1, 3, 5, etc. The left-hand rule is used for triangle 2, 4, 6, etc.
ERRORS
DoVarTriangleStrip must be called with at least three vertices.
[WARNING - invalid parameter]
SEE ALSO
DoTriangleStrip(3D), DoVarLineList(3D), DoVarPointList(3D), DoVarSimplePolygonMesh(3D), DoVarTriangleMesh(3D), DpUpdVarTriangleStrip(3D)
September 02, 1992