PEXFillAreaWithData - 3D Fill Area Primitive With Additional Data (5.0)


Note: This function has been superseded by the PEXOCCFillArea function, but is maintained here for backwards compatibility with PEXlib 5.1

Synopsis

 
     void PEXFillAreaWithData(
          Display *display,
          XID resource_id,
          PEXOCRequestType req_type,
          int shape_hint,
          int ignore_edges,
          unsigned int facet_attributes,
          unsigned int vertex_attributes,
          int color_type,
          PEXFacetData *facet_data,
          unsigned int count,
          PEXArrayOfVertex vertices
     )

Arguments

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

resource_id
The resource identifier of the renderer or structure.

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

shape_hint
The shape of the fill area (PEXShapeComplex, PEXShapeNonConvex, PEXShapeConvex or PEXShapeUnknown).

ignore_edges
A flag that determines if surface edges are rendered (True or False).

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

vertex_attributes
A mask indicating the vertex attributes provided (PEXGANone, PEXGAColor or PEXGANormal).

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

facet_data
A pointer to facet data.

count
The number of vertices.

vertices
An array of vertices defining the fill area.

Returns

None.

Description

Invoke PEXFillAreaWithData to create a fill area output primitive.

This primitive is similar to the PEXFillArea primitive, except that you can specify additional information for the fill area and for each vertex. Color values passed must be of the specified color type.

Specify facet_attributes to indicate the content of the facet data. This data may be a color, a normal, or a color followed by a normal. Use the constants PEXGANone, PEXGAColor and PEXGANormal to construct a mask indicating the data provided. If specified, the facet color takes precedence over the surface color. If specified, the facet normal is used to determine whether the fill area is back-facing.

Specify vertex_attributes to indicate the content of each fill area vertex. In addition to the coordinate (x,y,z), your application may specify a color, a normal, or a color followed by a normal for each vertex. Use the constants PEXGANone, PEXGAColor and PEXGANormal to construct a mask indicating the data provided. If specified, vertex colors override facet color or the current surface color. If specified, vertex normals are taken to be normals at the vertices of the fill area.

The reflection model and the surface interpolation affect how the implementation uses additional data in rendering the surface.

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

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 an overview, see Output Command Functions.