Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

FILL AREA SET 3 WITH DATA(3P+)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

FILL AREA SET 3 WITH DATA −  creates a 3D fill area set structure element that includes colour and shading data

SYNOPSIS

C Syntax

void
pfill_area_set3_data ( fflag, eflag, vflag, colour_model, fdata, nfa, edata,  vdata )
Pintfflag;what data is specified per facet
Pinteflag;what data is specified per edge
Pintvflag;what data is specified per vertex
Pintcolour_model;colour model
Pfacet_data3∗fdata;facet data
Pintnfa;number of fill areas in the set
Pedge_data_list∗edata; edge data list
Pfacet_vdata_list3∗vdata; facet vertex data list

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

FILL AREA SET 3 WITH DATA creates a 3D fill area set primitive with colour and shading data. 

The FILL AREA SET 3 WITH DATA is a set of closed polygonal areas defined by a series of three dimensional Modeling Coordinate points. You can specify a geometric normal for the entire fill area, and specify colour/normal information for each vertex in addition to point coordinates. The added data is used when applying lighting, shading, face distinguishing, and face culling. 

C Input Parameters

fflagThe data per facet flag specifies the available data for the entire fill area set. 

0PFACET_NONENo Facet Data Specified
1PFACET_COLOURFacet Colours Specified
2PFACET_NORMALFacet Normal Specified
3PFACET_COLOUR_NORMALFacet Normal and Colours Specified

eflagThe data per edge flag specifies the available information for each edge. 

0PEDGE_NONENo Edge Data Specified
1PEDGE_VISIBILITYEdge Visibility Flags Specified

vflagThe data per vertex flag specifies the available data for each vertex of the primitive. 

0PVERT_COORDCoordinates Specified
1PVERT_COORD_COLOURCoordinates and Vertex Colour Specified
2PVERT_COORD_NORMALCoordinates and Vertex Normal Specified
3PVERT_COORD_COLOUR_NORMALCoordinates, Vertex Colour, and
Vertex Normal Specified

colour_model
The colour type for specified facet and/or vertex colours.

0PINDIRECTColour Index Specified
1PMODEL_RGBRed, Green, and Blue
2PMODEL_CIELUVCIE Colour Model
3PMODEL_HSVHue, Saturation, and Value
4PMODEL_HLSHue, Lightness, and Saturation

fdataA pointer to a Pfacet_data3 structure that specifies the fill area and optionally associated colour information. Pfacet_data3 is defined as follows:

typedef union {
Pcovalcolr;/∗ colour ∗/
Pvec3normal;/∗ unit normal∗/
Pconorm3conorm;/∗ colour and normal ∗/
} Pfacet_data3;

Pcoval is defined as:

typedef union {
Pintind;/∗ index in workstation colour bundle table ∗/
Pcolr_repdirect;/∗ direct colour components ∗/
} Pcoval;

Pcolr_rep is defined as:

typedef union {
Prgbrgb;/∗ Red Green Blue colour specification ∗/
Pcieluvcieluv;/∗ CIE L∗U∗V∗ colour specification ∗/
Phlshls;/∗ Hue Lightness Saturation colour specification ∗/
Phsvhsv;/∗ Hue Saturation Value colour specification ∗/
Pdataunsupp;/∗ Colour in unsupported colour model ∗/
} Pcolr_rep;

Prgb is defined in phigs.h as follows:

typedef struct {
Pfloatred;/∗ red, hue, etc ∗/
Pfloatgreen;/∗ green, saturation, lightness, etc ∗/
Pfloatblue;/∗ blue, value, saturation, etc ∗/
} Prgb;

Pcieluv is defined in phigs.h as follows:

typedef struct {
Pfloatcieluv_x;/∗ x coefficient ∗/
Pfloatcieluv_y;/∗ y coefficient ∗/
Pfloatcieluv_y_lum; /∗ y luminance ∗/
} Pcieluv;

Phsv is defined in phigs.h as follows:

typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatsatur;/∗ saturation ∗/
Pfloatvalue;/∗ value ∗/
} Phsv;

Phls is defined in phigs.h as follows:

typedef struct {
Pfloathue;/∗ hue ∗/
Pfloatlightness;/∗ lightness ∗/
Pfloatsatur;/∗ saturation ∗/
} Phls;

Pdata is defined in phigs.h as follows:

typedef struct {
size_tsize;/∗ size of data ∗/
char∗data/∗ pointer to data ∗/
} Pdata;

Pvec3 is defined in phigs.h as follows:

typedef struct  {
Pfloatdelta_x;/∗ x magnitude ∗/
Pfloatdelta_y;/∗ y magnitude ∗/
Pfloatdelta_z;/∗ z magnitude ∗/
} Pvec3;

Pconorm3 is defined in phigs.h as follows:

typedef struct  {
Pcovalcolr;/∗ colour ∗/
Pvec3norm;/∗ normal ∗/
} Pconorm3;

Pcoval and Pvec3 are defined above. 

nfaThe number of fill areas in the set. 

edataA pointer to an array (nfa) of Pedge_data_list structures that specifies the edge data.  Pedge_data_list is defined as:

typedef struct {
Pintnum_edges;/∗ number of edges ∗/
Pedge_data_arredgedata; /∗ edge data ∗/
} Pedge_data_list;

Pedge_data_arr is defined as: typedef union { Pedge_flag∗edges;/∗ array of edge flags ∗/

/∗ implementation dependent data ∗/ } Pedge_data_arr;

Pedge_flag is defined as:

typedef enum {
PEDGE_OFF,
PEDGE_ON
} Pedge_flag;

vdataA pointer to an array (nfa) of Pfacet_vdata_list3 structures that specifies each fill area in the set and optionally associated colour information.  Pfacet_vdata_list3 is defined as:

typedef struct {
Pintnum_vertices; /∗ number of vertices ∗/
Pfacet_vdata_arr3vertex_data; /∗ facet vertex data ∗/
} Pfacet_vdata_list3;

Pfacet_vdata_arr3 is defined as:

typedef union {
Ppoint3∗points;/∗ array of points ∗/
Pptco3∗ptcolrs;/∗ array of points and colours ∗/
Pptnorm3∗ptnorms;/∗ array of points and normals ∗/
Pptconorm3∗ptconorms;/∗ array of points, colours, and normals ∗/
/∗ implementation dependent types can go here ∗/
} Pfacet_vdata_arr3;

Ppoint3 is defined as:

typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;

Pptco3 is defined as:

typedef struct {
Ppoint3point;/∗ point coordinates ∗/
Pcovalcolr;/∗ colour ∗/
} Pptco3;

Ppoint3 anc Pcoval are defined above.  Pptnorm3 is defined in phigs.h as follows:

typedef struct {
Ppoint3point;/∗ point coordinates ∗/
Pvec3norm;/∗ normal ∗/
} Pptnorm3;

Ppoint3 and Pvec3 are defined above.  Pptconorm3 is defined in phigs.h as follows:

typedef struct {
Ppoint3point;/∗ point coordinates ∗/
Pcovalcolr;/∗ colour ∗/
Pvec3norm;/∗ normal ∗/
} Pptconorm3;/∗ point with colour and normal ∗/

Ppoint3, Pcoval, and Pvec3 are defined above. 

Execution

Depending on the edit mode, a FILL AREA SET 3 WITH DATA element is inserted into the open structure after the element pointer, or replaces the element pointed to by the element pointer.  In either case, the element pointer is updated to point to the newly created FILL AREA SET 3 WITH DATA element. 

When the structure is traversed, FILL AREA SET 3 WITH DATA draws an implicitly closed polygonal area with multiple boundaries.  PHIGS implicitly closes the area by extending each fill area boundary from the last point to the first point. Fill areas can be empty, hollow, shaded, or filled with a color, pattern, or hatch.  The interior of the primitive is defined by the odd winding rule.  The FILL AREA SET 3 WITH DATA element can specify the facet color and normal vector as well as colours and normal vectors for each vertex. These colours and normal vectors are used in conjunction with the current lighting and depth cueing attributes to colour and shade the primitive. Note that unexpected lighting effects will result if the supplied normals are not of unit length. 

The application should insure that the fill area set points are coplanar. Display of non-coplanar fill area set is device dependent.  FILL AREA SET 3 WITH DATA elements containing fewer than three vertices can be created, but they are treated in a device dependent manner during structure traversal. 

Attributes Applied

The attributes listed below are used to display the FILL AREA SET 3 WITH DATA 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 SET 3 (3P)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026