VisionX V4VADJTOPOLVisionX V4
NAME

vadjtopol - converts an adjacency file to a polygon file

SYNOPSIS

vadjtopol if=infile of=outfile [-p] [-v] [-dbug]

DESCRIPTION

Vadjtopol converts a 3D adjacency file to a 3D polygon file using a hash table. This program inserts adjacencies into a direct-access table, finds triangles for each vertex, and inserts hashes them into a triangle direct-access table. Then triangles are outputed into a polygon file.

The input adjacency file is a list of an index, a 3D vertex, and an adjacency list with VisX types VX_VID, VX_V3D, and VX_ADJ, respectively. The output polygon file is a list of 3D polygons with a VixX type of VX_V3D. Each 3D n-sided polygon is composed of n+1 3D vertices with the last vertex as a repetition of the first vertex to denote polygon closure.

OPTIONS

if=

adjacency list file with the file format: VX_VID (0xDA) [size=1] vertex index VX_V3D [size=3] vertex VX_ADJ (0XD7) [size=n] adjacency list where n is the number of adjacencies

of=

polygon file with each polygon of the format: VX_V3D [size=3(n+1)] polygon where n is the number sides of the polygon

-p

inhibits packing of result

-v

verbose mode prints number of polygons, n-sided polygons, vertices, and adjacency information

-dbug

prints hash table and direct-access table

CONSTRAINTS

Assumes adjacency list was created from a polygon file with only triangles. Quadrilaterals and higher sided polygons are not formed. However, this code can be modified to search deeper into the adjacency structure to find quadrilaterals. To search for an additional side in a polygon, the running time is multiplied by about the average number of adjacencies per vertex.

AUTHOR(S)

B. C. Lee, 1999

SEE ALSO

vvertopol(1), vvertoadj(1), vpoltover(1), vpoltoadj(1), vadjtover(1)