|
|||||||||||
| 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.IsoscelesTriangle
IsoscelesTriangle class. A class used to represent a isosceles triangle 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 |
TRIANGLESIDE_BOTTOM
A const vertext type represents the bottom side of an isosceles triangle |
static int |
TRIANGLESIDE_LEFT
A const vertext type represents the left inclined side of an isosceles triangle |
static int |
TRIANGLESIDE_RIGHT
A const vertext type represents the right inclined side of an isosceles triangle |
static int |
TRIANGLEVERTEX_LEFT
A const vertext type represents the left vertex of an isosceles triangle |
static int |
TRIANGLEVERTEX_RIGHT
A const vertext type represents the right vertex of an isosceles triangle |
static int |
TRIANGLEVERTEX_TOP
A const vertext type represents the top vertex of an isosceles triangle |
| 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 | |
IsoscelesTriangle()
Constructor for IsoscelesTriangle. |
|
IsoscelesTriangle(IsoscelesTriangle triangle)
Constructor for IsoscelesTriangle. |
|
| 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 triangle. |
LineSeg |
getTriangleSide(int sideType)
Get a side line of this triangle. |
JFPoint |
getTriangleVertex(int vertexType)
Get a vertex of this triangle. |
boolean |
intersects(double x1,
double y1,
double x2,
double y2)
Tests if the specified line segment intersects the interior of this IsoscelesTriangle. |
boolean |
intersects(double x1,
double y1,
int pickOffset)
Tests if the specified point intersects any side of this triangle. |
boolean |
intersects(LineSeg line)
Tests if the specified line segment intersects the interior of this IsoscelesTriangle. |
boolean |
intersects(Rect rect)
Tests if the specified rectangle intersects the interior of this IsoscelesTriangle. |
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 TRIANGLEVERTEX_TOP
public static final int TRIANGLEVERTEX_LEFT
public static final int TRIANGLEVERTEX_RIGHT
public static final int TRIANGLESIDE_LEFT
public static final int TRIANGLESIDE_RIGHT
public static final int TRIANGLESIDE_BOTTOM
| Constructor Detail |
public IsoscelesTriangle()
public IsoscelesTriangle(IsoscelesTriangle triangle)
triangle - A triangle object.| Method Detail |
public JFPoint getTriangleVertex(int vertexType)
vertexType - A triangle vertex type.
public LineSeg getTriangleSide(int sideType)
sideType - A side type of this triangle.
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)
IsoscelesTriangle.
intersects in class Recttrue if the specified line segment intersects
the interior of this IsoscelesTriangle; false
otherwise.public boolean intersects(LineSeg line)
IsoscelesTriangle.
intersects in class Rectline - the specified LineSeg to test for intersection
with the interior of this IsoscelesTriangle
true if the specified LineSeg
intersects the interior of this IsoscelesTriangle;
false otherwise.public boolean intersects(Rect rect)
IsoscelesTriangle.
intersects in class Rectrect - the specified IsoscelesTriangle to test for intersection
with the interior of this IsoscelesTriangle
true if the specified IsoscelesTriangle
intersects the interior of this IsoscelesTriangle;
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 | ||||||||||