|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jfimagine.jfgraph.geom.Rect
|
+--com.jfimagine.jfgraph.geom.Hexagon
Hexagon class. A class used to represent a hexagon in the plane with double coordinates.
Attention: Here we used a clockwise quadrant system. And the first quadrant is under right bottom corner.
| Field Summary | |
static int |
HEXAGONSIDE_BOTTOM
A const vertext type represents the bottom side of an hexagon |
static int |
HEXAGONSIDE_LEFTBOTTOM
A const vertext type represents the left bottom inclined side of an hexagon |
static int |
HEXAGONSIDE_LEFTTOP
A const vertext type represents the left top inclined side of an hexagon |
static int |
HEXAGONSIDE_RIGHTBOTTOM
A const vertext type represents the right bottom inclined side of an hexagon |
static int |
HEXAGONSIDE_RIGHTTOP
A const vertext type represents the right top inclined side of an hexagon |
static int |
HEXAGONSIDE_TOP
A const vertext type represents the top side of an hexagon |
static int |
HEXAGONVERTEX_LEFTBOTTOM
A const vertext type represents the left bottom vertex of an hexagon |
static int |
HEXAGONVERTEX_LEFTMIDDLE
A const vertext type represents the left middle vertex of an hexagon |
static int |
HEXAGONVERTEX_LEFTTOP
A const vertext type represents the left top vertex of an hexagon |
static int |
HEXAGONVERTEX_RIGHTBOTTOM
A const vertext type represents the right bottom vertex of an hexagon |
static int |
HEXAGONVERTEX_RIGHTMIDDLE
A const vertext type represents the right middle vertex of an hexagon |
static int |
HEXAGONVERTEX_RIGHTTOP
A const vertext type represents the right top vertex of an hexagon |
| Fields inherited from class com.jfimagine.jfgraph.geom.Rect |
m_leftBottom, m_leftTop, m_rightBottom, m_rightTop, SIDETYPE_BOTTOM, SIDETYPE_LEFT, SIDETYPE_RIGHT, SIDETYPE_TOP, VERTEXMOVETYPE_ISOSCELESTRAPEZOID, VERTEXMOVETYPE_PARALLEL, VERTEXMOVETYPE_RECTANGLE, VERTEXMOVETYPE_SCALE, VERTEXMOVETYPE_TRAPEZOID, VERTEXTYPE_LEFTBOTTOM, VERTEXTYPE_LEFTTOP, VERTEXTYPE_RIGHTBOTTOM, VERTEXTYPE_RIGHTTOP |
| Constructor Summary | |
Hexagon()
Constructor for Hexagon. |
|
Hexagon(Hexagon hexagon)
Constructor for Hexagon. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates a new object of the same class and with the same contents as this object. |
boolean |
contains(double x,
double y)
Test if a point(x, y coordinates for instead) is within this hexagon. |
LineSeg |
getHexagonSide(int sideType)
Get a side line of this hexagon. |
JFPoint |
getHexagonVertex(int vertexType)
Get a vertex of this hexagon. |
boolean |
intersects(double x1,
double y1,
double x2,
double y2)
Tests if the specified line segment intersects the interior of this Hexagon. |
boolean |
intersects(double x1,
double y1,
int pickOffset)
Tests if the specified point intersects any side of this hexagon. |
boolean |
intersects(LineSeg line)
Tests if the specified line segment intersects the interior of this Hexagon. |
boolean |
intersects(Rect rect)
Tests if the specified rectangle intersects the interior of this Hexagon. |
LineSeg |
pickLine(double x,
double y,
double pickOffset)
Pick a line segment of this triangle by a point with a pickoffset. |
| Methods inherited from class com.jfimagine.jfgraph.geom.Rect |
canAddPort, contains, equals, flipBy, flipBy, getBounds, getCenter, getHeight, getSide, getVertex, getWidth, getX, getY, hashCode, intersects, mirrorBy, mirrorBy, moveBy, moveVertex, newScaleCenter, rotateBy, rotateBy, rotateBy, scaleBy, scaleBy, setValue, setValue, setVertex, setVertex, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int HEXAGONVERTEX_LEFTTOP
public static final int HEXAGONVERTEX_LEFTMIDDLE
public static final int HEXAGONVERTEX_LEFTBOTTOM
public static final int HEXAGONVERTEX_RIGHTTOP
public static final int HEXAGONVERTEX_RIGHTMIDDLE
public static final int HEXAGONVERTEX_RIGHTBOTTOM
public static final int HEXAGONSIDE_LEFTTOP
public static final int HEXAGONSIDE_TOP
public static final int HEXAGONSIDE_RIGHTTOP
public static final int HEXAGONSIDE_RIGHTBOTTOM
public static final int HEXAGONSIDE_BOTTOM
public static final int HEXAGONSIDE_LEFTBOTTOM
| Constructor Detail |
public Hexagon()
public Hexagon(Hexagon hexagon)
hexagon - A hexagon object.| Method Detail |
public JFPoint getHexagonVertex(int vertexType)
vertexType - A hexagon vertex type.
public LineSeg getHexagonSide(int sideType)
sideType - A side type of this hexagon.
public boolean contains(double x,
double y)
contains in class Rectx - X coordinate of this point.y - Y coordinate of this point.
public boolean intersects(double x1,
double y1,
int pickOffset)
intersects in class RectpickOffset - An analog offset for 'pick' this line.
true if the specified point intersects one side of this rectangle.
false otherwise.
public LineSeg pickLine(double x,
double y,
double pickOffset)
pickLine in class Rectx - X coordinate of this point.y - Y coordinate of this point.pickOffset - An analog pick offset that great equal than 0.
public boolean intersects(double x1,
double y1,
double x2,
double y2)
Hexagon.
intersects in class Recttrue if the specified line segment intersects
the interior of this Hexagon; false
otherwise.public boolean intersects(LineSeg line)
Hexagon.
intersects in class Rectline - the specified LineSeg to test for intersection
with the interior of this Hexagon
true if the specified LineSeg
intersects the interior of this Hexagon;
false otherwise.public boolean intersects(Rect rect)
Hexagon.
intersects in class Rectrect - the specified Hexagon to test for intersection
with the interior of this Hexagon
true if the specified Hexagon
intersects the interior of this Hexagon;
false otherwise.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class Rectjava.lang.CloneNotSupportedException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||