Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cell_array_3(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CELL ARRAY 3(3P)  —  SUNPHIGS LIBRARY

NAME

CELL ARRAY 3 − create structure element specifying 3D cell array

SYNOPSIS

C Syntax

void
pcellarray3 ( parallelogram, dim, colour_index )
Ppoint3parallelogram[3];cell parallelogram: [0]=P; [1]=Q; [2]=R
Pdim∗dim;dimension of cell: DX and DY
Pint∗colour_index;colour index array

FORTRAN Syntax

SUBROUTINE pca3 ( CPXA, CPYA, CPZA, DIMX, DIMY, ISC, ISR, DX, DY, COLIA )
REALCPXA(3), CPYA(3), CPZA(3) cell parallelogram (P, Q, R) (MC)
INTEGERDIMX, DIMYthe dimensions of COLIA which contains
the cell array
INTEGERISC, ISRindices of start column, start row
INTEGERDX, DYnumber of columns, number of rows
INTEGERCOLIA(DIMX, DIMY)colour index array

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

The CELL ARRAY 3 function places a structure element containing the full specification of a 3D cell array into the currently open structure, according to the current edit mode.  A 3D cell array primitive is an array of cells with individual colours.  Its area is defined by three points P, Q, and R in Modelling Coordinates giving the corners of a parallelogram as P, Q, R, and (Q + R − P). 

If the current edit mode is INSERT, the CELL ARRAY 3 element is inserted into the open structure after the element pointed to by the element pointer. If the edit mode is REPLACE, the CELL ARRAY 3 element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new CELL ARRAY 3 element. 

Note: SunPHIGS supports the minimal allowed simulation for the CELL ARRAY 3 primitive by drawing the transformed boundaries of the cell parallelogram. 

C Input Parameters

parallelogram
An array of three Ppoint3 structures giving three corners of the parallelogram that defines the area of the CELL ARRAY 3 element.  The Ppoint3 structure is defined in phigs.h as follows:

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

dimA pointer to a Pdim structure specifying the dimensions of the colour index array.  The Pdim structure is defined in phigs.h as follows:

typedef struct  {
Pintx_dim;/∗ dimension (number of divisions) along x ∗/
Pinty_dim;/∗ dimension (number of divisions) along y ∗/
} Pdim;

colour_index
An integer pointer to an array of the dimensions defined by dim, containing the colour indices specifying cell colours.

FORTRAN Input Parameters

CPXAThe x coordinates of the three corners of the parallelogram that define the area of the CELL ARRAY 3 element. 

CPYAThe y coordinates of the three corners of the parallelogram that define the area of the CELL ARRAY 3 element. 

CPZAThe z coordinates of the three corners of the parallelogram that define the area of the CELL ARRAY 3 element. 

DIMXThe x dimension, or number of columns, of the entire COLIA array. 

DIMYThe y dimension, or number of rows, of the entire COLIA array. 

ISCThe application may specify a portion of the COLIA array by indicating a starting position and number of rows and columms of the sub-array.  ISC is the x coordinate, or start column, of the sub-array.  To pass the entire array, this value should be 1. 

ISRThe y coordinate, or start row, of the sub-array.  To pass the entire array, this value should be 1. 

DXThe x dimension, or number of columns, of the sub-array.  To pass the entire array, this value should be the same as that of DIMX . 

DYThe y dimension, or number of rows, of the sub-array.  To pass the entire array, this value should be the same as that of DIMY . 

COLIA
An array of integers containing the colour indices specifying cell colours.

Execution

When the structure is traversed, the cell array 3 element draws the transformed boundaries of the cell parallelogram, using the polyline attributes currently in effect.  The aspect source flags (ASFs) for line type, line width scale factor, and polyline colour index control whether the values used for these attributes are taken from the polyline representation specified by POLYLINE INDEX (ASF = BUNDLED), or from the individual specifications set for these attributes (ASF = INDIVIDUAL).  This is the mimimal simulation for cell arrays. Applications should not depend on this behaviour to remain the same in future releases. 

The coordinates used to specify the position of the cell array 3 primitive are Modelling Coordinates.  These may be any coordinate units that are convenient to the application.  At traversal, these coordinate values will be 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. 

Attributes Applied

The current values of the following attributes will be used to display the CELL ARRAY primitive when the structure is traversed.  The value of an attribute is modified with the appropriate SET routine.  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. 

polyline colourpolyline colour index ASF
linewidth scale factorlinewidth scale factor ASF
linetypelinetype ASF
polyline shading methodpolyline shading method ASF
polyline index
depth cue index
name set

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

113Ignoring function, the colour index value is less than zero

117Ignoring function, one of the dimensions of the colour index array is less than zero

SEE ALSO

CELL ARRAY (3P)

Sun Release 4.0  —  Last change: 31 July 1989

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