Intersection Functions


Functions

GEOMLIBEXPORT void IntsClean (INTSHANDLE ihp, DPOLYGON *dpoly, INTERSECTINFO *ints)
GEOMLIBEXPORT void IntsDumpInfo (INTERSECTINFO *ints, FILE *fp, INT32 linenum)
GEOMLIBEXPORT void IntsFree (INTERSECTINFO *ints)
GEOMLIBEXPORT int IntsInit (double thresh, INTSHANDLE *ihp)
GEOMLIBEXPORT int IntsSearch (INTSHANDLE ihp, DPOLYGON *checkpoly, DPOLYGON *otherpoly, INTERSECTINFO *checkints, INTERSECTINFO *otherints)
GEOMLIBEXPORT int IntsSearchSelf (INTSHANDLE ihp, DPOLYGON *dpoly, INTERSECTINFO *ints)
GEOMLIBEXPORT void IntsSetNumDim (INTSHANDLE ihp, int NumDim)
GEOMLIBEXPORT int IntsSplitLine (INTSHANDLE ihp, DPOLYGON *dpoly, INTERSECTINFO *ints, int(*)(void *, DPOLYGON *), int(*)(void *), void *udata)
GEOMLIBEXPORT int IntsSplitLineEx (INTSHANDLE ihp, DPOLYGON *dpoly, INTERSECTINFO *ints, int(*)(void *, DPOLYGON *), int(*)(void *, DPOLYGON *), int(*)(void *), void *udata)
GEOMLIBEXPORT void IntsStop (INTSHANDLE ihp)
GEOMLIBEXPORT DOUBLE IntsUpdateThreshold (INTSHANDLE ihp, DOUBLE thresh)

Function Documentation

GEOMLIBEXPORT void IntsClean INTSHANDLE  ihp,
DPOLYGON dpoly,
INTERSECTINFO ints
 

Sort and remove duplicates from INTERSECTINFO structure.

This function removes duplicate and/or overlapping intersections associated with the line. It also sorts the data for use in IntsSplitLine().

Parameters:
ihp  Intersection handle, see IntsInit()
dpoly  Polygon associated with INTERSECTINFO
ints  Structure to clean up

GEOMLIBEXPORT void IntsDumpInfo INTERSECTINFO ints,
FILE *  fp,
INT32  linenum
 

Print out to a file an INTERSECTINFO structure.

Parameters:
ints  Structure to print out
fp  Open file handle to print to
linenum  Line number associated with "ints"

GEOMLIBEXPORT void IntsFree INTERSECTINFO ints  ) 
 

Free allocated memory from an INTERSECTINFO structure.

Internal pointers get allocated during the IntsSearch() and IntsSearchSelf() functions. This will free them up.

Parameters:
ints  Structure that contains allocated memory

GEOMLIBEXPORT int IntsInit double  thresh,
INTSHANDLE ihp
 

Initialize intersect searching code.

Parameters:
thresh  Threshold to remove duplicate points in calls to RemoveDupPtsT().
ihp  Intersection handle RETURNED

GEOMLIBEXPORT int IntsSearch INTSHANDLE  ihp,
DPOLYGON checkpoly,
DPOLYGON otherpoly,
INTERSECTINFO checkints,
INTERSECTINFO otherints
 

Search for intersections between two lines.

This function determines if the two lines cross or overlap each other and stores where into the respective INTERSECTINFO structure. This function will append to the INTERSECTINFO structure if intersection data exists for that line.

Parameters:
ihp  Intersection handle, see IntsInit()
checkpoly  Source line to search for intersections on
otherpoly  Other line to search for intersections on
checkints  Structure to store intersection data in for source line
otherints  Structure to store intersection data in for other line (may be NULL)

GEOMLIBEXPORT int IntsSearchSelf INTSHANDLE  ihp,
DPOLYGON dpoly,
INTERSECTINFO ints
 

Search for intersections for a line compared to itself.

This function locates any intersections that a line may have with itself. It is not recommended to combine the results of this function and IntsSearch(). The recommended method is to resolve self intersections first and then resolve intersections with other lines.

Parameters:
ihp  Intersection handle, see IntsInit()
dpoly  Line to search for intersections on
ints  Structure to store intersection data in

GEOMLIBEXPORT void IntsSetNumDim INTSHANDLE  ihp,
int  NumDim
 

Sets the number of dimensions of the points being fed into it, i.e. 2 = 2D, 3 = 3D.

GEOMLIBEXPORT int IntsSplitLine INTSHANDLE  ihp,
DPOLYGON dpoly,
INTERSECTINFO ints,
int(*  )(void *, DPOLYGON *),
int(*  )(void *),
void *  udata
 

Split up a line according to the data in the INSTERSECTINFO structure.

Parameters:
ihp  Intersection handle, see IntsInit()
dpoly  Line to split
ints  Information on how to split the line
udata  Callback if line is completely overlapped and cannot be added, see IntsSplitLineEx User data to be passed to callbacks

GEOMLIBEXPORT int IntsSplitLineEx INTSHANDLE  ihp,
DPOLYGON dpoly,
INTERSECTINFO ints,
int(*  )(void *, DPOLYGON *),
int(*  )(void *, DPOLYGON *),
int(*  )(void *),
void *  udata
 

Split up a line according to the data in the INSTERSECTINFO structure (Extended).

Parameters:
ihp  Intersection handle, see IntsInit()
dpoly  Line to split
ints  Information on how to split the line
udata  Callback if line is completely overlapped and cannot be added User data to be passed to callbacks

GEOMLIBEXPORT void IntsStop INTSHANDLE  ihp  ) 
 

Clean up intersect searching code.

Parameters:
ihp  Intersection handle, see IntsInit()

GEOMLIBEXPORT DOUBLE IntsUpdateThreshold INTSHANDLE  ihp,
DOUBLE  thresh
 

Update threshold value for intersection searching and splitting.

Returns:
Previous threshold value.
Parameters:
ihp  Intersection handle, see IntsInit()
thresh  New threshold value to use


Generated on Thu Aug 12 06:27:41 2004 for TNTsdk by doxygen 1.3.4-20031026