|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Polygon
jurpe.dungeon.crawler.Hexagon
public class Hexagon
A hexagon.
| Field Summary |
|---|
| Fields inherited from class java.awt.Polygon |
|---|
npoints, xpoints, ypoints |
| Constructor Summary | |
|---|---|
Hexagon(int x,
int y,
int w,
int h)
Create a new hexagon. |
|
Hexagon(java.awt.Point center,
int w,
int h)
Create a new hexagon. |
|
| Method Summary | |
|---|---|
java.awt.Point |
getCenter()
|
int[] |
getSide(Direction dir)
Get the coordinates of 1 side of hexagon |
double |
height()
Get the height. |
static void |
main(java.lang.String[] args)
|
double |
radius()
Get radius |
java.lang.String |
toString()
Return to string pepresentation of this object. |
int |
width()
Get the width. |
| Methods inherited from class java.awt.Polygon |
|---|
addPoint, contains, contains, contains, contains, contains, contains, getBoundingBox, getBounds, getBounds2D, getPathIterator, getPathIterator, inside, intersects, intersects, invalidate, reset, translate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Hexagon(int x,
int y,
int w,
int h)
x - the x coordinate of the center point.y - the y coordinate of the center point.w - width of the hexagon.h - height of the hexagon.
public Hexagon(java.awt.Point center,
int w,
int h)
center - the center point.w - width of the hexagon.h - height of the hexagon.| Method Detail |
|---|
public java.awt.Point getCenter()
public int[] getSide(Direction dir)
dir - Direction from the center
public double height()
public int width()
public double radius()
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
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 | |||||||||