|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscenic.path.CurvedSegment
scenic.path.QuadraticBezierSegment
public class QuadraticBezierSegment
This class defines a quadratic Bezier curve. This class does not define the start point of the curve. The start point is the end point of the previous segment.
| Constructor Summary | |
|---|---|
QuadraticBezierSegment(double x1,
double y1,
double x2,
double y2)
Creates a quadratic bezier 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. |
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 |
getX1()
Gets the x coordinate of second control point. |
double |
getX2()
Gets the x coordinate of third control point. |
double |
getY1()
Gets the y coordinate of second control point. |
double |
getY2()
Gets the y coordinate of third control point. |
| 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 QuadraticBezierSegment(double x1,
double y1,
double x2,
double y2)
x1 - x coordinate of second control point.y1 - y coordinate of second control point.x2 - x coordinate of third control point.y2 - y coordinate of third control point.| Method Detail |
|---|
public double getX1()
public double getY1()
public double getX2()
public double getY2()
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 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 | |||||||||