maslab.geom
Class GLineSegment2D

java.lang.Object
  extended by maslab.geom.GLineSegment2D
All Implemented Interfaces:
java.io.Serializable

public class GLineSegment2D
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 GLine2D line
           
 GPoint2D p1
           
 GPoint2D p2
           
 
Constructor Summary
GLineSegment2D(GPoint2D p1, GPoint2D p2)
           
 
Method Summary
 double distanceTo(GPoint2D p)
           
 GPoint2D intersectionWith(GLine2D l)
          Returns the point where this segment intersects this line, or null if they do not intersect.
 GPoint2D intersectionWith(GLineSegment2D seg)
           
 GLineSegment2D transform(double theta, double dx, double dy)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

line

public GLine2D line

p1

public GPoint2D p1

p2

public GPoint2D p2
Constructor Detail

GLineSegment2D

public GLineSegment2D(GPoint2D p1,
                      GPoint2D p2)
Method Detail

intersectionWith

public GPoint2D intersectionWith(GLine2D l)
Returns the point where this segment intersects this line, or null if they do not intersect.


intersectionWith

public GPoint2D intersectionWith(GLineSegment2D seg)

distanceTo

public double distanceTo(GPoint2D p)

transform

public GLineSegment2D transform(double theta,
                                double dx,
                                double dy)