|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscenic.path.CurvedSegment
scenic.path.ArcSegment
public class ArcSegment
This class defines an elliptical arc. This class does not define the start point of the arc. The start point is the end point of the previous segment.
| Constructor Summary | |
|---|---|
ArcSegment(double xRadius,
double yRadius,
double rotation,
double startAngle,
double stopAngle)
Creates an elliptic arc segment with the given parameters. |
|
| Method Summary | |
|---|---|
java.awt.geom.Point2D.Double |
calcPoint(double t,
java.awt.geom.Point2D.Double position)
Calculates the position of the segment at the given t value. |
java.awt.geom.Point2D.Double |
calcRelativePoint(double t)
Calculates the point along the arc, when the center of the ellipse is thought to be at (0, 0). |
void |
getBounds(java.awt.geom.AffineTransform transform,
java.awt.Rectangle r,
java.awt.geom.Point2D.Double position)
Gets the bounds of this segment using the given transform. |
double |
getRotation()
Gets the rotation of the ellipse in degrees. |
double |
getStartAngle()
Gets the start angle of the arc in degrees. |
double |
getStopAngle()
Gets the stop angle of the arc in degrees. |
double |
getXRadius()
Gets the x radius of the ellipse. |
double |
getYRadius()
Gets the y radius of the ellipse. |
| Methods inherited from class scenic.path.CurvedSegment |
|---|
walk |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArcSegment(double xRadius,
double yRadius,
double rotation,
double startAngle,
double stopAngle)
xRadius - x radius of the ellipse.yRadius - y radius of the ellipse.rotation - rotation of the ellipse in degrees.startAngle - start angle of the arc in degrees.stopAngle - stop angle of the arc in degrees.| Method Detail |
|---|
public double getXRadius()
public double getYRadius()
public double getRotation()
public double getStartAngle()
public double getStopAngle()
public java.awt.geom.Point2D.Double calcPoint(double t,
java.awt.geom.Point2D.Double position)
CurvedSegment
calcPoint in class CurvedSegmentt - the t value (must be in the range [0, 1]).position - the previous position.
public java.awt.geom.Point2D.Double calcRelativePoint(double t)
t - the place along the arc (must be inside the rangle [0, 1]).
public void getBounds(java.awt.geom.AffineTransform transform,
java.awt.Rectangle r,
java.awt.geom.Point2D.Double position)
Segment
transform - the transformr - the bounds.position - the start position.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||