PEXOCCFillAreaSet - Fill Area Set Primitive (5.0)


Synopsis

 
     void PEXOCCFillAreaSet(
          PEXOCC context,
          unsigned int count,
          PEXPointer facet_data,
          PEXListOfVertexData *vertex_lists
      )
 

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).

shape_hint (OCC)
The shape which describes all of the contours (PEXShapeComplex, PEXShapeNonConvex, PEXShapeConvex or PEXShapeUnknown).

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

contour_hint (OCC)
A flag that indicates whether contours are disjoint or overlapping (PEXContourDisjoint, PEXContourNested, PEXContourIntersecting or PEXContourUnknown).

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.0), 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)
The number of optional floating-point numbers for each facet.

surface_vertex_fp_data_count (OCC)
The number of optional floating-point numbers for each vertex.

count
The number of fill areas in the set.

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

vertex_lists
A pointer to the list of vertex arrays defining each contour of the fill area set. See Facet / Vertex Data Formats.

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 PEXOCCFillAreaSet to create a fill area set primitive output command. This function encompasses all the functionality contained in the PEXFillAreaSet, PEXFillAreaSet2D, and PEXFillAreaSetWithData functions. Depending on the attributes you supply, this function generates a PEXOCFillAreaSet, PEXOCFillAreaSet2D, or PEXOCFillAreaSetWithDataFP output command. If a PEXOCFillAreaSetWithDataFP OC is needed and the display is a connection to a PEX 5.1 server, or the Alternate Protocol Level is 5.1, this function generates a PEXOCFillAreaSetWithData output command instead of a PEXOCFillAreaSetWithDataFP output command.

This primitive is similar to PEXOCCFillArea but enables you to create areas with "islands" or "holes".

Defining any fill area in the set with fewer than three vertices or without any contours, creates a degenerate area. The implementation stores the primitive in a structure, but when the area is rendered, there is no visual effect. The implementation ignores the primitive.

A fill area set consists of an array of fill areas that define "contours" (disjoint pieces or holes) making up the primitive. Each fill area, or contour, is defined by a list of vertices joined together to form a planar surface.

Specify the contour_hint argument to provide information about the relationships between contours in the fill area set:

PEXContourDisjoint -
indicates that all contours are spatially disjoint. There is no overlapping or intersection between any contours in the fill area set.

PEXContourNested -
indicates that contours are either disjoint or wholly contained within another contour. No contour has edges that intersect or are coincident with edges of any other contour.

PEXContourIntersecting -
indicates that separated contours may have edges that are coincident or overlap.

PEXContourUnknown -
indicates that nothing is known about the interrelationships between contours.

The implementation renders fill area sets, with contours that have higher complexity inter-relationships than that indicated by the contour hint, in an implementation-dependent way.

Specify the ignore_edges argument as a boolean value indicating whether surface edges are rendered. This argument value applies to each of the fill areas in the set. If True, the implementation draws no edges for the fill area set, even if edge data is supplied and/or the pipeline state's surface edge flag is on. If False, the implementation draws edges only if the pipeline state's surface edge flag is on. If you set PEXGAEdges in the vertex attributes, you supply a surface edge flag for each vertex by setting the edge field of the vertex data to either PEXOn or PEXOff. For the ith vertex, the edge flag indicates whether to draw the edge between the ith and i+1th vertex. If you do not supply edge data by not setting the PEXGAEdges vertex attribute, then the implementation draws all edges of the fill area sets.

The facet attributes indicate the content of the facet data. Use the constants PEXGANone, PEXGAColor, PEXGANormal and PEXGAFloatData to construct a mask indicating the data provided. Use the PEXlib-supplied packed format data structures to map the facet data if using the packed data interface to maintain the order of color, normal, float_data.

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.

The surface vertex attributes indicate the content of each fill area vertex. Use the constants PEXGANone, PEXGAColor, PEXGANormal, PEXGAEdges, PEXGAFloatData and PEXGA2D to construct a mask indicating the data provided. Use the PEXlib-supplied packed format data structures to map the vertex data if using the packed data interface to maintain the order of color, normal, edges, float_data.

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 PEXOCCFillArea.

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.