clippoly(3) — Unix Programmer’s Manual
NAME
clippoly - clip a polygon
SYNOPSIS
C
long clippoly(mask, n, prepoly, postpoly)
String mask;
long n;
Coord prepoly[][3], postpoly[][4];
FORTRAN
integer function clippo(mask, n, prepol, pstpol)
character∗(∗) mask
integer n
real prepol(3,n), pstpol(4,n∗2)
Pascal
function clippoly(mask: String; n: integer;
var prepoly: Coord3array;
var postpoly: Coord4array): integer;
DESCRIPTION
Clippoly selectively enables a subset of the six clipping planes. Mask is a string of characters specifying which clipping planes are enabled. This string is chosen from ‘l’, ‘r’, ‘b’, ‘t’, ‘n’, and ‘f’, which represent the left, right, bottom, top, near, and far clipping planes. Mask can name from one to six planes, in any order.
Clippoly takes a polygon with n vertices in prepoly, and returns the number of vertices in the clipped polygon. The clipped polygon is returned in postpoly. Note that postpoly should have room for 2×n vertices; clipping can add up to n new vertices to the polygon.
SEE ALSO
clipline, clippnt, screenpnt, transform
NOTE
This command can only be used in immediate mode.
Silicon Graphics — R1c