public class RMBezier extends RMQuadratic
Modifier and Type | Field and Description |
---|---|
RMPoint |
_cp2 |
_cp1
Constructor and Description |
---|
RMBezier()
Creates a new bezier.
|
RMBezier(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
Creates a new bezier from the given start point, control points and end point.
|
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 |
---|---|
RMMath.RMFunc |
getArcLengthFunction()
Returns an RMFunc which calculates the arclength of the curve up to t.
|
static void |
getBounds(double x0,
double y0,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
java.awt.geom.Rectangle2D aRect)
Returns the bounds of the bezier.
|
void |
getBounds(java.awt.geom.Rectangle2D aRect)
Returns the bounds.
|
double |
getDistance(RMPoint aPoint)
Returns the minimum distance from the given point to this segment.
|
double |
getDistanceBezier(RMPoint aPoint)
Returns the minimum distance from the given point to the curve.
|
RMLine |
getHead(double t)
Returns a new line from this line's start point to given parametric location t (defined from 0-1) on this line.
|
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,
RMPoint aPoint)
Returns a specific point on the curve at the given parametric value (from 0-1).
|
int |
getPointCount()
Returns the point count of segment.
|
double |
getPointX(int anIndex)
Returns the x of point at given index.
|
double |
getPointY(int anIndex)
Returns the y of point at given index.
|
RMLine |
getTail(double t)
Returns a new line from given parametric location t (defined from 0-1) on this line to this line's end point.
|
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.
|
getArcLength, getBounds, getDistanceQuadratic, getInverseArcLengthFunction, getParameterForLength, setCurve, setCurve, subdivide
clone, getAngle, getArcLength, getArcLength, getBounds, getDistanceLine, getDistanceLineSquared, getDistanceLineSquared, getHitInfo, getLastX, getLastY, getPoint, getTangent
public RMPoint _cp2
public RMBezier()
public RMBezier(RMPoint startPoint, RMPoint controlPoint1, RMPoint controlPoint2, RMPoint endPoint)
public RMBezier(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
public void setCurve(RMPoint p1, RMPoint p2, RMPoint p3, RMPoint p4)
public RMPoint getPoint(double t, RMPoint aPoint)
getPoint
in class RMQuadratic
public int getPointCount()
getPointCount
in class RMQuadratic
public double getPointX(int anIndex)
getPointX
in class RMQuadratic
public double getPointY(int anIndex)
getPointY
in class RMQuadratic
public double getDistance(RMPoint aPoint)
getDistance
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 void getBounds(java.awt.geom.Rectangle2D aRect)
getBounds
in class RMQuadratic
public static void getBounds(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, java.awt.geom.Rectangle2D aRect)
public RMHitInfo getHitInfo(RMLine aLine)
getHitInfo
in class RMLine
public RMHitInfo getHitInfo(RMBezier aBezier)
getHitInfo
in class RMLine
public RMLine getHead(double t)
public RMLine getTail(double t)
public void subdivide(RMBezier left, RMBezier right, double t)
public void setEnd(double t)
public void setStart(double t)
public RMMath.RMFunc getArcLengthFunction()
getArcLengthFunction
in class RMQuadratic