|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lwjgl.util.Point
public final class Point
A 2D integer point class, which looks remarkably like an AWT one.
Constructor Summary | |
---|---|
Point()
Constructor for Point. |
|
Point(int x,
int y)
Constructor for Point. |
|
Point(ReadablePoint p)
Constructor for Point. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Point()
public Point(int x, int y)
public Point(ReadablePoint p)
Method Detail |
---|
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 point
true
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 Point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |