public class RMLine extends RMObject
Constructor and Description |
---|
RMLine()
Creates a new line.
|
RMLine(float x1,
float y1,
float x2,
float y2)
Creates a new line for the given x & y start/end points.
|
RMLine(RMPoint startPoint,
RMPoint endPoint)
Creates a new line for the given start point and end point.
|
Modifier and Type | Method and Description |
---|---|
double |
getDistanceLine(RMPoint aPoint)
Returns the minimum distance from the given point to this line.
|
static double |
getDistanceToLineSquared(double p0x,
double p0y,
double p1x,
double p1y,
double p2x,
double p2y)
Returns the distance from the given point components (p0) to the given line components (p1->p2).
|
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 object for this line and the given bezier.
|
RMHitInfo |
getHitInfo(RMLine aLine)
Returns a hit info object for this line and the given line.
|
RMHitInfo |
getHitInfo(RMQuadratic aCurve)
Returns a hit info object for this line and the given bezier curve.
|
float |
getMaxX()
Returns the max x point of this line.
|
float |
getMaxY()
Returns the max y point of this line.
|
float |
getMinX()
Returns the min x point of this line.
|
float |
getMinY()
Returns the min y point of this line.
|
RMPoint |
getPoint(double t)
Returns the point on this line at the parametric location t (defined from 0-1).
|
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 |
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).
|
java.lang.String |
toString()
Returns a string representation of this line.
|
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public RMLine()
public RMLine(float x1, float y1, float x2, float y2)
public RMPoint getPoint(double t)
public double getDistanceLine(RMPoint aPoint)
public static double getDistanceToLineSquared(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y)
public float getMinX()
public float getMinY()
public float getMaxX()
public float getMaxY()
public RMLine getHead(double t)
public RMLine getTail(double t)
public void setEnd(double t)
public void setStart(double t)
public RMHitInfo getHitInfo(RMLine aLine)
public RMHitInfo getHitInfo(RMQuadratic aCurve)
public RMHitInfo getHitInfo(RMBezier aBezier)
public java.lang.String toString()
toString
in class java.lang.Object