FILL AREA SET(3P) — Kubota Pacfic Computer Inc. (15 August 1991)
NAME
FILL AREA SET − create a structure element specifying a 2D fill area set primitive
SYNOPSIS
C Syntax
void
pfill_area_set ( point_list_list )
Ppoint_list_list ∗point_list_list; list of point lists
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
The FILL AREA SET function puts a structure element containing the 2D specification of a FILL AREA SET primitive into the currently open structure. The FILL AREA SET primitive is a group of implicitly closed polygonal areas. This allows for specifying areas with holes or disjoint regions. The subroutine parameters specify the number of fill areas to be drawn, the number of points used to define each, and the Modelling coordinates of each point. The z coordinates are assumed to be zeroes. Each set of points defines a separate closed area. All of the areas specified in a single function call are drawn using the current values of the FILL AREA SET attributes listed below.
If the current edit mode is INSERT, the structure element created by the FILL AREA SET subroutine is inserted into the open structure after the element pointed to by the structure’s element pointer. If the edit mode is REPLACE, the new FILL AREA SET element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new FILL AREA SET element.
C Input Parameters
point_list_list
A pointer to a list of Ppoint_list_list structures. Each Ppoint_list_list structure has 2 fields, the num_points_list field, which is the number of 2d point lists, and the point_lists, a pointer to a list of PPoint_list. Each Ppoint_list structure defines a fill area. Ppoint_list_list is defined in phigs.h as follows:
typedef struct {
Pint num_point_lists; /∗ number of point lists ∗/
Ppoint_list ∗point_lists; /∗ list of point lists ∗/
} Ppoint_list_list;
Ppoint_list is defined in phigs.h as follows:
typedef struct {
Pintnum_points;/∗ number of Ppoint structures in the list ∗/
Ppoint∗points;/∗ list of points ∗/
} Ppoint_list;
The num_points component specifies the number of points used to define the fill area. The points component is a pointer to a list, num_points long, of Ppoint structures which contain the Modelling Coordinates of each vertex of the fill area. Ppoint is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;
Execution
When the structure is traversed, the FILL AREA SET element draws the specified number of closed polygonal areas using the given points. Each fill area forms a boundary by connecting the specified points in order. Bounds will implicitly be closed by extending the boundary of the fill area from the last point to the first.
The points are specified in Modelling Coordinates. These may be any coordinate units that are convenient to the application. At traversal, these coordinates are transformed by the current Local and global modelling transformations, the view representation selected by the current view index, and the workstation transformation current on the workstation to which the structure is posted.
All the specified areas are drawn using the current values of the primitive attributes listed below. The edge attributes, EDGE FLAG, EDGETYPE, EDGEWIDTH SCALE FACTOR, and EDGE COLOUR INDEX allow you to control whether, and how, the edges of the areas are displayed independently of the interior representation.
Using Edge Attributes with Interior Style HOLLOW
If edges are not displayed, and the INTERIOR STYLE is HOLLOW, only the boundaries of the fill areas are drawn using the interior colour. If edges are displayed when the INTERIOR STYLE is HOLLOW, the edges will overlay the boundaries using the edge colour. If the EDGETYPE is a broken line, the boundaries will show through the breaks in the edge representation.
Attributes Applied
The attributes listed below are used to display the FILL AREA SET primitive when the structure is traversed. The Aspect Source Flags (ASFs) tell where to access the output display attributes. These attributes can come directly from the traversal state list, or they can be accessed indirectly, using the appropriate index in the traversal state list and the corresponding bundled representation in the PHIGS workstation state list.
interior colourinterior colour index ASF
back interior colourback interior colour ASF
interior styleinterior style ASF
back interior styleback interior style ASF
interior style indexinterior style index ASF
back interior style indexback interior style index ASF
interior shading methodinterior shading method ASF
back interior shading methodback interior shading method ASF
interior reflectance equation interior reflectance equation ASF
back interior reflectance equationback interior reflectance equation ASF
area propertiesarea properties ASF
back area propertiesback area properties ASF
interior index
edge colouredge colour index ASF
edge flagedge flag ASF
edgetypeedgetype ASF
edgewidth scale factoredgewidth scale factor ASF
edge index
face distinguishing mode
face culling mode
depth cue index
light source state
name set
ERRORS
005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)
SEE ALSO
FILL AREA (3P)
FILL AREA SET 3 (3P)
FILL AREA SET 3 WITH DATA (3P+)
September 02, 1992