|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.geom.QuadCurve2D java.awt.geom.QuadCurve2D.Double jsim.util.QCurve
public class QCurve
The QCurve class enhances the QuadCurve.Double class (from the java.awt.geom package) by allowing entities to move along such quadratic curves.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.QuadCurve2D |
---|
java.awt.geom.QuadCurve2D.Double, java.awt.geom.QuadCurve2D.Float |
Field Summary | |
---|---|
java.lang.String |
alpha
Scale parameter (e.g., mean) |
java.lang.String |
beta
Shape parameter (e.g., variance) |
java.lang.String |
distribution
Probability distribution |
boolean |
straight
Flag indicating whether curve is actaully a straight line. |
java.lang.String |
stream
Random number stream |
protected static java.util.logging.Logger |
trc
Tracing Messages |
Fields inherited from class java.awt.geom.QuadCurve2D.Double |
---|
ctrlx, ctrly, x1, x2, y1, y2 |
Constructor Summary | |
---|---|
QCurve()
Construct an empty quad curve. |
|
QCurve(double x1,
double y1,
double x2,
double y2)
Construct a straight line (degenerate quad curve). |
|
QCurve(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
Construct a quad curve. |
Method Summary | |
---|---|
java.awt.geom.Point2D.Double |
getControl()
Return the control point of the quad curve. |
int |
getEdgeIndex()
|
java.awt.geom.Point2D.Double |
getFirst()
Return the first/start point of the quad curve. |
java.awt.geom.Point2D.Double |
getLast()
Return the last/end point of the quad curve. |
java.lang.String |
getOutCondition()
|
int |
getOutCondType()
|
Node |
getStartNode()
|
boolean |
isSame(double x,
double y,
double xe,
double ye,
double step)
Are (x, y) and (xe, ye) essentially the same? |
java.awt.geom.Point2D.Double |
next(java.awt.geom.Point2D.Double current,
double step)
Return the next point on the quad curve (step units beyond current). |
boolean |
onQCurve(java.awt.geom.Point2D.Double selected)
|
void |
ReconstructQCurve(double x1,
double y1,
double ctrlx,
double ctrly,
double x2,
double y2)
ReConstruct a quad curve. |
void |
setEdgeIndex(int edgeIndex)
|
void |
setFirst(java.awt.geom.Point2D.Float delta)
Reset first point in curve. |
void |
setFirstFixed(java.awt.geom.Point2D.Float newPoint)
Reset first point in curve to a fixed positon |
void |
setLast(java.awt.geom.Point2D.Float delta)
Reset last point in curve. |
void |
setLastFixed(java.awt.geom.Point2D.Float newPoint)
Reset last point in curve to a fixed position |
void |
setOutCondition(java.lang.String outCondition)
|
void |
setOutCondType(int outCondType)
|
void |
setStartNode(Node startNode)
|
Methods inherited from class java.awt.geom.QuadCurve2D.Double |
---|
getBounds2D, getCtrlPt, getCtrlX, getCtrlY, getP1, getP2, getX1, getX2, getY1, getY2, setCurve |
Methods inherited from class java.awt.geom.QuadCurve2D |
---|
clone, contains, contains, contains, contains, getBounds, getFlatness, getFlatness, getFlatness, getFlatnessSq, getFlatnessSq, getFlatnessSq, getPathIterator, getPathIterator, intersects, intersects, setCurve, setCurve, setCurve, setCurve, solveQuadratic, solveQuadratic, subdivide, subdivide, subdivide |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final boolean straight
public java.lang.String distribution
public java.lang.String alpha
public java.lang.String beta
public java.lang.String stream
protected static java.util.logging.Logger trc
Constructor Detail |
---|
public QCurve()
public QCurve(double x1, double y1, double x2, double y2)
x1
- x coordinate of start pointy1
- y coordinate of start pointx2
- x coordinate of end pointy2
- y coordinate of end pointpublic QCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
x1
- x coordinate of start pointy1
- y coordinate of start pointctrlx
- x coordinate of control pointctrly
- y coordinate of control pointx2
- x coordinate of end pointy2
- y coordinate of end pointMethod Detail |
---|
public void ReconstructQCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2)
x1
- x coordinate of start pointy1
- y coordinate of start pointctrlx
- x coordinate of control pointctrly
- y coordinate of control pointx2
- x coordinate of end pointy2
- y coordinate of end pointpublic java.awt.geom.Point2D.Double getFirst()
public java.awt.geom.Point2D.Double getControl()
public java.awt.geom.Point2D.Double getLast()
public void setFirst(java.awt.geom.Point2D.Float delta)
delta
- translation vectorpublic void setFirstFixed(java.awt.geom.Point2D.Float newPoint)
newPoint
- pointpublic void setLast(java.awt.geom.Point2D.Float delta)
delta
- translation vectorpublic void setLastFixed(java.awt.geom.Point2D.Float newPoint)
newPoint
- pointpublic boolean isSame(double x, double y, double xe, double ye, double step)
public java.awt.geom.Point2D.Double next(java.awt.geom.Point2D.Double current, double step)
current
- the current pointstep
- distance to next point
public boolean onQCurve(java.awt.geom.Point2D.Double selected)
public int getEdgeIndex()
public void setEdgeIndex(int edgeIndex)
public Node getStartNode()
public void setStartNode(Node startNode)
public void setOutCondition(java.lang.String outCondition)
public java.lang.String getOutCondition()
public void setOutCondType(int outCondType)
public int getOutCondType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |