|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kaboum.util.KaboumCoordinate
public class KaboumCoordinate
This class define a 2D coordinate
| Field Summary | |
|---|---|
static int |
K_TYPE_BOX
|
static int |
K_TYPE_CIRCLE
|
static int |
K_TYPE_IMAGE
|
static int |
K_TYPE_POINT
Constants definition |
double |
x
X coordinate |
double |
y
Y coordinate |
| Constructor Summary | |
|---|---|
KaboumCoordinate()
Constructor |
|
KaboumCoordinate(double x,
double y)
Constructor |
|
KaboumCoordinate(KaboumCoordinate coord)
Sort of copy constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
int |
compareTo(KaboumCoordinate o)
Compares this object with the specified object for order. |
double |
distance(KaboumCoordinate internal)
Return the distance from this coordinate to the input one |
boolean |
equals(KaboumCoordinate other)
Check if other other coordinate equals this coordinate |
void |
moveTo(double x,
double y)
Move a point to the current position |
void |
moveTo(KaboumCoordinate internal)
Move a point to the current position |
static int |
stoi(java.lang.String str)
Convert an input string to the corresponding int value |
java.lang.String |
write()
Return a string of the location of the point Format: x, y |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int K_TYPE_POINT
public static final int K_TYPE_BOX
public static final int K_TYPE_CIRCLE
public static final int K_TYPE_IMAGE
public double x
public double y
| Constructor Detail |
|---|
public KaboumCoordinate()
public KaboumCoordinate(double x,
double y)
x - X coordinatey - Y coordinatepublic KaboumCoordinate(KaboumCoordinate coord)
cp - Control point| Method Detail |
|---|
public void moveTo(double x,
double y)
x - X coordinate (map)y - Y coordinate (map)public void moveTo(KaboumCoordinate internal)
internal - Coordinatepublic double distance(KaboumCoordinate internal)
internal - Input coordinatepublic boolean equals(KaboumCoordinate other)
other - an other coordinate to check equality
public java.lang.String write()
public java.lang.Object clone()
clone in class java.lang.Objectpublic int compareTo(KaboumCoordinate o)
o - the Coordinate with which this Coordinate
is being compared
Coordinate
is less than, equal to, or greater than the specified Coordinatepublic static int stoi(java.lang.String str)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||