|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.imagero.geom.Line
com.imagero.geom.LineSegment
LineSegment is like a Line, but bounded through 2 Points
| Constructor Summary | |
LineSegment(LineSegment ls)
|
|
LineSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
|
|
LineSegment(java.awt.Point p1,
java.awt.Point p2)
|
|
| Method Summary | |
boolean |
contains(java.awt.Point p)
determine if given point lies on this line |
boolean |
contains(java.awt.Point p,
double round)
|
java.awt.Point |
getP1()
|
java.awt.Point |
getP2()
|
boolean |
intersects(LineSegment ls)
|
java.awt.Point |
nearestPoint(java.awt.Point p)
find nearest point on this Line to supplied Point |
void |
set(java.awt.Point p1,
java.awt.Point p2)
|
void |
setP1(java.awt.Point p)
|
void |
setP2(java.awt.Point p)
|
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class com.imagero.geom.Line |
getX, getY, intersection, isOver, isUnder |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LineSegment(LineSegment ls)
public LineSegment(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
public LineSegment(java.awt.Point p1,
java.awt.Point p2)
| Method Detail |
public boolean contains(java.awt.Point p)
Line
contains in class Linep - Point
public boolean contains(java.awt.Point p,
double round)
contains in class Linepublic java.awt.Point getP1()
public java.awt.Point getP2()
public boolean intersects(LineSegment ls)
intersects in class Linepublic java.awt.Point nearestPoint(java.awt.Point p)
Line
nearestPoint in class Linep - Point
public void set(java.awt.Point p1,
java.awt.Point p2)
set in class Linepublic void setP1(java.awt.Point p)
public void setP2(java.awt.Point p)
public java.lang.String toString()
java.lang.ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||