public final class Point extends java.lang.Object implements ReadablePoint, WritablePoint, java.io.Serializable
| Constructor and Description |
|---|
Point()
Constructor for Point.
|
Point(int x,
int y)
Constructor for Point.
|
Point(ReadablePoint p)
Constructor for Point.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Determines whether an instance of
Point2D is equal
to this point. |
void |
getLocation(WritablePoint dest)
Copy this ReadablePoint into a destination Point
|
int |
getX() |
int |
getY() |
int |
hashCode()
Returns the hash code for this
Point. |
void |
setLocation(int x,
int y) |
void |
setLocation(ReadablePoint p) |
void |
setX(int x) |
void |
setY(int y) |
java.lang.String |
toString()
Returns a string representation of this point and its location
in the (x, y) coordinate space.
|
void |
translate(int dx,
int dy)
Translate a point.
|
void |
translate(ReadablePoint p)
Translate a point.
|
void |
untranslate(ReadablePoint p)
Un-translate a point.
|
public Point()
public Point(int x,
int y)
public Point(ReadablePoint p)
public void setLocation(int x,
int y)
setLocation in interface WritablePointpublic void setLocation(ReadablePoint p)
setLocation in interface WritablePointpublic void setX(int x)
setX in interface WritablePointpublic void setY(int y)
setY in interface WritablePointpublic void translate(int dx,
int dy)
dx - The translation to applydy - The translation to applypublic void translate(ReadablePoint p)
p - The translation to applypublic void untranslate(ReadablePoint p)
p - The translation to applypublic boolean equals(java.lang.Object obj)
Point2D is equal
to this point. Two instances of Point2D are equal if
the values of their x and y member
fields, representing their position in the coordinate space, are
the same.equals in class java.lang.Objectobj - an object to be compared with this pointtrue if the object to be compared is
an instance of Point and has
the same values; false otherwisepublic java.lang.String toString()
null.toString in class java.lang.Objectpublic int hashCode()
Point.hashCode in class java.lang.ObjectPointpublic int getX()
getX in interface ReadablePointpublic int getY()
getY in interface ReadablePointpublic void getLocation(WritablePoint dest)
ReadablePointgetLocation in interface ReadablePointdest - The destination Point, or null, to create a new PointCopyright © 2002-2009 lwjgl.org. All Rights Reserved.