rl.common.mapping
Class PlanetHexGrid

java.lang.Object
  extended by rl.common.mapping.PlanetHexGrid

public class PlanetHexGrid
extends java.lang.Object


Nested Class Summary
static class PlanetHexGrid.PlanetArea
           
 class PlanetHexGrid.Sector
           
 
Field Summary
protected  int BaseXOffset
           
protected  int BaseYOffset
           
protected  java.awt.Polygon m_ClipRegion
           
 
Constructor Summary
PlanetHexGrid(int size)
           
 
Method Summary
protected  void calculateHexNeighbours(int Size)
           
 void drawGrid(java.awt.Graphics2D comp2D)
           
 void drawHexes(java.awt.Graphics2D comp2D, java.util.Vector<PlanetHexGrid.Sector> sectors, boolean highlight)
           
 int factorial(int num)
           
 java.util.Vector<PlanetHexGrid.Sector> getHexNeighbours(int hexIndex)
           
protected  void getMapBoundary()
           
protected  int getRowEnds(int Row)
           
protected  int getRowStarts(int Row)
           
 PlanetHexGrid.Sector getSector(int hexIndex)
           
 java.awt.Dimension getSize()
           
protected  void initialiseMap(int Size)
           
protected  void initialiseRows()
           
protected  void setWorldClip(java.awt.Graphics2D comp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BaseXOffset

protected final int BaseXOffset
See Also:
Constant Field Values

BaseYOffset

protected final int BaseYOffset
See Also:
Constant Field Values

m_ClipRegion

protected java.awt.Polygon m_ClipRegion
Constructor Detail

PlanetHexGrid

public PlanetHexGrid(int size)
Method Detail

getRowStarts

protected int getRowStarts(int Row)

getRowEnds

protected int getRowEnds(int Row)

getSize

public java.awt.Dimension getSize()

initialiseRows

protected void initialiseRows()

factorial

public int factorial(int num)

initialiseMap

protected void initialiseMap(int Size)

getMapBoundary

protected void getMapBoundary()

drawGrid

public void drawGrid(java.awt.Graphics2D comp2D)

drawHexes

public void drawHexes(java.awt.Graphics2D comp2D,
                      java.util.Vector<PlanetHexGrid.Sector> sectors,
                      boolean highlight)

setWorldClip

protected void setWorldClip(java.awt.Graphics2D comp)

getSector

public PlanetHexGrid.Sector getSector(int hexIndex)

getHexNeighbours

public java.util.Vector<PlanetHexGrid.Sector> getHexNeighbours(int hexIndex)

calculateHexNeighbours

protected void calculateHexNeighbours(int Size)