CELL ARRAY 3(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
CELL ARRAY 3 − create structure element specifying 3D cell array
SYNOPSIS
C Syntax
void
pcell_array3 ( parallelogram, colr_array )
Pparalparallelogram;cell parallelogram: [0]=P; [1]=Q; [2]=R
Ppat_repcolr_array;colour 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.
C Input Parameters
parallelogram
A pointer to a Pparal structure giving the three corners of the parallelogram that defines the area of the CELL ARRAY 3 element. The Pparal structure is defined in phigs.h as follows:
typedef struct {
Ppoint3p;/∗ point p ∗/
Ppoint3q;/∗ point q ∗/
Ppoint3r;/∗ point r ∗/
} Pparal;
Ppoint3 is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;
colr_array
The colour array. The Ppat_rep structure is defined in phigs.h as follows:
typedef struct {
Pint_sizedims;/∗ pattern’s dimensions ∗/
Pint∗colr_array;/∗ colour index array ∗/
} Ppat_rep;
Pint_size is defined in phigs.h as follows:
typedef struct {
Pintsize_x;/∗ x size ∗/
Pintsize_y;/∗ x size ∗/
} Pint_size;
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 minimal simulation for cell arrays. Applications should not depend on this behavior to remain the same in future releases.
The coordinates used to specify the position of the CELL ARRAY 3 primitive are Modelling Coordinates. These can 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 Tranformations, 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 3 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)
September 02, 1992