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, transform
getLeftTangent, getRightTangent
draw, getAsAWTShape, getAsPolyline, wrapCurve
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clip
getCurvature, getTangent
getAsPolyline, getLeftTangent, getRightTangent, getSmoothPieces, isClosed
getSignedDistance, getSignedDistance, getWindingAngle, isInside
draw, getAsAWTShape, getIntersections, getPosition, project
getDistance, getDistance, isEmpty
public 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 CirculinearCurve2D
getLength
in class AbstractLine2D
public 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 CirculinearContinuousCurve2D
getParallel
in interface CirculinearCurve2D
getParallel
in interface CirculinearElement2D
getParallel
in interface ContinuousCirculinearCurve2D
d
- the distance between the original curve and he parallel curve.public double getT0()
public double getT1()
public Point2D getPoint(double t)
Curve2D
public Point2D getFirstPoint()
getFirstPoint
in interface Curve2D
getFirstPoint
in class AbstractContinuousCurve2D
public Point2D getLastPoint()
getLastPoint
in interface Curve2D
getLastPoint
in class AbstractContinuousCurve2D
public Collection<Point2D> getSingularPoints()
AbstractSmoothCurve2D
getSingularPoints
in interface Curve2D
getSingularPoints
in class AbstractSmoothCurve2D
Curve2D.getSingularPoints()
public boolean isSingular(double pos)
AbstractSmoothCurve2D
isSingular
in interface Curve2D
isSingular
in class AbstractSmoothCurve2D
pos
- the position of the point on the curveCurve2D.isSingular(double)
public Collection<? extends LineArc2D> getContinuousCurves()
Curve2D
getContinuousCurves
in interface CirculinearCurve2D
getContinuousCurves
in interface Curve2D
getContinuousCurves
in class AbstractLine2D
public LineArc2D getReverseCurve()
getReverseCurve
in interface CirculinearContinuousCurve2D
getReverseCurve
in interface CirculinearCurve2D
getReverseCurve
in interface CirculinearElement2D
getReverseCurve
in interface ContinuousCirculinearCurve2D
getReverseCurve
in interface ContinuousCurve2D
getReverseCurve
in interface Curve2D
getReverseCurve
in interface SmoothCurve2D
getReverseCurve
in interface ContinuousOrientedCurve2D
getReverseCurve
in interface OrientedCurve2D
getReverseCurve
in interface SmoothOrientedCurve2D
public LineArc2D getSubCurve(double t0, double t1)
getSubCurve
in interface CirculinearContinuousCurve2D
getSubCurve
in interface CirculinearCurve2D
getSubCurve
in interface CirculinearElement2D
getSubCurve
in interface ContinuousCirculinearCurve2D
getSubCurve
in interface ContinuousCurve2D
getSubCurve
in interface Curve2D
getSubCurve
in interface SmoothCurve2D
getSubCurve
in interface ContinuousOrientedCurve2D
getSubCurve
in interface SmoothOrientedCurve2D
getSubCurve
in class AbstractLine2D
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curvepublic boolean isBounded()
public Box2D getBoundingBox()
Shape2D
getBoundingBox
in interface Shape2D
public boolean contains(Point2D pt)
Shape2D
contains
in interface Shape2D
contains
in class AbstractLine2D
public boolean contains(double xp, double yp)
Shape2D
public GeneralPath getGeneralPath()
public GeneralPath appendPath(GeneralPath path)
appendPath
in interface ContinuousCurve2D
path
- the path to modifypublic LineArc2D transform(AffineTransform2D trans)
Curve2D
transform
in interface ContinuousCurve2D
transform
in interface Curve2D
transform
in interface SmoothCurve2D
transform
in interface ContinuousOrientedCurve2D
transform
in interface OrientedCurve2D
transform
in interface SmoothOrientedCurve2D
transform
in interface LinearShape2D
transform
in interface Shape2D
transform
in class AbstractLine2D
trans
- an affine transformpublic LineArc2D clone()
AbstractLine2D
clone
in interface Curve2D
clone
in class AbstractLine2D
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.