GPPGD3 (pflags, pdata, saflags, sawidth, sadata, vxflags, vxwidth, vxdata) |
Purpose
Use GPPGD3 to insert a Polygon 3 With Data structure element into the open structure following the element pointer or replace the element pointed at by the element pointer with a Polygon 3 With Data structure element depending on the current edit mode.
When encountered during structure traversal, this element generates a polygon with the specified number of subareas. You may specify optional data to further control the rendering of this primitive. The optional data consists of:
The convexity flag indicates that the application determined the convexity of the polygon primitive. Therefore, the system rendering code does not have to determine the convexity every time the primitive is rendered. To determine the convexity of a set of polygons, the graPHIGS API on the RISC System/6000 contains a sample program under the AIX directory: /usr/lpp/graPHIGS/samples/convexcheck
You can specify a geometric normal of the polygon and/or a normal for each vertex of the polygon. The normals are used in the lighting process to produce more realistic effects.
When rendering this primitive, if the primitive is not to be highlighted, then the graPHIGS API uses the specified vertex color. The colors are used in the lighting process to produce more realistic effects.
When rendering this primitive, if the current edge flag attribute is set to 2=ON , then the graPHIGS API renders as part of the edge, only the parts of the polygon defined by the boundary flags to be part of the edge. If there are no boundary flags specified, then it is treated the same as a polygon (i.e. all boundaries are rendered as edges)
You can specify a transparency coefficient per vertex. The graPHIGS API uses these values when producing transparency effects for the rendered primitive.
You can supply vertex morphing vectors per vertex. The graPHIGS API combines these vectors with the vertices and vertex morphing scale factors (GPVMF) to create new vertex coordinate values for the rendered primitive.
You can specify data mapping data per vertex. The graPHIGS API uses these values to determine the colors of the rendered primitive.
You can specify data morphing vectors per vertex. The graPHIGS API combines these vectors with the data morphing scale factors (GPDMF) and (GPBDMF) and the vertex data mapping values to create new data mapping data values for the rendered primitive.
See The graPHIGS Programming Interface: Understanding Concepts for a more complete explanation of how the graPHIGS API uses the various optional data values.
Note:
This note applies ONLY to applications which will be run on the High Performance 3D Color Graphics Processor (8 or 24 bit). Use of any optional data other than the convexity flag, polygon normal, vertex normals, vertex colors, and boundary flags may cause unpredictable results (including locking the display) on this graphics processor. If only the High Performance 3D Color Graphics Processor is used, you should include only the supported optional data values. If your application must support multiple graphics processors INCLUDING this particular processor, the Inquire Workstation Description (GPQWDT) subroutine must be used to determine the functions that each workstation supports. See also the workstation description in The graPHIGS Programming Interface: Technical Reference for the High Performance 3D Color Graphics Processor.
All points specified must lie in the same plane, the graPHIGS API makes no check to verify this. The system behavior is undefined in this case.
Polygon attributes are applied to this primitive.
GPPGD3 is identified as GDP 1016.
Note:
Not all GDPs are supported on all workstations. Use the Inquire List of Generalized Drawing Primitives (GPQGD) subroutine to determine the GDPs supported by an opened workstation. See also the workstation description in The graPHIGS Programming Interface: Technical Reference
Parameters
Number of contours in the polygon definition. This field is required.
Geometric normal to be used in processing this polygon. This field is optional.
This data indicates that the application determined the convexity of the polygon (0=CONCAVE, 1=CONVEX ) This field is optional.
This number of vertex morphing vectors specified at each vertex. The number of fullwords of vertex morphing vector data added to the other fullwords of vertex data specified per vertex cannot exceed 255 fullwords. This field is optional.
The number of data mapping values specified at each vertex. The number of data mapping values added to the other fullwords of vertex data specified per vertex cannot exceed 255 fullwords. This field is optional.
The number of data morphing vectors specified at each vertex. The number of fullwords of data morphing vector data added to the other fullwords of vertex data specified per vertex cannot exceed 255 fullwords. This field is optional.
Number of vertices in each subarea. If the number is less than three, the result is workstation dependent. This field is required for each subarea.
x, y, and z coordinates of a vertex. This field is required.
The three components of a vector that is to be used as the normal of the polygon at the corresponding vertex. This field is optional.
The three components of a color in the current color model as contained in the graPHIGS API state list. This field is optional.
Specifies whether the corresponding boundary is to be treated as an edge of the polygon (1=NOT_AN_EDGE, 2=IS_AN_EDGE ) These flags allow control over which parts of the polygon's boundary are to be treated as edges. The edge attributes are only applied to boundary segments that have a boundary flag set to the value of 2=IS_AN_EDGE
Each flag specifies whether the boundary from the corresponding vertex to the following vertex is to be drawn. The last entry for each subarea corresponds to the boundary from the last vertex to the first. This field is optional.
The transparency coefficient value used when performing transparency processing. A value of 0.0 is fully opaque; a value of 1.0 is fully transparent. This field is optional.
The vertex morphing vectors dx1 , dy1 , dz1 , dx2 , dy2 , dz2 , ..., dxn , dyn , dzn . The number, n, of vectors in this array is specified in the pdata parameter as the vertex morphing vector count. The array must be the same length for every vertex. This field is optional.
The data mapping data values x1 , x2 , x3 , ..., xn The number, n, of values in this array is specified in the pdata parameter as the data mapping data count. The array must be the same length for every vertex. This field is optional.
The data morphing vectors d11 >, d12 >, d13 >, ..., d1n >, d21 >, d22 >, d23 >, ..., d2n >, ..., dm1 , dm2 , dm3 , ..., dmn The number, n, is specified in the pdata parameter as the data mapping data count, and the number, m is specified in the pdata parameter as the data morphing vector count. The array must be the same length for every vertex. This field is optional.
Error Codes
Related Subroutines
RCP code
201342209 (X'0C003D01')