|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.shlublu.javax.math.Point2D
Creation : 2002/03/23 Class dedicated to implement 2D point operations
Field Summary | |
double |
x
x coordinate |
double |
y
y coordinate |
Constructor Summary | |
Point2D()
Empty constructor, init to (.0, .0) |
|
Point2D(double dblX,
double dblY)
Constructor, init to the given arguments |
|
Point2D(Point2D p)
Constructor, init to the given point |
Method Summary | |
java.lang.Object |
clone()
Return a Point2D equals() to this one |
boolean |
equals(java.lang.Object o)
True if o is not null, from the Point2D class without beeing from a subclass, and have the same coordinates in the same order than this. |
double |
getDistanceTo(Point2D pt)
Get the distance between this and the given Point |
Point2D |
getTranslated(Vector2D v)
Get the point corresponding to this translated by the given vector |
Vector2D |
getVector()
Get the Vector corresponding to the translation from the origin to this Point |
Vector2D |
getVectorTo(Point2D pt)
Get the vector between this and the given Point |
java.lang.String |
toString()
Get this point as a string |
void |
translate(Vector2D v)
Translate this point using the given vector |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double x
public double y
Constructor Detail |
public Point2D()
public Point2D(double dblX, double dblY)
public Point2D(Point2D p)
Method Detail |
public java.lang.String toString()
toString
in interface Point
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface Point
equals
in class java.lang.Object
public java.lang.Object clone()
equals()to this one
clone
in interface Point
clone
in class java.lang.Object
public Vector2D getVector()
public void translate(Vector2D v)
public Point2D getTranslated(Vector2D v)
public double getDistanceTo(Point2D pt)
public Vector2D getVectorTo(Point2D pt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |