[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: ISO PHIGS Subroutine Reference

CELL ARRAY 3 (PHOP,*,STOP,*)

Purpose

Use Cell Array 3 to create a three-dimensional cell array primitive, and insert it into the open structure following the element pointer or replace the element pointed at by the element pointer with a Cell Array 3 structure element, depending on the current edit mode.

This structure element defines a two-dimensional array of cells with individual colors. The plane in which the Cell Array 3 primitive lies is defined by three points, P, Q, and R, given in modeling coordinates (MC). A parallelogram is defined by the points P, Q, and R, and (QX+RX-PX, QY+RY-PY, QZ+RZ-PZ). This parallelogram is conceptually divided into a grid of DX by DY cells, where DX and DY are the dimensions of the color index array. The color of each cell is specified by the index of the corresponding element of the color index array. The color indexes are mapped from the two-dimensional cell array on a row-wise basis starting at corner P and proceeding to corner Q and so on. If an index is not present in the color table on a workstation, then the graPHIGS API uses an index value of 1 on that workstation.

When the graPHIGS API encounters an element of this type, it does a minimal simulation by drawing the transformed boundaries of the cell parallelogram using polyline color, a line width value of 1, and a line type of SOLID.

Language Bindings

C

pcell_array3 (paral, colr_array)

Input Parameters

const Pparal *paral
Cell parallelogram in MC.

const Ppat_rep *colr_array
Color array.

FORTRAN

PCA3 (cpxa, cpya, cpza, dimx, dimy, isc, isr, dx, dy, colia)

Input Parameters

real cpxa(3)
x coordinates of the points P, Q, and R in MC.

real cpya(3)
y coordinates of the points P, Q, and R, in MC.

real cpza(3)
z coordinates of the points P, Q, and R in MC.

integer dimx
xdimension of COLIA which contains the cell array.

integer dimy
ydimension of COLIA which contains the cell array.

integer isc
Index of the start column of the cell array within COLIA.

integer isr
Index of the start row of the cell array within COLIA.

integer dx
Number of cell array columns.

integer dy
Number of cell array rows.

integer colia(dimx,dimy)
Color index array containing the cell array.

Errors

5
Function Requires State (PHOP,*,STOP,*)
117
One Dimension Of Color Index Array < Zero
113
Color Index Value < ZERO

Related Subroutines

  • Set Polyline Color Index


  • [ Previous | Next | Contents | Glossary | Home | Search ]