Basic operations on the fang geo void fa init geo fa geometry geo Initialize the fields of geo Must be done once to geo before any other operation void fa copy geo outgeo fa geometry geo fa geometry outgeo Initialize outgeo and make its contents a copy of geo s contents void fa add geo geo1 geo2 fa geometry geo1 fa geometry geo2 Add all the points in geo2 to geo1 geo2 is unchanged void fa bb geo bbox fa geometry geo fa box bbox Place the bounding box of geo in bbox if there is no geometry in geo An error is flagged int fa count geo fa geometry geo Return the number of vertices in geo int fa intersect p geo1 geo2 fa geometry geo1 geo2 Return nonzero if geo1 intersects geo2 zero otherwise void fa dump geo geo fa geometry geo Write out the vertices in geo on standard error in readable form For debugging void fa free geo geo fa geometry geo Free all storage associated with geo Geometrical operations void fa and geo1 geo2 outgeo fa geometry geo1 geo2 fa geometry outgeo Do the logical AND of the two geos geo1 and geo2 and return the result in outgeo void fa or geo1 geo2 outgeo fa geometry geo1 geo2 fa geometry outgeo Do the logical OR of the two geos geo1 and geo2 and return the result in outgeo void fa andnot geo1 geo2 outgeo fa geometry geo1 geo2 fa geometry outgeo Do the logical AND of geo1 and NOT geo2 and returns the result in outgeo thus subtracting geo2 from geo1 void fa invert geo bbox outgeo fa geometry geo fa box bbox fa geometry outgeo Invert geo and place the result in outgeo The inversion is defined such that all points that are not filled in geo and inside of the box bbox are filled in outgeo bbox must be at least as large as the bounding box of geo void fa grow geo amount outgeo fa geometry geo int amount fa geometry outgeo Grow the geo geo by amount and place the result in outgeo If amount is negative then a shrink is done void fa frame geo grow shrink outgeo fa geometry geo int grow shrink fa geometry outgeo Equivalent to fa geometry tmp fa grow geo grow tmp fa grow tmp shrink outgeo void fa scale geo scale factor outgeo fa geometry geo double scale factor fa geometry outgeo Scale geo by scale factor and place the result in outgeo void fa scale1 geo scale factor fa geometry geo double scale factor Scale geo by scale factor in place i e geo itself is changed void fa fill geo outgeo fa geometry geo fa geometry outgeo Fill all completely enclosed holes in geo and put the result in outgeo Functions using the fa box structure void fa to boxes geo outbox list fa geometry geo fa box outbox list Make outbox list point to a non overlapping set of boxes that exactly cover the geo geo void fa add box geo left bottom right top fa geometry geo fa coord left bottom right top Add the Manhattan box with coordinates left bottom right top to geo geo must have been initialized before this void fa print boxes box list scale stream fa box box list int scale FILE stream Write out the boxes in box list in cif format The boxes are scaled by scale and written out on file stream stream void fa dump boxes box list fa box list box list Write out the boxes in box list in cif format The boxes are scaled by 1 and written out to standard error void fa free boxes box list fa box box list Free all the boxes contained in box list Functions using the fa region structure void fa to regions geo region list fa geometry geo fa region region list Make region list point to a non overlapping set of regions that exactly cover the geo geo The regions will share at most a single vertex with any other region A region is in the form of a oriented list of points with the interior of the region being on the left as you traverse from the head of the list to the tail Interior holes are represented by oppositely oriented regions attached to the interior regions link of the top level region These interior regions in turn have any surrounded regions attached to their interior regions and so on recursively void fa add regions geo region list fa geometry geo fa region region list Add the regions in region list to geo region list is described in fa to region The format of a void fa regions to boxes region list outbox fa region region list fa box outbox Make outbox point to a non overlapping set of boxes that exactly cover the regions in region list See fa to region for a definition of a region void fa fill regions1 region list fa region region list Fill all completely enclosed holes in region list putting the result back in place void fa print region region stream fa region region FILE stream Write out the contents of the region region in human readable form on the output stream stream For debugging void fa print regions region list stream fa region region list FILE stream Write out the contents of the regions in region list in human readable form on the output stream stream For debugging void fa dump region region fa region region Write out the contents of the region region in human readable form on standard error For debugging void fa dump regions region list fa region region list Write out the contents of the regions in region list in human readable form on standard error For debugging void fa free regions region list fa region region list Free all storage associated with region list Functions using the fa edge structure void fa to edges geo h list v list fa geometry geo fa edge h list v list Set h list and v list to point to lists of the horizontal and vertical edges implementing the geo geo void fa dump edge edge fa edge edge Write out the contents of the edge edge in human readable form to standard error For debugging void fa dump edges edge list fa edge edge list Write out the contents of the edges in edge list in human readable form to standard error For debugging void fa free edges edge list fa edge edge list Free all storage associated with edge list The following routines are not expected to be used by anyone except for fine control of fang s memory use void fa sort geo fa geometry geo Sort the internal representation of geo in place This is automatically done by the other routines when needed so there is really no reason ever to call this routine void fa set auto merge threshold factor int threshold double factor Causes fang automatically to sort and merge a geometry whenever it has more than threshold vertices and the number of vertices is at least factor times as many …
View Full Document
Unlocking...