public class LineArc2D extends AbstractLine2D implements SmoothOrientedCurve2D, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected double |
t0 |
protected double |
t1 |
dx, dy, x0, y0| Constructor and Description |
|---|
LineArc2D(double x1,
double y1,
double dx,
double dy,
double t0,
double t1)
Construct a line arc by the parameters of the supporting line and two
positions on the line.
|
LineArc2D(LineArc2D line)
Construction by copy of another line arc
|
LineArc2D(LinearShape2D line,
double t0,
double t1)
Construct a line arc contained in the same straight line as first
argument, with bounds of arc given by t0 and t1
|
LineArc2D(Point2D point1,
Point2D point2,
double t0,
double t1) |
| Modifier and Type | Method and Description |
|---|---|
GeneralPath |
appendPath(GeneralPath path)
Appends a line to the current path.
|
LineArc2D |
clone()
Ensures public declaration of clone(), and ensures valid return type.
|
boolean |
contains(double xp,
double yp)
Checks if the shape contains the planar point defined by (x,y).
|
boolean |
contains(Point2D pt)
Checks if the shape contains the given point.
|
LineArc2D |
create(Point2D p1,
Point2D p2,
double t0,
double t1)
Static factory for creating a new LineArc2D
|
boolean |
equals(Object obj) |
Box2D |
getBoundingBox()
Returns the bounding box of the shape.
|
Collection<? extends LineArc2D> |
getContinuousCurves()
Returns the collection of continuous curves which constitute this curve.
|
Point2D |
getFirstPoint()
Return the first point of the edge.
|
GeneralPath |
getGeneralPath() |
Point2D |
getLastPoint()
Return the last point of the edge.
|
double |
getLength()
Returns the length of the line arc.
|
LineArc2D |
getParallel(double d)
Creates a new curve, formed by the points with parameterization:
p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of
the original curve, n(t) the normal of the curve, and |n| being the
norm of n.In the case of a continuous curve formed by several smooth circulinear elements, the parallels of contiguous elements are joined by a circle arc. |
Point2D |
getPoint(double t)
Gets the point from a parametric representation of the curve.
|
Point2D |
getPoint1()
Return the first point of the line arc.
|
Point2D |
getPoint2()
Return the last point of the line arc.
|
LineArc2D |
getReverseCurve()
Returns the line arc which have the same trace, but has the inverse
parameterization.
|
Collection<Point2D> |
getSingularPoints()
Returns an empty set of Point2D, as a smooth curve does not have
singular points by definition.
|
LineArc2D |
getSubCurve(double t0,
double t1)
Returns a new LineArc2D, which is the portion of this LineArc2D delimited
by parameters t0 and t1.
|
double |
getT0()
Returns the parameter of the first point of the line arc,
arbitrarily set to 0.
|
double |
getT1()
Returns the parameter of the last point of the line arc,
arbitrarily set to 1.
|
double |
getX1() |
double |
getX2() |
double |
getY1() |
double |
getY2() |
boolean |
isBounded()
return true if both t0 and t1 are different from infinity.
|
boolean |
isSingular(double pos)
Returns always false, as a smooth curve does not have singular points
by definition.
|
String |
toString() |
LineArc2D |
transform(AffineTransform2D trans)
Transforms the curve by an affine transform.
|
clip, getBuffer, getCartesianEquation, getCurvature, getDistance, getDistance, getHorizontalAngle, getIntersection, getIntersection, getIntersections, getLength, getOrigin, getParallel, getParametric, getPerpendicular, getPolarCoefficients, getPosition, getPosition, getPositionOnLine, getPositionOnLine, getProjectedPoint, getProjectedPoint, getSignedDistance, getSignedDistance, getSignedPolarCoefficients, getSmoothPieces, getSupportingLine, getSymmetric, getSymmetric, getTangent, getVector, getWindingAngle, isClosed, isColinear, isColinear, isEmpty, isInside, isParallel, isParallel, project, supportContains, transformgetLeftTangent, getRightTangentdraw, getAsAWTShape, getAsPolyline, wrapCurvefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclipgetCurvature, getTangentgetAsPolyline, getLeftTangent, getRightTangent, getSmoothPieces, isClosedgetSignedDistance, getSignedDistance, getWindingAngle, isInsidedraw, getAsAWTShape, getIntersections, getPosition, projectgetDistance, getDistance, isEmptypublic LineArc2D(Point2D point1, Point2D point2, double t0, double t1)
point1 - the point located at t=0point2 - the point located at t=1t0 - the lower bound of line arc parameterizationt1 - the upper bound of line arc parameterizationpublic LineArc2D(LinearShape2D line, double t0, double t1)
line - an object defining the supporting linet0 - the lower bound of line arc parameterizationt1 - the upper bound of line arc parameterizationpublic LineArc2D(LineArc2D line)
line - the line to copypublic LineArc2D(double x1,
double y1,
double dx,
double dy,
double t0,
double t1)
x1 - the x-coordinate of the first pointy1 - the y-coordinate of the first pointdx - the x-coordinate of the direction vectordy - the y-coordinate of the direction vectort0 - the starting position of the arct1 - the ending position of the arcpublic LineArc2D create(Point2D p1, Point2D p2, double t0, double t1)
public double getLength()
getLength in interface CirculinearCurve2DgetLength in class AbstractLine2Dpublic Point2D getPoint1()
public Point2D getPoint2()
public double getX1()
public double getY1()
public double getX2()
public double getY2()
public LineArc2D getParallel(double d)
CirculinearCurve2D p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of
the original curve, n(t) the normal of the curve, and |n| being the
norm of n.getParallel in interface CirculinearContinuousCurve2DgetParallel in interface CirculinearCurve2DgetParallel in interface CirculinearElement2DgetParallel in interface ContinuousCirculinearCurve2Dd - the distance between the original curve and he parallel curve.public double getT0()
public double getT1()
public Point2D getPoint(double t)
Curve2Dpublic Point2D getFirstPoint()
getFirstPoint in interface Curve2DgetFirstPoint in class AbstractContinuousCurve2Dpublic Point2D getLastPoint()
getLastPoint in interface Curve2DgetLastPoint in class AbstractContinuousCurve2Dpublic Collection<Point2D> getSingularPoints()
AbstractSmoothCurve2DgetSingularPoints in interface Curve2DgetSingularPoints in class AbstractSmoothCurve2DCurve2D.getSingularPoints()public boolean isSingular(double pos)
AbstractSmoothCurve2DisSingular in interface Curve2DisSingular in class AbstractSmoothCurve2Dpos - the position of the point on the curveCurve2D.isSingular(double)public Collection<? extends LineArc2D> getContinuousCurves()
Curve2DgetContinuousCurves in interface CirculinearCurve2DgetContinuousCurves in interface Curve2DgetContinuousCurves in class AbstractLine2Dpublic LineArc2D getReverseCurve()
getReverseCurve in interface CirculinearContinuousCurve2DgetReverseCurve in interface CirculinearCurve2DgetReverseCurve in interface CirculinearElement2DgetReverseCurve in interface ContinuousCirculinearCurve2DgetReverseCurve in interface ContinuousCurve2DgetReverseCurve in interface Curve2DgetReverseCurve in interface SmoothCurve2DgetReverseCurve in interface ContinuousOrientedCurve2DgetReverseCurve in interface OrientedCurve2DgetReverseCurve in interface SmoothOrientedCurve2Dpublic LineArc2D getSubCurve(double t0, double t1)
getSubCurve in interface CirculinearContinuousCurve2DgetSubCurve in interface CirculinearCurve2DgetSubCurve in interface CirculinearElement2DgetSubCurve in interface ContinuousCirculinearCurve2DgetSubCurve in interface ContinuousCurve2DgetSubCurve in interface Curve2DgetSubCurve in interface SmoothCurve2DgetSubCurve in interface ContinuousOrientedCurve2DgetSubCurve in interface SmoothOrientedCurve2DgetSubCurve in class AbstractLine2Dt0 - position of the start of the sub-curvet1 - position of the end of the sub-curvepublic boolean isBounded()
public Box2D getBoundingBox()
Shape2DgetBoundingBox in interface Shape2Dpublic boolean contains(Point2D pt)
Shape2Dcontains in interface Shape2Dcontains in class AbstractLine2Dpublic boolean contains(double xp,
double yp)
Shape2Dpublic GeneralPath getGeneralPath()
public GeneralPath appendPath(GeneralPath path)
appendPath in interface ContinuousCurve2Dpath - the path to modifypublic LineArc2D transform(AffineTransform2D trans)
Curve2Dtransform in interface ContinuousCurve2Dtransform in interface Curve2Dtransform in interface SmoothCurve2Dtransform in interface ContinuousOrientedCurve2Dtransform in interface OrientedCurve2Dtransform in interface SmoothOrientedCurve2Dtransform in interface LinearShape2Dtransform in interface Shape2Dtransform in class AbstractLine2Dtrans - an affine transformpublic LineArc2D clone()
AbstractLine2Dclone in interface Curve2Dclone in class AbstractLine2DCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.