public class MCIndexSnapRounder extends Object implements Noder
SegmentStrings.
Implements the Snap Rounding technique described in
papers by Hobby, Guibas & Marimont, and Goodrich et al.
Snap Rounding assumes that all vertices lie on a uniform grid;
hence the precision model of the input must be fixed precision,
and all the input vertices must be rounded to that precision.
This implementation uses a monotone chains and a spatial index to speed up the intersection tests.
This implementation appears to be fully robust using an integer precision model. It will function with non-integer precision models, but the results are not 100% guaranteed to be correctly noded.
| Constructor and Description |
|---|
MCIndexSnapRounder(double scale) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeNodes(Collection<NodedSegmentString> inputSegmentStrings)
Computes the noding for a collection of
SegmentStrings. |
void |
computeVertexSnaps(Collection<NodedSegmentString> edges)
Snaps segments to all vertices.
|
Collection<NodedSegmentString> |
getNodedSubstrings()
Returns a
Collection of fully noded SegmentStrings. |
public void computeNodes(Collection<NodedSegmentString> inputSegmentStrings)
NoderSegmentStrings.
Some Noders may add all these nodes to the input SegmentStrings;
others may only add some or none at all.computeNodes in interface NoderinputSegmentStrings - a collection of SegmentStrings to nodepublic void computeVertexSnaps(Collection<NodedSegmentString> edges)
edges - the list of segment strings to snap togetherpublic Collection<NodedSegmentString> getNodedSubstrings()
NoderCollection of fully noded SegmentStrings.
The SegmentStrings have the same context as their parent.getNodedSubstrings in interface NoderCopyright © 2015 Revolution Systems Inc.. All rights reserved.