Class RMQuadratic
- java.lang.Object
- 
- com.inductiveautomation.rm.graphics.RMLine
- 
- com.inductiveautomation.rm.graphics.RMQuadratic
 
 
- 
- 
Constructor SummaryConstructors Constructor Description RMQuadratic()Creates a new quadratic curve.RMQuadratic(double x1, double y1, double x2, double y2, double x3, double y3)Creates a new quadratic curve for this gvein start point, control point and end point.RMQuadratic(RMPoint startPoint, RMPoint controlPoint, RMPoint endPoint)Creates a new quadratic curve for this gvein start point, control point and end point.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetArcLength(float start, float end)Returns the arc length of the segment up to parametric value tRMMath.RMFuncgetArcLengthFunction()Returns an RMFunc which calculates the arclength of the curve up to tstatic voidgetBounds(double x0, double y0, double x1, double y1, double x2, double y2, java.awt.geom.Rectangle2D aRect)Returns the bounds of the bezier.voidgetBounds(java.awt.geom.Rectangle2D aRect)Returns the bounds.doublegetDistance(RMPoint aPoint)Returns the minimum distance from the given point to this segment.doublegetDistanceQuadratic(RMPoint aPoint)Returns the minimum distance from the given point to the curve.RMMath.RMFuncgetInverseArcLengthFunction()Returns an RMFunc which calculates t for a percentage length along the curve.doublegetMaxX()Returns the max x point of this bezier.doublegetMaxY()Returns the max y point of this bezier.doublegetMinX()Returns the min x point of this bezier.doublegetMinY()Returns the min y point of this bezier.floatgetParameterForLength(float l)Returns parametric point t that corresponds to a given length along the curve.RMPointgetPoint(double t, RMPoint aPoint)Returns the point on this curve at the parametric location t (defined from 0-1).intgetPointCount()Returns the point count of segment.doublegetPointX(int anIndex)Returns the x of point at given index.doublegetPointY(int anIndex)Returns the y of point at given index.voidsetCurve(double x1, double y1, double x2, double y2, double x3, double y3)Sets the curve values.voidsetCurve(RMPoint p1, RMPoint p2, RMPoint p3)Sets the curve values.voidsubdivide(RMQuadratic left, RMQuadratic right)Subdivides this curve into the given left and right curves.- 
Methods inherited from class com.inductiveautomation.rm.graphics.RMLineclone, getAngle, getArcLength, getArcLength, getBounds, getDistanceLine, getDistanceLineSquared, getDistanceLineSquared, getHead, getHitInfo, getHitInfo, getHitInfo, getLastX, getLastY, getPoint, getTail, getTangent, setEnd, setStart, toString
 
- 
 
- 
- 
- 
Field Detail- 
_cp1public RMPoint _cp1 
 
- 
 - 
Constructor Detail- 
RMQuadraticpublic RMQuadratic() Creates a new quadratic curve.
 - 
RMQuadraticpublic RMQuadratic(RMPoint startPoint, RMPoint controlPoint, RMPoint endPoint) Creates a new quadratic curve for this gvein start point, control point and end point.
 - 
RMQuadraticpublic RMQuadratic(double x1, double y1, double x2, double y2, double x3, double y3)Creates a new quadratic curve for this gvein start point, control point and end point.
 
- 
 - 
Method Detail- 
setCurvepublic void setCurve(double x1, double y1, double x2, double y2, double x3, double y3)Sets the curve values.
 - 
getPointpublic RMPoint getPoint(double t, RMPoint aPoint) Returns the point on this curve at the parametric location t (defined from 0-1).
 - 
getDistancepublic double getDistance(RMPoint aPoint) Returns the minimum distance from the given point to this segment.- Overrides:
- getDistancein class- RMLine
 
 - 
getDistanceQuadraticpublic double getDistanceQuadratic(RMPoint aPoint) Returns the minimum distance from the given point to the curve.
 - 
getPointCountpublic int getPointCount() Returns the point count of segment.- Overrides:
- getPointCountin class- RMLine
 
 - 
getPointXpublic double getPointX(int anIndex) Returns the x of point at given index.
 - 
getPointYpublic double getPointY(int anIndex) Returns the y of point at given index.
 - 
subdividepublic void subdivide(RMQuadratic left, RMQuadratic right) Subdivides this curve into the given left and right curves.
 - 
getMinXpublic double getMinX() Returns the min x point of this bezier.
 - 
getMinYpublic double getMinY() Returns the min y point of this bezier.
 - 
getMaxXpublic double getMaxX() Returns the max x point of this bezier.
 - 
getMaxYpublic double getMaxY() Returns the max y point of this bezier.
 - 
getBoundspublic void getBounds(java.awt.geom.Rectangle2D aRect) Returns the bounds.
 - 
getBoundspublic static void getBounds(double x0, double y0, double x1, double y1, double x2, double y2, java.awt.geom.Rectangle2D aRect)Returns the bounds of the bezier.
 - 
getArcLengthpublic float getArcLength(float start, float end)Returns the arc length of the segment up to parametric value t- Overrides:
- getArcLengthin class- RMLine
 
 - 
getArcLengthFunctionpublic RMMath.RMFunc getArcLengthFunction() Returns an RMFunc which calculates the arclength of the curve up to t
 - 
getParameterForLengthpublic float getParameterForLength(float l) Returns parametric point t that corresponds to a given length along the curve. l is in the range [0-1] (ie. percentage of total arclength)- Overrides:
- getParameterForLengthin class- RMLine
 
 - 
getInverseArcLengthFunctionpublic RMMath.RMFunc getInverseArcLengthFunction() Returns an RMFunc which calculates t for a percentage length along the curve.
 
- 
 
-