Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pfad3(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

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

NAME

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

SYNOPSIS

C Syntax

void
pfillarea3data ( fflag, vflag, color_model, fdata, nv, vdata )
Pintfflag;data specified per facet
Pintvflag;data per vertex
Pintcolour_model;colour model
Pfacetdata3∗fdata;per facet data
Pintnv;number of vertices
Pfacetvdataarr3∗vdata; fill area vertex data

FORTRAN Syntax

SUBROUTINE pfad3 ( FFLAG, VFLAG, COLMOD, IFCOLR, FCOLR, FNORM, NV, COORDS,
IVCOLR, VCOLR, VNORM, IMPL )
INTEGERFFLAGdata per facet flag
INTEGERVFLAGdata per vertex flag
INTEGERCOLMODcolour model
INTEGERIFCOLRindirect facet colour
REALFCOLR(3)array of facet colour
REALFNORM(3)array of facet normals
INTEGERNVnumber of vertices
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 3 WITH DATA creates a 3D fill area primitive with colour and shading data. 

The FILL AREA 3 WITH DATA primitive is a closed polygonal area 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 facet data for the fill area. 

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

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

0PVERT_COORDCoordinates Specified
1PVERT_COORD_COLOURVertex Coordinates and Colours Specified
2PVERT_COORD_NORMALVertex Normal and Coordinates Specified
3PVERT_COORD_COLOUR_NORMALVertex Normal Vectors and Colours

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. 

nvThe number of vertices. 

vdataA pointer to a Pfacetvdataarr3 structure that specifies the fill area and optionally associated information. Pfacetvdataarr3 is defined as follows:

typedef union {
Ppoint3∗points;/∗ array of points ∗/
Pptco3∗ptcolrs;/∗ array of points and colors ∗/
Pptnorm3∗ptnorms;/∗ array of points and normals ∗/
Pptconorm3∗ptconorms;/∗ array of points, colors, 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 above.  Pptnorm3 is defined as:

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

Ppoint3 and Pvector3 are defined above.  Pptconorm3 is defined as:

typedef struct {
Ppoint3point;/∗ point coordinates ∗/
Pcovalcolour;/∗ colour ∗/
Pvector3normal;/∗ normal ∗/
/∗ point coordinates with colour and 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 facet information specified for the fill area.  The possible values are:

0PFNONENo Facet Data Specified
1PFCLRFacet Colour Specified
2PFNORMFacet Normal Specified
3PFCLRNFacet Colour and Normal 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 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

NVThe number of points used to define the fill area. 

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 if 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 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  pointer is updated to point to the newly created FILL AREA 3 WITH DATA element. 

When the structure is traversed, FILL AREA 3 WITH DATA draws an implicitly closed polygonal area. This area can be empty, hollow, shaded or filled with a colour, pattern, or hatch.  FILL AREA 3 WITH DATA primitives do not have edges. 

The FILL AREA 3 WITH DATA element can specify the fill area’s facet colour 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.  INTRO PHIGS+(3P+) describes how to use the output display attribute values. 

The application should insure that the fill area points are coplanar.  The display of non-coplanar fill area is device dependent.  FILL AREA 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 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
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 (3P)
INTRO PHIGS+ (3P+)
FILL AREA SET 3 WITH DATA (3P+)
POLYHEDRON 3 WITH DATA (3P+)

Sun Release 4.0  —  Last change: 2 August 1989

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