PEXOCCTriangleStrip - Triangle Strip Primitive (5.0)


Synopsis

 
     void PEXOCCTriangleStrip(
          PEXOCC context,
          PEXPointer occ_facet_data,
          unsigned int count,
          PEXPointer occ_vertices
     )

 
     void PEXTriangleStrip(
          Display *display,
          XID resource_id,
          PEXOCRequestType req_type,
          unsigned int facet_attributes,
          unsigned int vertex_attributes,
          int color_type,
          PEXArrayOfFacetData facet_data,
          unsigned int count,
          PEXArrayOfVertex vertices
    )

Arguments

context
An OC context returned by a successful PEXCreateOCC call.

display (OCC)
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id (OCC)
The resource identifier of the renderer or structure.

req_type (OCC)
The request type for the output command (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).

facet_attributes (OCC)
A mask indicating the facet attributes provided (PEXGANone(5.0), PEXGAColor(5.0), PEXGANormal(5.0), or PEXGAFloatData(5.2)).

surface_vertex_attributes (OCC)
A mask indicating the vertex attributes provided (PEXGANone(5.0), PEXGAColor(5.0), PEXGANormal(5.0), PEXGAEdges(5.2), PEXGAFloatData(5.2), or PEXGA2D(5.2)).

color_type (OCC)
The type of color data provided (PEXColorTypeIndexed, PEXColorTypeRGB, PEXColorTypeCIE, PEXColorTypeHSV, PEXColorTypeHLS, PEXColorTypeRGB8, PEXColorTypeRGB16, PEXColorTypeRGBA, PEXColorTypeRGBA8, or PEXColorTypeRGBA16).

facet_fp_data_count (OCC)
Number of floats per facet provided.

surface_vertex_fp_data_count (OCC)
Number of floats per vertex provided.

occ_facet_data
A pointer to the facet data. See Facet / Vertex Data Formats.

facet_data
An array of facet data

count
The number of vertices.

occ_vertices
A pointer to vertex data defining the triangle strip. See Facet / Vertex Data Formats.

vertices
An array of vertices defining the triangle strip

data_model (OCC)
Specifies the data model used to represent the geometric data.

data_model_specs (OCC)
Offset and size data for the PEXDataStride or PEXDataUnpacked data models.

Returns

None.

Description

Invoke PEXOCCTriangleStrip to create a triangle strip primitive output command (PEXOCTriangleStripFP). If the display is a connection to a PEX 5.1 server or the Alternate Protocol Level is 5.1, this function generates a PEXOCTriangleStrip output command instead of a PEXOCTriangleStripFP output command.

The triangle strip is created from the array of vertices. There are two less facets in the strip than the number of vertices. The first triangle in the strip is formed from the first three vertices in the list, the second triangle is formed by the second through the fourth vertices in the list, etc., up to the last triangle, which is formed by the last three vertices in the list. There must be an entry in the facet data array for each facet, if facet data is indicated by the facet attributes.

If you define facet and/or vertex colors, then they are of the type specified by color_type. Otherwise the implementation ignores color_type.

Facet and vertex normals are assumed to be unit length vectors. If you specify a normal that is not unit length, then the result is implementation-dependent.

If you set the PEXGAFloatData bit of the facet attributes and/or vertex attributes, then you must supply extended floating-point data with each facet and/or vertex, respectively. If you set the PEXGAFloatData facet attribute bit, then facet_fp_count indicates the number of floating-point values for each facet. If you set the PEXGAFloatData vertex attribute bit, then surface_vertex_fp_data_count indicates the number of floating-point values for each vertex. If you set only one floating-point data attribute bit, then the implementation ignores the count corresponding to the other floating-point data attribute bit. If neither floating-point data attribute bit is set, then the implementation ignores both facet_fp_data_count and surface_vertex_fp_data_count.

If you indicate that facet data is present with the facet attributes, you must supply facet data for each facet (triangle).

If you set the PEXGAEdges bit of the vertex attributes, then two surface edge flags are specified with each vertex. This edge data is used if the pipeline state's surface edge flag is PEXOn. For the ith vertex, the first edge flag bit of the vertex's edge bitmask indicates whether to draw the edge between the (i-1)th and ith vertex, and the second bit of the edge bitmask indicates whether to draw the edge between the (i-2)th and ith vertex. The edge flags of the first vertex in vertices are ignored; the second edge flag for the second vertex is ignored. If the edges vertex attribute is not set, then all the edges are drawn if the pipeline state's surface edge flag is PEXOn.

If you set the PEXGA2D vertex attribute bit, then the vertex coordinates are of type PEXCoord2D instead of type PEXCoord.

Clipping is similar to Fill Area 3D. See Surfaces - General Attributes.

The basic surface, styled and shaded surface, edge, and data mapping attribute sets are applied to this primitive.

If you specify a triangle strip containing fewer than three vertices, then the string is stored in a structure when included in a PEXStoreElements request but when rendered, the output command has no visual effect. Such a primitive has no visual effect when included in a PEXRenderOutputCommands request.

All other aspects of this primitive are the same as PEXFillArea.

Errors

BadPEXOutputCommand
The output command contains an invalid value.

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXStructure
The specified structure resource identifier is invalid.

See Also

For primitives similar to this one, see:

For PEXlib 5.1 compatibility primitives similar to this one see:

For attributes that affect this primitive, see

For an overview, see Output Command Functions.