polymarker(3G)
NAME
polymarker2d, polymarker3d, polymarker_with_data3d, dcpolymarker − draw current marker symbol centered at each endpoint specified in clist array
SYNOPSIS
C Syntax:
void polymarker2d(fildes,clist,numpts,flags);
int fildes,flags,numpts;
float clist[];
void polymarker3d(fildes,clist,numpts,flags);
int fildes,flags,numpts;
float clist[];
void polymarker_with_data3d(fildes,clist,numpts,
numcoord,vertex_flags);
int fildes,numpts,numcoord,vertex_flags;
float clist[];
void dcpolymarker(fildes, clist, numpts, flags);
int fildes,flags,numpts,clist[];
FORTRAN77 Syntax:
subroutine polymarker2d(fildes,clist,numpts,flags)
integer*4 fildes,flags,numpts
real clist(numpts*(2+flags))
subroutine polymarker3d(fildes,clist,numpts,flags)
integer*4 fildes,flags,numpts
real clist(numpts*(3+flags))
subroutine polymarker_with_data3d(fildes,clist,numpts,
numcoord,vertex_flags)
integer*4 fildes,flags,numpts,numcoord,vertex_flags
real clist(numpts*(3+flags))
subroutine dcpolymarker(fildes,clist,numpts,flags)
integer*4 fildes,flags,numpts
integer*4 clist(numpts*(2+flags))
Pascal Syntax:
procedure polymarker2d(fildes:integer;
var clist:array[lo..hi:integer] of real;
numpts,flags:integer);
procedure polymarker3d(fildes:integer;
var clist:array[lo..hi:integer] of real;
numpts,flags:integer);
procedure polymarker_with_data3d(fildes:integer;
var clist:array[lo..hi:integer] of real;
numpts,numcoord,vertex_flags:integer);
procedure dcpolymarker(fildes:integer;
var clist:array[lo..hi:integer] of integer;
numpts,flags:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphic device is opened.
clist Array of world (for polymarker2d, polymarker3d, polymarker_with_data3d) or device (for dcpolymarker) coordinate data with or without extra coordinates and move/draw indicators embedded after each endpoint.
numpts Number of points in the clist array. If less than zero, zero is used.
flags If set to TRUE (1), move/draw data is included in the clist after x,y,z and any extra coordinates.
If set to FALSE (0), move/draw data is not included in the clist. Move/draw indicators occupy the same amount of space as a single coordinate and are interspersed with the coordinate data. All bits of the indicator must be zero to indicate a move (integer 0 or real 0.0). If the data is 2d, each (x,y) pair of coordinates is followed by a move draw indicator. If the data is 3d, each (x,y,z) triplet is followed by a move/draw indicator. For example:
| 2-dimensions | 3-dimensions |
| x1 | x1 |
| y1 | y1 |
| m/d1 | z1 |
| x2 | m/d1 |
| y2 | x2 |
| m/d2 | y2 |
| . | z2 |
| . | m/d2 |
| . | . |
| . | . |
numcoord
the number of extra coordinates in the vertex data. This includes the data specified in vertex_flags.
vertex_flags
describes the definition of the vertex data.
Discussion
A marker is centered at each coordinate specified in the clist array regardless of whether that coordinate is a move or a draw. If flags is TRUE (1), the move/draw flag following the position coordinates is ignored.
Each entry in the clist may contain any number of coordinates. The actual number depends on the coord parameter specified in vertex_format. The coord parameter can be used to skip over any extra coordinates following the usual 2, 3, or 4 that can be specified with this procedure. Vertex move/draw flags follow the skipped extra coordinates.
The current marker symbol is drawn at each endpoint, independent of the move/draw indicators. Lines are not drawn between marker symbols. To draw lines between marker symbols, use the corresponding polyline procedure.
The marker is drawn with the current marker_color. As with all output primitives, polymarker is affected by the current drawing_mode and write_enable.
The polymarker_with_data3d procedure is very similar to the polymarker3d procedure, except that the coordinate data may be deformed prior to placing the marker. Also, Each entry in the clist can contain any number of coordinates. The actual number depends on the numcoord parameter. How the additional data is to be used is specified with the vertex_flags parameter. The additional data starts after the z coordinate and is assumed to be omitted if not specified.
The following table describes the vertex flags which can be ORed together, their expected order, and indicates (YES) for flags that are utilized, (OK) for flags that may be present but are ignored, and (NO) for flags that must not be present (error condition):
| Vertex Flag | Description | |
| NULL | No extra data is to be used for rendering | YES |
| VERTEX_INTENSITY | A single intensity value | OK |
| VERTEX_COLOR | An (r,g,b) triple at the vertex | OK |
| VERTEX_NORMAL | An (nx,ny,nz) normal at the vertex | OK |
| TEXTURE_MAP | A coordinate (u,v) into a texture map | OK |
| VERTEX_BLEND | Blending factor for combining existing pixels | OK |
| ILLUMINATION | Illumination factors for each light source | OK |
| DEFORMATION | Complex deformation factors for each axis | YES |
| CONTOURING | Front/back facing scalar contouring values per vertex | NO |
| MD_FLAGS | A move/draw flag | YES |
The following table describes the facet flags which can be ORed together, their expected order, and indicates (YES) for flags that are utilized, (OK) for flags that may be present but are ignored, and (NO) for flags that must not be present (error condition):
| Facet Flag | Description | |
| NULL | No facet flags are provided | YES |
| FACET_COLOR | An rgb color triad supplied in flist for each facet | NO |
| FACET_NORMAL | A normal vector supplied in flist for each facet | OK |
| EDGE_FLAG | Edge visibility flag | NO |
| CLOCKWISE | Facet vertices arranged clockwise format (front face) | OK |
| COUNTER_CLOCKWISE | Facet vertices arranged in counter clockwise format | OK |
| UNIT_NORMALS | Vertex and facet normal vectors are normalized | OK |
The only entry that is actually processed is the DEFORMATION data. All of the other data, if present, is skipped over and ignored. DEFORMATION specifies that complex deformation values are present. Whether to use the real or imaginary portion of the deformation factor/deformation values product and the deformation factor (df + dfi below) are specified in the deformation_mode procedure. The per vertex deformation values are in the following order: fx,fy,fz,fxi,fyi,fzi. Prior to processing the polygon all of the vertices are deformed by the following calculations:
x = x + (df + dfi) * (fx + fxi)
y = y + (df + dfi) * (fy + fyi)
z = z + (df + dfi) * (fz + fzi)
SEE ALSO
marker_color(3G), marker_orientation(3G), marker_size(3G), marker_type(3G), vertex_format(3G).
Hewlett-Packard Company — HP-UX Release 9.03: April 1994