Programmer Guide/Command Reference/EVAL/pgget: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(initial import)
 
m (1 revision: Initial import)
(No difference)

Revision as of 17:31, 18 November 2010

pgget - count number of polygons
Usage:

N := eval pgGet( {pg_cplist}X )

N := eval pgGet( {pg_stream}X )

Function:

Count the number of polygons stored in a polygon-stream or point-list.

Parameters:
X
A polygon-stream or point-list.
Result:

The number of simple-polygons defined by the pg_cplist X or contained in the pg_stream X.

Note that 0 is returned if X is invalid.

Usage:

P := pgGet( {pg_cplist}X, {number}I, {number}FMT=0 )

P := pgGet( {pg_stream}X, {number}I, {number}FMT=0 )

Function:

Extract the polygon data or header from a polygon-stream or point-list.

Parameters:
X
A point-list or polygon-stream.
I
The index of the polygon to extract.
FMT
The polygon type to return. The following values are supported:
0 - return the I-th polygon stored in X as a polygon stream.
1 - return the I-th polygon stored in X as a simple polygon.
2 - return the header of the I-th polygon stored in X (8 x 2 matrix, see description of pg_stream)
Result:

Returns either a simple-polygon, polygon-stream or polygon header, depending on FMT.

pghull - compute hull polygon
Usage:

H := pgHull( {pg_stream}XS, {number}IX, {pg_stream}YS, {number}IY )

Description:

Compute the hull-polygon of two simple-polygons.

Parameters:
XS
The first polygon stream.
IX
The index of the simple polygon in the polygon stream XS.
YS
The second polygon stream.
IY
The index of the simple polygon in the polygon stream YS.
Result:

The polygon stream H containing the hull of the polygons XS[IX] and YS[IY].

Navigation menu

Personal tools