Class dnx.geom.LineSegment2
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.geom.LineSegment2

java.lang.Object
   |
   +----dnx.geom.LineSegment2

public class LineSegment2
extends Object
two-dimensional line segment.

Variable Index

 o p1
 o p2

Constructor Index

 o LineSegment2(Point2, Point2)

Method Index

 o intersectionAssumingIntersects(Point2, Point2, Point2, Point2)
 o intersects(LineSegment2)
Return true if L intersects this line segment.
 o intersects(Point2, Point2, Point2, Point2)
Return true if the line segment from P1 to P2 intersects the line segment from P3 to P4.
 o pointOnLine(Point2, Point2, Point2)
Return true if POINT lies anywhere along the interior of the line segment PL1->PL2 (does not include the endpoints).

Variables

 o p1
  public Point2 p1
 o p2
  public Point2 p2

Constructors

 o LineSegment2
  public LineSegment2(Point2 P1,
                      Point2 P2)

Methods

 o intersects
  public boolean intersects(LineSegment2 l)
Return true if L intersects this line segment. "Intersect" here means that the two lines have any point in common other than a point which is an endpoint for both lines.
 o intersects
  public static boolean intersects(Point2 p1,
                                   Point2 p2,
                                   Point2 p3,
                                   Point2 p4)
Return true if the line segment from P1 to P2 intersects the line segment from P3 to P4. "Intersect" here means that the two lines have any point in common other than a point which is an endpoint for both lines.
 o intersectionAssumingIntersects
  public static Point2 intersectionAssumingIntersects(Point2 p1,
                                                      Point2 p2,
                                                      Point2 p3,
                                                      Point2 p4)
 o pointOnLine
  public static boolean pointOnLine(Point2 point,
                                    Point2 pl1,
                                    Point2 pl2)
Return true if POINT lies anywhere along the interior of the line segment PL1->PL2 (does not include the endpoints).

All Packages  Class Hierarchy  This Package  Previous  Next  Index