|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Polygon
rl.common.mapping.Hexagon
public class Hexagon
Title: Legatus
Copyright: Copyright Daniel Cleyne (c) 2004-2006
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary | |
|---|---|
(package private) static long |
serialVersionUID
|
| Fields inherited from class java.awt.Polygon |
|---|
bounds, npoints, xpoints, ypoints |
| Constructor Summary | |
|---|---|
Hexagon()
|
|
Hexagon(int xOffset,
int yOffset)
|
|
| Method Summary | |
|---|---|
void |
draw(java.awt.Graphics comp)
|
boolean |
equals(java.lang.Object o)
|
java.awt.Rectangle |
getBounds()
|
java.awt.Point |
getCenter()
|
static int |
getHeight()
|
java.awt.Point |
getHexSideEndPoint(int hexSide)
|
java.awt.Point |
getHexSideMidPoint(int hexSide)
Returns the point that represents the 'mid' point fo a hex side. |
java.awt.Point |
getHexSideStartPoint(int hexSide)
Returns the point the represents the 'start' point fo a hex side. |
static int |
getReverseFacing(int facing)
|
static int |
getWidth()
|
static int |
getXIncrement()
|
static int |
getYIncrement()
|
int |
hashCode()
|
boolean |
isIntersectedBy(int x0,
int y0,
int x1,
int y1)
Returns true if this hex is intersected by the line Changed arguments to int : DC |
(package private) void |
offset(int XOffset,
int YOffset)
|
(package private) void |
offset(java.awt.Point aPoint)
|
java.lang.String |
toString()
|
static int |
turns(int x0,
int y0,
int x1,
int y1,
int x2,
int y2)
From Megamek class IdealHex Tests whether a line intersects a point or the point passes to the left or right of the line. |
| Methods inherited from class java.awt.Polygon |
|---|
addPoint, contains, contains, contains, contains, contains, contains, getBoundingBox, getBounds2D, getPathIterator, getPathIterator, inside, intersects, intersects, invalidate, reset, translate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
| Constructor Detail |
|---|
public Hexagon()
public Hexagon(int xOffset,
int yOffset)
| Method Detail |
|---|
public java.awt.Rectangle getBounds()
getBounds in interface java.awt.ShapegetBounds in class java.awt.Polygonpublic static int getWidth()
public static int getHeight()
public static int getXIncrement()
public static int getYIncrement()
public static int getReverseFacing(int facing)
void offset(java.awt.Point aPoint)
void offset(int XOffset,
int YOffset)
public java.awt.Point getCenter()
public boolean equals(java.lang.Object o)
equals in class java.lang.Object
public boolean isIntersectedBy(int x0,
int y0,
int x1,
int y1)
public static int turns(int x0,
int y0,
int x1,
int y1,
int x2,
int y2)
public java.awt.Point getHexSideStartPoint(int hexSide)
hexSide -
public java.awt.Point getHexSideEndPoint(int hexSide)
public java.awt.Point getHexSideMidPoint(int hexSide)
hexSide -
public void draw(java.awt.Graphics comp)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||