NAME
- CELL ARRAY 3 PLUS - create a 3D extended cell array element
SYNOPSIS
C Syntax
-
void
-
pcell_array3_plus ( paral, dim, colr_type, colrs )
-
-
Pparal * paral; cell parallelogram: [0]=P; [1]=Q; [2]=R
Pint_size * dim; dimension of cell: DX and DY
Pint colr_type; colour type
Pcoval * colrs; colour array
SYNOPSIS
FORTRAN Syntax
-
SUBROUTINE pca3p ( COLTYP, CPXA, CPYA, CPZA, DIMX, DIMY, ISC, ISR, DX, DY, COLIA, COLA )
-
-
INTEGER COLTYPE colour type
REAL CPXA(3), CPYA(3), CPZA(3) cell parallelogram (P, Q, R) (MC)
INTEGER DIMX, DIMY dimensions of COLIA containing the cell
array
INTEGER ISC, ISR indices of start column, start row
INTEGER DX, DY number of columns, number of rows
INTEGER COLIA(DIMX, DIMY) colour index array
REAL COLA(3,DIMX* DIMY) direct colour array
Required PHIGS Operating States
- (PHOP, * ,* ,* )
DESCRIPTION
Purpose
- CELL ARRAY 3 PLUS creates a 3D cell array made of cells filled with general colour in each cell. 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).
C Input Parameters
-
-
paral
- A pointer to an array of three Ppoint3 structures giving three corners of the parallelogram that defines the area of the CELL ARRAY 3 PLUS element. Pparal is defined in phigs.h as follows:
- typedef struct {
-
-
Ppoint3 p; /* point p * /
Ppoint3 q; /* point q * /
Ppoint3 r; /* point r * /
- } Pparal;
-
colr_type
- The colour type for specified cell colours.
-
-
0 PINDIRECT Colour Index Specified
1 PMODEL_RGB Red, Green, Blue Colour Model
-
-
2 PMODEL_CIELUV Commission Internationale de l'Eclairage
Colour Model
3 PMODEL_HSV Hue, Saturation, Value Colour Model
4 PMODEL_HLS Hue, Lightness, Saturation Colour Model
C Output Parameters
-
-
dim
- A pointer to a Pdim structure specifying the dimensions of the colour cells array. Pint_size is defined in phigs.h as follows:
- typedef struct {
-
- Pint
- size_x; /* dimension (number of divisions) along X * /
-
- Pint
- size_y; /* dimension (number of divisions) along Y * /
- } Pint_size;
-
-
colrs
- A pointer to an array of Pcoval of dimension defined by dim ,containing the colour values specifying cell colours. Pcoval is defined in phigs.h as follows: typedef union {
-
- Pint
- ind;
- /* index in workstation colour
- bundle table * /
-
- Pcolr_rep
- direct;
- /* direct colour components * /
- } Pcoval;
- Pcolr_rep is defined as:
- typedef union {
-
-
Prgb rgb; /* Red, Green, Blue colour specification * /
Pcieluv cieluv; /* CIE L* U* V*
colour specification * /
Phls hls; /* Hue, Lightness, Saturation colour
specification * /
Phsv hsv; /* Hue, Saturation, Value colour
specification * /
Pdata unsupp; /* Colour in unsupported colour
model * /
- } Pcolr_rep
- Prgb is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat red; /* red, hue, and so on * /
Pfloat green; /* green, saturation, lightness, and so on * /
Pfloat blue; /* blue, value, saturation, and so on * /
- } Prgb;
- Pcieluv is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat cieluv_x; /* x coefficient * /
Pfloat cieluv_y; /* y coefficient * /
-
- Pfloat
- cieluv_y_lum;
- /* y luminance * /
- } Pcieluv;
- Phsv is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat hue; /* hue * /
Pfloat satur; /* saturation * /
Pfloat value; /* value * /
- } Phsv;
- Phls is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat hue; /* hue * /
Pfloat lightness; /* lightness * /
Pfloat satur; /* saturation * /
- } Phls;
- Pdata is defined in phigs.h as follows:
- typedef struct {
-
-
size_t size; /* size of data * /
char * data /* pointer to data * /
- } Pdata;
FORTRAN Input Parameters
-
COLTYPE
- The colour type, one of the following values:
-
-
0 PINDIR Colour Index Specified
1 PRGB Red, Green, and Blue
2 PCIE CIE Colour Model
3 PHSV Hue, Saturation, and Value
4 PHLS Hue, Lightness, and Saturation
-
-
CPXA
- The x coordinates of the three corners of the parallelogram that define the area of the CELL ARRAY 3 element.
-
-
CPYA
- The y coordinates of the three corners of the parallelogram that define the area of the CELL ARRAY 3 element.
-
-
CPZA
- The z coordinates of the three corners of the parallelogram that define the area of the CELL ARRAY 3 element.
-
-
DIMX
- The x dimension, or number of columns, of the entire COLIA array.
-
-
DIMY
- The y dimension, or number of rows, of the entire COLIA array.
-
-
ISC
- The application may specify a portion of the COLIA array by indicating a starting position and number of rows and columns of the subarray. ISC is the x coordinate, or start column, of the subarray. To pass the entire array, this value should be 1.
-
-
ISR
- The y coordinate, or start row, of the subarray. To pass the entire array, this
- value should be 1.
-
-
DX
- The x dimension, or number of columns, of the subarray. To pass the entire array, this value should be the same as that of DIMX.
-
-
DY
- The y dimension, or number of rows, of the subarray. To pass the entire array, this value should be the same as that of DIMY.
-
COLIA(DIMX, DIMY)
- An array of integers containing the colour indices specifying colours for each cell. This array is only used when COLTYP is given as PINDIR, and is ignored otherwise.
-
COLA(3, DIMX* DIMY)
- A two-dimensional array containing the direct colours for each cell. This array is used if COLTYP is PRGB, PCIE, PHSV, PHLS, and is ignored if COLTYP is PINDIR.
- COLA(1,v) = Red, Hue, and so on
- COLA(2,v) = Green, Saturation, Lightness, and so on
- COLA(3,v) = Blue, Saturation, and so on
Execution
- When the structure is traversed, the CELL ARRAY 3 PLUS element draws the transformed boundaries of the cell parallelogram, using the polyline attributes currently in effect. This is the minimal simulation for CELL ARRAY 3 PLUS.
Attributes Applied
- The attributes listed below are used to display the CELL ARRAY 3 PLUS 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.
-
- polyline colour
- polyline colour index ASF
-
- linewidth scale factor
- linewidth scale factor ASF
-
- linetype
- linetype ASF
-
- polyline shading method
- polyline shading method ASF
- polyline index
- depth cue index
- name set
ERRORS
-
- 005
- Ignoring function, function requires state (PHOP, * ,STOP, * )
-
- 117
- Ignoring function, one of the dimensions of the colour index array is less than zero
SEE ALSO
-
CELL ARRAY 3 (3P)
|