maspack.geometry
Class ConvexPolygonIntersector

java.lang.Object
  extended by maspack.geometry.ConvexPolygonIntersector

public class ConvexPolygonIntersector
extends java.lang.Object


Nested Class Summary
static interface ConvexPolygonIntersector.Listener
           
 
Field Summary
static double AUTOMATIC
          Specfies that distance tolerances should be computed automatically.
 
Constructor Summary
ConvexPolygonIntersector()
           
 
Method Summary
 void addListener(ConvexPolygonIntersector.Listener l)
           
 double getDistanceTolerance()
          Gets the distance tolerance.
 ConvexPolygon2d intersect(ConvexPolygon2d polyP, ConvexPolygon2d polyQ)
           
 int intersectLine(double[] lam, ConvexPolygon2d poly, Point2d q0, Vector2d u)
           
 void removeListener(ConvexPolygonIntersector.Listener l)
           
 void setDistanceTolerance(double tol)
          Sets the distance tolerance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTOMATIC

public static final double AUTOMATIC
Specfies that distance tolerances should be computed automatically.

See Also:
Constant Field Values
Constructor Detail

ConvexPolygonIntersector

public ConvexPolygonIntersector()
Method Detail

addListener

public void addListener(ConvexPolygonIntersector.Listener l)

removeListener

public void removeListener(ConvexPolygonIntersector.Listener l)

setDistanceTolerance

public void setDistanceTolerance(double tol)
Sets the distance tolerance. This should be the smallest distance value that can be reliably computed. If tol is set to AUTOMATIC, then the distance tolerance is computed automatically from the data.

Parameters:
tol - distance tolerance

getDistanceTolerance

public double getDistanceTolerance()
Gets the distance tolerance.

Returns:
distance tolerance
See Also:
setDistanceTolerance(double)

intersect

public ConvexPolygon2d intersect(ConvexPolygon2d polyP,
                                 ConvexPolygon2d polyQ)

intersectLine

public int intersectLine(double[] lam,
                         ConvexPolygon2d poly,
                         Point2d q0,
                         Vector2d u)