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 WritablePoint
public void setLocation(ReadablePoint p)
setLocation
in interface WritablePoint
public void setX(int x)
setX
in interface WritablePoint
public void setY(int y)
setY
in interface WritablePoint
public 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.Object
obj
- 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.Object
public int hashCode()
Point
.hashCode
in class java.lang.Object
Point
public int getX()
getX
in interface ReadablePoint
public int getY()
getY
in interface ReadablePoint
public void getLocation(WritablePoint dest)
ReadablePoint
getLocation
in interface ReadablePoint
dest
- The destination Point, or null, to create a new PointCopyright © 2002-2009 lwjgl.org. All Rights Reserved.