public class RMBezier extends RMQuadratic
Modifier and Type | Field and Description |
---|---|
RMPoint |
_cp2 |
_cp1
Constructor and Description |
---|
RMBezier()
Creates a new bezier.
|
RMBezier(RMPoint startPoint,
RMPoint controlPoint1,
RMPoint controlPoint2,
RMPoint endPoint)
Creates a new bezier from the given start point, control points and end point.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getBounds2D()
Returns the bounding box of the shape.
|
double |
getDistanceBezier(RMPoint aPoint)
Returns the minimum distance from the given point to the curve.
|
RMHitInfo |
getHitInfo(RMBezier aBezier)
Returns a hit info for this bezier and given bezier.
|
RMHitInfo |
getHitInfo(RMLine aLine)
Returns the hit info for this bezier and a given line.
|
float |
getMaxX()
Returns the max x point of this bezier.
|
float |
getMaxY()
Returns the max y point of this bezier.
|
float |
getMinX()
Returns the min x point of this bezier.
|
float |
getMinY()
Returns the min y point of this bezier.
|
RMPoint |
getPoint(double t)
Returns a specific point on the curve at the given parametric value (from 0-1).
|
void |
setCurve(RMPoint p1,
RMPoint p2,
RMPoint p3,
RMPoint p4)
Sets the values of the curve.
|
void |
setEnd(double t)
Reset this curve's end point to the given parametric location (0-1).
|
void |
setStart(double t)
Reset this curve's start point to the given parametric location (0-1).
|
void |
subdivide(RMBezier left,
RMBezier right,
double t)
Returns a bezier curve from this curve's start point to the given parametric location (0-1).
|
java.lang.String |
toString()
Returns a string representation of this bezier.
|
getDistanceQuadratic, setCurve, setCurve, subdivide
getDistanceLine, getDistanceToLineSquared, getHead, getHitInfo, getTail
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public RMPoint _cp2
public void setCurve(RMPoint p1, RMPoint p2, RMPoint p3, RMPoint p4)
public RMPoint getPoint(double t)
getPoint
in class RMQuadratic
public double getDistanceBezier(RMPoint aPoint)
public float getMinX()
getMinX
in class RMQuadratic
public float getMinY()
getMinY
in class RMQuadratic
public float getMaxX()
getMaxX
in class RMQuadratic
public float getMaxY()
getMaxY
in class RMQuadratic
public java.awt.geom.Rectangle2D getBounds2D()
public RMHitInfo getHitInfo(RMLine aLine)
getHitInfo
in class RMLine
public RMHitInfo getHitInfo(RMBezier aBezier)
getHitInfo
in class RMLine
public void subdivide(RMBezier left, RMBezier right, double t)
public void setEnd(double t)
public void setStart(double t)