LineFollowerSimulator
Class BezierIntersection

java.lang.Object
  extended by LineFollowerSimulator.BezierIntersection

public class BezierIntersection
extends java.lang.Object

Static class calculates intersections of a line segment and Bezier curve. Only intersection with cubic bezier curves are implemented so far.

Author:
Ondrej Stanek

Constructor Summary
BezierIntersection()
           
 
Method Summary
static java.util.ArrayList<java.awt.geom.Point2D> GetIntersections(java.awt.geom.CubicCurve2D curve, java.awt.geom.Line2D line)
          Calculates intersection points of a line segment and cubic Bezier curve
static java.util.ArrayList<java.awt.geom.Point2D> GetIntersections(java.awt.geom.GeneralPath path, java.awt.geom.Line2D line)
          Calculates intersection points of a line segment and GeneralPath object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BezierIntersection

public BezierIntersection()
Method Detail

GetIntersections

public static java.util.ArrayList<java.awt.geom.Point2D> GetIntersections(java.awt.geom.GeneralPath path,
                                                                          java.awt.geom.Line2D line)
Calculates intersection points of a line segment and GeneralPath object. GeneralPath object must contain only cubic bezier curves, other geometric shapes are not supportet yet

Returns:
List of intersection points of path and line

GetIntersections

public static java.util.ArrayList<java.awt.geom.Point2D> GetIntersections(java.awt.geom.CubicCurve2D curve,
                                                                          java.awt.geom.Line2D line)
Calculates intersection points of a line segment and cubic Bezier curve

Returns:
List of intersection points