math.geom2d.polygon
Class Polyline2DUtils

Package class diagram package Polyline2DUtils
java.lang.Object
  extended by math.geom2d.polygon.Polyline2DUtils

public abstract class Polyline2DUtils
extends Object

Some utility functions for manipulating Polyline2D.

Since:
0.6.3
Author:
dlegland

Constructor Summary
Polyline2DUtils()
           
 
Method Summary
static BoundaryPolyCurve2D<SmoothOrientedCurve2D> createClosedParallel(LinearRing2D polyline, double d)
          Creates a curve parallel to the given polyline, at a distance d.
static PolyOrientedCurve2D<SmoothOrientedCurve2D> createParallel(Polyline2D polyline, double d)
          Creates a curve parallel to the given polyline, at a distance d.
static Collection<Point2D> intersect(Polyline2D poly1, Polyline2D poly2)
          Return all intersection points between the 2 polylines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polyline2DUtils

public Polyline2DUtils()
Method Detail

createParallel

public static final PolyOrientedCurve2D<SmoothOrientedCurve2D> createParallel(Polyline2D polyline,
                                                                              double d)
Creates a curve parallel to the given polyline, at a distance d. The resulting curve is continuous, but can self-intersect. It is composed of line segments, and circle arcs.

Parameters:
polyline - the source curve
d - the signed distance between the original curve and its parallel
Returns:
the curve parallel to the original curve at a distance d

createClosedParallel

public static final BoundaryPolyCurve2D<SmoothOrientedCurve2D> createClosedParallel(LinearRing2D polyline,
                                                                                    double d)
Creates a curve parallel to the given polyline, at a distance d. The resulting curve is continuous, but can self-intersect. It is composed of line segments, and circle arcs.

Parameters:
polyline - the source curve
d - the signed distance between the original curve and its parallel
Returns:
the curve parallel to the original curve at a distance d

intersect

public static final Collection<Point2D> intersect(Polyline2D poly1,
                                                  Polyline2D poly2)
Return all intersection points between the 2 polylines.

Parameters:
poly1 - a polyline
poly2 - a polyline
Returns:
the set of intersection points


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.