|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjurpe.dungeon.hexmap.HexMapGeometry
public class HexMapGeometry
Geometry helper class for HexMap JComponent. In this class all hexparts calculation is handled. Also, matrix corrispondence between hexagons and physical hexagon representation is handles.
Field Summary | |
---|---|
HexMapDrawing |
drawing
|
Constructor Summary | |
---|---|
HexMapGeometry(HexMap map)
|
Method Summary | |
---|---|
HexagonCalc |
getCurrentHexagon()
|
HexagonCalc |
getHexagonCalc(java.awt.Point c)
Convert hexagon geometry coordinates into HexMap physical coordinates |
HexMap |
getHexMap()
|
ViewMapPoint |
getLogicalCoordinatesFromPhysical(MapView view,
java.awt.Point c)
Get logical hexagon center coordinates, given the hexagon physical coordinates |
java.awt.Point |
getPhysicalCenterCoordinates(int x,
int y)
Get physical hexagon center coordinates, given some physical coordinates inside the hexagon |
HexMapPoint |
getPhysicalCoordinatesFromLogical(ViewMapPoint vP)
Get the physical center coordinates from logical coordinates |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public HexMapDrawing drawing
Constructor Detail |
---|
public HexMapGeometry(HexMap map)
Method Detail |
---|
public HexMap getHexMap()
public HexagonCalc getCurrentHexagon()
public java.awt.Point getPhysicalCenterCoordinates(int x, int y)
x
- X logical coordinate of hexagony
- Y logical coordinate of hexagon
public HexMapPoint getPhysicalCoordinatesFromLogical(ViewMapPoint vP)
vP
- ViewMap point
public ViewMapPoint getLogicalCoordinatesFromPhysical(MapView view, java.awt.Point c)
view
- Current viewmapc
- Physical Coordinates
public HexagonCalc getHexagonCalc(java.awt.Point c)
c
- Coordinates of hexagon
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |