PEXOCCIndexedFillAreaSets - Indexed Fill Area Sets (SOFAS) Primitive (5.0)


Synopsis

 
     void PEXOCCIndexedFillAreaSets(
          PEXOCC context,
          unsigned int set_count,
          PEXPointer occ_facet_data,
          unsigned int vertex_count,
          PEXPointer occ_vertices,
          unsigned int index_count,
          PEXSwitch *edge_flags,
          PEXConnectivityData *connectivity
     )
 

 
     void PEXSetOfFillAreaSets(
          Display *display,
          XID resource_id,
          PEXOCRequestType req_type,
          int shape_hint,
          unsigned int facet_attributes,
          unsigned int vertex_attributes,
          unsigned int edge_attributes,
          int contour_hint,
          int contours_all_one,
          int color_type,
          unsigned int set_count,
          PEXArrayOfFacetData facet_data,
          unsigned int vertex_count,
          PEXArrayOfVertex vertices,
          unsigned int index_count,
          PEXSwitch *edge_flags,
          PEXConnectivityData *connectivity
     )
 

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

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), PEXGAFloatData(5.2), or PEXGA2D(5.2)).

edge_attributes (OCC)
A mask indicating the edge attributes provided (PEXGANone or PEXGAEdges).

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

contours_all_one (OCC)
True if each fill area set contains only one contour; False otherwise.

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.

set_count
The number of fill area sets.

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

facet_data
An array of facet data.

vertex_count
The number of vertices.

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

vertices
An array of vertices.

index_count
The number of vertex connectivity indices (also number of edge flags, if edges are specified).

edge_flags
An array of edge flags.

connectivity
A pointer to the list of contour connectivity data.

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 PEXOCCIndexedFillAreaSets to create a set of fill area sets primitive output command (PEXOCSetOfFillAreaSetsFP). If the display is a connection to a PEX 5.1 server or the Alternate Protocol Level is 5.1, this function generates a PEXOCSetOfFillAreaSets output command instead of a PEXOCSetOfFillAreaSetsFP output command.

A fill area may cross over itself to create a complex shape. PEXlib uses the even-odd rule to determine the area that lies in the interior of the fill area. Specifying the shape_hint argument improves performance for certain shapes. The implementation renders fill areas that are of higher complexity than indicated by shape_hint in an implementation-dependent way. Consequently, applications should pass PEXShapeUnknown as the shape unless you are certain the fill area's shape is one of the other three.

A fill area set with more than one contour is always allowed to have contours that intersect. Rendering optimization could occur only when the number of contours in a fill area set is equal to one or if the "contours all one" flag is True, and the shape hint is PEXShapeConvex.

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.

The facet attributes indicate the content of facet_data. Use the constants PEXGANone, PEXGAColor, PEXGANormal and PEXGAFloatData 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. You must provide data in the facet_data argument for each facet (fill area set) of the set of fill area sets, if you've indicated facet data with the facet attributes. Be aware that even if you define a fill area set with zero contours defined, you still need to provide a facet data entry that corresponds to that fill area set.

The vertex attributes indicate the content of each fill area vertex. Use the constants PEXGANone, PEXGAColor, PEXGANormal, PEXGAFloatData and PEXGA2D 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 the additional data when rendering the surface.

Color values passed must be of the specified color type. Normals are assumed to be unit length vectors. If you specify a normal that is not unit length, then the result is implementation-dependent.

The edge attributes indicate the content of edge_flags. Use PEXGAEdges to indicate that the application provides edge flags or use PEXGANone if the application does not provide edge flags. The implementation uses these edge flags to draw edges if the pipeline state's surface edge flag is on. The edge flags, if present, are set to PEXOn or PEXOff and indicate which edges should be rendered. The edge flag list corresponds to the order in which vertices are specified in connectivity, even if the vertices form form a degenerate contour which is not drawn. The first edge flag in edge_flags corresponds to the edge between the first and second vertices of the first contour of the first fill area set, and so on. The edge flag corresponding with the last vertex of each contour indicates whether a vertex is drawn from the last vertex to the first vertex of the contour. If you do not provide edge data and the pipeline state's surface edge flag is on, then the implementation draws all the edges. The implementation always renders surface edges with the surface edge color. Facet or vertex colors do not affect surface edges.

The connectivity of the primitive is defined by connectivity. The connectivity list is a pointer to an array of PEXConnectivityData structures. Each entry in the array gives the contours for one fill area set in the set of fill area sets, and, in turn, contains a pointer to an array of PEXListOfUShort structures. Each of these latter structures gives the index of the vertices of one contour in that fill area set. The indices select a vertex in the array of vertices. Vertices are numbered with indices starting from zero (i.e., the first vertex is referenced as vertex 0). As a special case, if the "contours all one" flag is True then the contour count field in each fill area set is guaranteed to be one. It is implementation dependent whether a true value of this flag allows some of the contour counts to be zero.

All attributes affecting the representation of fill area sets also affect the representation of this primitive.

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.