subscript.geom
Class GPoint2D
java.lang.Object
subscript.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()
manhattenDistanceTo
public double manhattenDistanceTo(GPoint2D p)
distanceTo
public double distanceTo(GPoint2D p)
squaredDistanceTo
public double squaredDistanceTo(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.
transform
public static java.util.ArrayList<GPoint2D> transform(java.util.ArrayList<GPoint2D> pin,
Matrix Pin)
transform
public static void transform(java.util.ArrayList<GPoint2D> pin,
Matrix Pin,
java.util.ArrayList<GPoint2D> pout)
transform
public static void transform(GPoint2D[] pin,
Matrix Pin,
GPoint2D[] pout)
clone
public static java.util.ArrayList<GPoint2D> clone(java.util.ArrayList<GPoint2D> pin)
cloneToArray
public static GPoint2D[] cloneToArray(java.util.ArrayList<GPoint2D> pin)
scale
public GPoint2D scale(double s)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException
- Throws:
java.io.IOException
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Throws:
java.io.IOException