|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmhframework.tilemap.MHIsoMouseMap
public class MHIsoMouseMap
Mouse map for isometric tile maps. The getDirection() method in this class accepts an (x, y) pair representing a fine mouse map coordinate, and then returns a constant indicating the direction to perform a tile walk in order to identify the proper map coordinate containing the mouse point.
The current version of this class is hard-coded to work only for isometric tiles with dimensions 128x64.
Field Summary | |
---|---|
static int |
CENTER
Constant indicating center of mouse map. |
static int |
HEIGHT
The height of the mouse map matrix. |
static int |
WIDTH
The width of the mouse map matrix. |
Constructor Summary | |
---|---|
MHIsoMouseMap()
Constructor. |
Method Summary | |
---|---|
int |
getDirection(int mouseX,
int mouseY)
Returns the direction to be "walked" in order for the mouse point to be accurately interpreted as a map position. |
static void |
main(java.lang.String[] args)
For testing only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CENTER
public static final int WIDTH
public static final int HEIGHT
Constructor Detail |
---|
public MHIsoMouseMap()
Method Detail |
---|
public int getDirection(int mouseX, int mouseY)
mouseX
- The x coordinate of a fine mouse map point.mouseY
- The y coordinate of a fine mouse map point.
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |