PEXCellArray(3) — Subroutines
Name
PEXCellArray - 3D Cell Array Primitive
Synopsis
void PEXCellArray(Display ∗display, XID resource_id, PEXOCRequestType req_type, PEXCoord ∗point1, PEXCoord ∗point2, PEXCoord ∗point3, unsigned int col_count, unsigned int row_count, PEXTableIndex ∗color_indices)
Arguments
displayA pointer to a display structure returned by a successful XOpenDisplay call.
resource_idThe resource identifier of the renderer or structure.
req_typeThe request type for the output command (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).
point1The first cell array definition point.
point2The second cell array definition point.
point3The third cell array definition point.
col_countThe number of cell columns (number of cells in the X direction).
row_countThe number of cell rows (number of cells in the Y direction).
color_indicesAn array of color table index values which specify the color of each cell.
Returns
None
Description
This function creates a 3D cell-array output primitive.
A 3D cell-array primitive is a parallelogram of equally-sized cells, each of which is a parallelogram with a single color. Each cell has a width defined by: diffx = (point1->x - point2->x)
diffy = (point1->y - point2->y)
diffz = (point1->z - point2->z)
width = √(diffx)2 + (diffy)2 + (diffz)2 over col_count
and a height defined by:
diffx = (point1->x - point3->x)
diffy = (point1->y - point3->y)
diffz = (point1->z - point3->z)
height = √(diffx)2 + (diffy)2 + (diffz)2 over col_count
Cell colors are specified in a one-dimensional array where the colors are stored in row-major order. The first color in the array is the color at the cell at the corner of point1, and subsequent colors represent the colors of cells proceeding to point2.
If any color index is not defined, color index one is used. If color index one is not defined, the resulting color is implementation-dependent. The column count and row count can not be zero.
Data Structures
typedef unsigned short PEXTableIndex;
See also the PEXStructuresman page.
Errors
BadPEXOutputCommand
The output command contains an invalid value.
BadPEXRenderer
The specified renderer resource identifier is invalid.
BadPEXStructure
The specified structure resource identifier is invalid.