org.osm2world.core.math
Class LineSegmentXZ

Object
  extended by LineSegmentXZ

public class LineSegmentXZ
extends Object


Field Summary
 VectorXZ p1
           
 VectorXZ p2
           
 
Constructor Summary
LineSegmentXZ(VectorXZ p1, VectorXZ p2)
           
 
Method Summary
 VectorXZ getCenter()
           
 VectorXZ getIntersection(VectorXZ segmentP1, VectorXZ segmentP2)
          returns the intersection between this line segment and the line segment defined by the parameters; null if none exists.
 double getLength()
          returns the distance between this segment's two end nodes
 boolean intersects(VectorXZ segmentP1, VectorXZ segmentP2)
          returns true if there is an intersection between this line segment and the line segment defined by the parameters
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

p1

public final VectorXZ p1

p2

public final VectorXZ p2
Constructor Detail

LineSegmentXZ

public LineSegmentXZ(VectorXZ p1,
                     VectorXZ p2)
Method Detail

getCenter

public VectorXZ getCenter()

intersects

public boolean intersects(VectorXZ segmentP1,
                          VectorXZ segmentP2)
returns true if there is an intersection between this line segment and the line segment defined by the parameters


getIntersection

public VectorXZ getIntersection(VectorXZ segmentP1,
                                VectorXZ segmentP2)
returns the intersection between this line segment and the line segment defined by the parameters; null if none exists.


getLength

public double getLength()
returns the distance between this segment's two end nodes


toString

public String toString()
Overrides:
toString in class Object