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

Class dnx.geom.Line2

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

public class Line2
extends Object
two-dimensional line (i.e. infinite).

Variable Index

 o c
 o explicit_set
 o implicit_set
 o N
 o U
 o V

Constructor Index

 o Line2()
construct a line going nowhere.
 o Line2(Point2, Point2)
construct a line going through two points.

Method Index

 o getC()
 o getN()
 o getU()
 o getV()
 o intersection(Line2)
Return the point of intersection between the two lines, or null if the lines are parallel.
 o pointOnLineNearestOrigin()
Return the point on this line that is nearest the origin.
 o pointOnLineNearestPoint(Point2)
Return the point on this line that is nearest the specified point.
 o setExplicit(Vector2, Vector2)
set the explicit representation of a line.
 o setImplicit(Vector2, float)
set the implicit representation of a line.
 o toString()

Variables

 o N
  protected Vector2 N
 o c
  protected float c
 o U
  protected Vector2 U
 o V
  protected Vector2 V
 o implicit_set
  protected boolean implicit_set
 o explicit_set
  protected boolean explicit_set

Constructors

 o Line2
  public Line2()
construct a line going nowhere.
 o Line2
  public Line2(Point2 A,
               Point2 B)
construct a line going through two points.

Methods

 o getC
  public final float getC()
 o getN
  public final Vector2 getN()
 o getU
  public final Vector2 getU()
 o getV
  public final Vector2 getV()
 o setImplicit
  public void setImplicit(Vector2 N,
                          float c)
set the implicit representation of a line.
 o setExplicit
  public void setExplicit(Vector2 U,
                          Vector2 V)
set the explicit representation of a line.
 o pointOnLineNearestOrigin
  public Point2 pointOnLineNearestOrigin()
Return the point on this line that is nearest the origin.
 o pointOnLineNearestPoint
  public Point2 pointOnLineNearestPoint(Point2 p)
Return the point on this line that is nearest the specified point.
 o intersection
  public Point2 intersection(Line2 m)
Return the point of intersection between the two lines, or null if the lines are parallel.
 o toString
  public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index