VertexTypes(3D) — Stardent Computer Inc. (Doré)
NAME
VertexTypes − An explanation of Doré primitive vertex types
DESCRIPTION
The information in this appendix pertains to most Doré primitive objects. Notable exceptions are variable data primitives (DoVar- <DOV> functions), which use a different syntax to obtain vertex information, and DoPrimSurf <DOPMS> primitives, which do not allow user-defined vertex information.
When entering primitive object data into the Doré database, you may provide information about vertex normals, vertex colors uv coordinates and uvw coordinates. This additional information is used by Doré to more accurately shade the object during rendering.
When a Doré primitive object is created, all the vertex data (locations, normals, colors, uv coordinates and uvw coordinates) are specified in a single array. A base vertextype parameter must be set to reflect the type of information supplied for each vertex. The following table lists the possible constant values for vertextype:
Value of vertextypeVertex Information Supplied
DcLocDCLOnly the vertex location
DcLocNrmDCLNThe vertex location and the vertex normal
DcLocClrDCLCThe vertex location and the vertex color
DcLocNrmClrDCLNC All three are supplied
Some colormodels require more or less than three components per vertex. If DcLoc <DCL> is specified, three floating point values (x,y,z) must be supplied for each vertex. DcLocNrm <DCLN> and DcLocClr <DCLC> require three additional values for vertex normals and vertex colors, respectively. DcLocNrmClr <DCLNC> requires nine floating point values for each vertex.
Vertex normals must be unit vectors (of length one). Normals that are not unit vectors will produce improper shading. The Doré functions DsTextureUVCount <DSTUVC> and DsTextureUVWCount <DSTWC> can be used in conjunction with a base vertextype parameter to specify a new vertex type that includes uv and/or uvw coordinates.
The new vertex type is specifed by ORing one of the base vertex values with the above named functions. Both DsTextureUVCount <DSTUVC> and DsTextureUVWCount <DSTWC> take a parameter, count, which specifies how many sets of uv or uvw coordinates are specified for each vertex in the vertex list.
As an example, consider the following vertex type specification within a DoTriangleList function:
DoTriangleList(DcRGB, DcLocClr | DsTextureUVCount(2), tri_cnt, vert)
In this function, the vertex type specifies that each vertex is defined by ten DtReal values:
an ordered triple specifying the vertex position
an ordered triple specifying the red, green and blue values
two ordered pairs specifying uv coordinates
If the value of tri_cnt in this example were fifteen, the array vert would contain 150 DtReal values.
A vertex type may specify both uv and uvw coordinates. Associated vertex arrays would list uv data before uvw data.
Examples of various vertex arrays can be found in Chapter Five of the Doré Programmer’s Guide.
September 29, 2021