Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pfillareaset3data(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

FILL AREA SET 3 WITH DATA(3P+)  —  MISC. REFERENCE MANUAL PAGES

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
pfillareaset3data ( fflag, eflag, vflag, colour_model, fdata, nfa, edata,  vdata )
Pintfflag;data per facet flag
Pinteflag;edge visability status
Pintvflag;data per facet flag
Pintcolour_model;colour model
Pfacetdata3∗fdata;facet data
Pintnfa;number of fill areas in the set
Pedgedatalst∗edata;edge data
Pfacetvdatalst3∗vdata; vertex data

FORTRAN Syntax

SUBROUTINE pfasd3 ( FFLAG, EFLAG, VFLAG, COLMOD, IFCOLR, FCOLR, FNORM, NFA,
     FARR, NV, EDARR, COORDS, IVCOLR, VCOLR, VNORM, IMPL )
INTEGERFFLAGdata per facet flag
INTEGEREFLAGdata per edge flag
INTEGERVFLAGdata per vertex flag
INTEGERCOLMODcolour model
INTEGERIFCOLRindirect facet colour
REALFCOLR(3)array of facet colour
REALFNORM(3)array of facet normals
INTEGERNFAnumber of fill areas
INTEGERFARR(NFA)array of fill area end indicies
INTEGERNVnumber of vertices
INTEGEREDARR(NV)array of edge data (PON/POFF)
REALCOORDS(3,NV)array of vertex coordinates
INTEGERIVCOLR(NV)array of indirect vertex colours
REALVCOLR(3,NV)array of vertex colours
REALVNORM(3,NV)array of vertex normals
REALIMPL(∗)implementation defined vertex data

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. 

This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard. 

C Input Parameters

All of the following data types are predefined in phigs.h. 

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 model specifies the colour type for specified facet and/or vertex colours.

0PINDIRECTColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation

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

typedef union {
Pcovalcolour;/∗ colour ∗/
Pvector3normal;/∗ normal∗/
Pconorm3conorm;/∗ colour and normal ∗/
} Pfacetdata3;

Pcoval is defined as:

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

Pcobundl is defined as:

typedef struct {
Pfloatx;/∗ red, hue, etc ∗/
Pfloaty;/∗ green, saturation, lightness, etc ∗/
Pfloatz;/∗ blue, value, saturation, etc ∗/
} Pcobundl;

Pvector3 is defined as:

typedef struct {
Pfloatx;/∗ x magnitude ∗/
Pfloaty;/∗ y magnitude ∗/
Pfloatz;/∗ z magnitude ∗/
} Pvector3;

Pconorm3 is defined as:

typedef struct {
Pcovalcolour;/∗ colour ∗/
Pvector3normal;/∗ normal ∗/
} Pconorm3;

Pvector3 and Pcoval are defined above. 

nfaThe number of fill areas in the set. 

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

typedef struct {
Pintnumber;/∗ number of edges ∗/
Pedgedataarredgedata;/∗ edge data ∗/
} Pedgedatalst;

Pedgedataarr is defined as: typedef union { Pedgef∗edges;/∗ array of edge flags ∗/

/∗ implementation dependent data ∗/ } Pedgedataarr;

Pedgef is defined as:

typedef enum {
PEDGE_OFF,
PEDGE_ON
} Pedgef;

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

typedef struct {
Pintnumber;/∗ number of vertices ∗/
Pfacetvdataarr3vertexdata;/∗ facet vertex data ∗/
} Pfacetvdatalst3;

Pfacetvdataarr3 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 ∗/
} Pfacetvdataarr3;

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 ∗/
Pcovalcolour;/∗ colour ∗/
} Pptco3;

Ppoint3 is defined above.  Pcoval is defined as:

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

Pcobundl is defined as:

typedef struct {
Pfloatx;/∗ red, hue, etc ∗/
Pfloaty;/∗ green, saturation, lightness, etc ∗/
Pfloatz;/∗ blue, value, saturation, etc ∗/
} Pcobundl;

Pptnorm3 is defined as:

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

Ppoint3 is defined above.  Pvector3 is defined as:

typedef struct {
Pfloatx;/∗ x magnitude ∗/
Pfloaty;/∗ y magnitude ∗/
Pfloatz;/∗ z magnitude ∗/
} Pvector3;

Pptconorm3 is defined as:

typedef struct {
Ppoint3point;/∗ point coordinates ∗/
Pcovalcolour;/∗ colour ∗/
Pvector3normal;/∗ normal ∗/
} Pptconorm3;

Ppoint3, Pcoval, and Pvector3 are defined above. 

FORTRAN Input Parameters

All of the following data types are predefined in phigs77.h. 

FFLAG
The data per facet flag indicates the information specified for the whole fill area set.  The possible values are:

0PFNONENo Facet Data Specified
1PFCLRFacet Colour Specified
2PFNORMFacet Normal Specified
3PFCLRNFacet Colour and Normal Specified

EFLAG
The data per edge flag indicates the information specified for each edge.  The possible values are:

0PEDNONo Edge Data Specified
1PEDVISEdge Visibility Flags Specified

VFLAG
The data per vertex flag indicates the information specified with each vertex of the primitive.  The possible values are:

0PVCOORCoordinates Only
1PVCLRCoordinates and Colours
2PVNORMCoordinates and Normals
3PVCLRNCoordinates, Colours, and Normals

COLMOD
The colour model.  If the data per facet flag (FFLAG) indicates that a facet colour is specified, or if the data per vertex flag (VFLAG) indicates that a vertex colours are specified, then COLMOD is set to one of the following:

0PINDIRColour Index Specified
1PRGBRed, Green, and Blue
2PCIECIE Colour Model
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation

IFCOLR
An integer value which is an index into the workstation colour table for determining the colour of the facet. This value is unused if FFLAG is set to either PFNONE or PFNORM or if COLMOD is greater than zero. 

FCOLR(3)
An array of reals containing the colours for the facet. This array is unused if FFLAG is set to either PFNONE or PFNORM or COLMOD is equal to zero. 

FCOLR(1) = Red, Hue, etc.
FCOLR(2) = Green, Saturation, Lightness, etc.
FCOLR(3) = Blue, Value, Saturation, etc.

FNORM(3)
An array of reals containing the normals for the facet. This array is unused if FFLAG is set to either PFNONE or PFCLR. 

FNORM(1) = x Magnitude
FNORM(2) = y Magnitude
FNORM(3) = z Magnitude

NFAThe number of fill areas in the fill area set. 

FARR(NFA)
An array of integers containing the end indices the COORDS array for each polygon in the fill area set. 

NVThe number of points used to define the fill area set. 

EDARR(NV)
An array of integers containing edge visiblility data. The possible values for each element of the array are:

0POFF
1PON

COORDS(3,NV)
An array of reals containing the x, y and z coordinates of the fill area set. 

COORDS(1,v) = x Coordinate
COORDS(2,v) = y Coordinate
COORDS(3,v) = z Coordinate

IVCOLR(NV)
An array of integers containing an index into the workstation colour table for each vertex. This array is unused if VFLAG is set to either PVCOOR or PVNORM or if COLMOD is greater than zero. 

VCOLR(3,NV)
An array of reals containing the colours for each vertex. This array is unused if VFLAG is set to either PVCOOR or PVNORM or COLMOD is equal to zero. 

VCOLR(1,v) = Red, Hue, etc.
VCOLR(2,v) = Green, Saturation, Lightness, etc.
VCOLR(3,v) = Blue, Value, Saturation, etc.

VNORM(3,NV)
An array of reals containing the normals for each vertex. This array is unused if VFLAG is set to either PVCOOR or PVCLR. 

VNORM(1,v) = x Magnitude
VNORM(2,v) = y Magnitude
VNORM(3,v) = z Magnitude

IMPL(∗)
This implementation defined data type is not currently used.

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.  SunPHIGS Extensions 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. See INTRO PHIGS+(3P+) for a complete description of these values. 

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 are ignored 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 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,∗)

900Storage overflow has occurred in PHIGS

2004FORTRAN-specific Binding Error - Ignoring function, input parameter size out of range

SEE ALSO

FILL AREA 3 WITH DATA (3P+)
INTRO PHIGS+ (3P+)
POLYHEDRON 3 WITH DATA (3P+)
FILL AREA SET 3 (3P)

Sun Release 4.0  —  Last change: 2 August 1989

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