public class ProjectionPointImpl extends java.lang.Object implements ProjectionPoint, java.io.Serializable
ProjectionPoint,
Serialized Form| Constructor and Description |
|---|
ProjectionPointImpl()
Default constructor, initialized to 0,0
|
ProjectionPointImpl(double x,
double y)
Constructor, initialized to x, y
|
ProjectionPointImpl(ProjectionPoint pt)
Constructor that copies ProjectionPoint values into this.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
closeEnough(ProjectionPoint pt2)
Returns true if this represents the same point as pt, using Misc.closeEnough.
|
boolean |
equals(ProjectionPoint pt)
Returns true if this represents the same point as pt.
|
double |
getX()
Get the X coordinate
|
double |
getY()
Get the Y coordinate
|
boolean |
isInfinite()
See if either coordinate is +/- infinite.
|
static boolean |
isInfinite(ProjectionPoint pt)
See if either coordinate in
pt is +/- infinite. |
void |
setLocation(double x,
double y) |
void |
setLocation(ProjectionPoint pt)
set x,y location from pt
|
void |
setX(double x) |
void |
setY(double y) |
java.lang.String |
toString()
nicely format this point
|
void |
toString(java.util.Formatter f) |
public ProjectionPointImpl()
public ProjectionPointImpl(ProjectionPoint pt)
pt - point to copypublic ProjectionPointImpl(double x,
double y)
x - x coordinatey - y coordinatepublic double getX()
ProjectionPointgetX in interface ProjectionPointpublic double getY()
ProjectionPointgetY in interface ProjectionPointpublic void setX(double x)
public void setY(double y)
public boolean equals(ProjectionPoint pt)
equals in interface ProjectionPointpt - point to checkpublic boolean closeEnough(ProjectionPoint pt2)
pt2 - point to check againstpublic java.lang.String toString()
toString in class java.lang.Objectpublic void toString(java.util.Formatter f)
public void setLocation(ProjectionPoint pt)
pt - point to use for valuespublic void setLocation(double x,
double y)
public boolean isInfinite()
public static boolean isInfinite(ProjectionPoint pt)
pt is +/- infinite.
This happens sometimes in projective geometry.pt - point to check