maslab.geom
Class GPoint2D
java.lang.Object
maslab.geom.GPoint2D
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class GPoint2D
- extends java.lang.Object
- implements java.lang.Cloneable, java.io.Serializable
A 2D point
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ORIGIN
public static final GPoint2D ORIGIN
GPoint2D
public GPoint2D()
GPoint2D
public GPoint2D(double x,
double y)
getX
public double getX()
getY
public double getY()
distanceTo
public double distanceTo(GPoint2D p)
transform
public GPoint2D transform(double dx,
double dy,
double theta)
- Transform the point by rotating it, then translating it.
transform
public GPoint2D transform(Matrix P)
- Transform the point by premultiplying by the provided 3x3 matrix.
scale
public GPoint2D scale(double s)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object