Serializable
, ReadablePoint
, WritablePoint
public final class Point extends Object implements ReadablePoint, WritablePoint, Serializable
Constructor | Description |
---|---|
Point() |
Constructor for Point.
|
Point(int x,
int y) |
Constructor for Point.
|
Point(ReadablePoint p) |
Constructor for Point.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(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) |
|
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(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.public String toString()
null
.public int hashCode()
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.