|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmath.geom2d.curve.AbstractContinuousCurve2D
math.geom2d.curve.AbstractSmoothCurve2D
math.geom2d.line.AbstractLine2D
math.geom2d.line.LineArc2D
public class LineArc2D
LineArc2D is a generic class to represent edges, straight lines, and rays.
It is defined like other linear shapes: origin point, and direction vector.
Moreover, two internal variables t0 and t1 define the limit of the object
(with t0
Field Summary |
---|
Fields inherited from interface math.geom2d.Shape2D |
---|
ACCURACY |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
boolean |
almostEquals(GeometricObject2D obj,
double eps)
Checks if the two objects are similar up to a given threshold value. |
java.awt.geom.GeneralPath |
appendPath(java.awt.geom.GeneralPath path)
Appends a line to the current path. |
Box2D |
boundingBox()
Returns the bounding box of this line arc. |
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. |
java.util.Collection<? extends LineArc2D> |
continuousCurves()
Returns a collection of lines containing only this line. |
static LineArc2D |
create(Point2D p1,
Point2D p2,
double t0,
double t1)
Static factory for creating a new LineArc2D |
boolean |
equals(java.lang.Object obj)
|
Point2D |
firstPoint()
Returns the first point of the edge. |
java.awt.geom.GeneralPath |
getGeneralPath()
|
double |
getT0()
Deprecated. replaced by t0() (since 0.11.1). |
double |
getT1()
Deprecated. replaced by t1() (since 0.11.1). |
double |
getX1()
|
double |
getX2()
|
double |
getY1()
|
double |
getY2()
|
boolean |
isBounded()
Returns 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. |
Point2D |
lastPoint()
Returns the last point of the edge. |
double |
length()
Returns the length of the line arc. |
LineArc2D |
parallel(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. |
Point2D |
point(double t)
Returns the point located at the given position on the curve. |
LineArc2D |
reverse()
Returns the line arc which have the same trace, but has the inverse parameterization. |
java.util.Collection<Point2D> |
singularPoints()
Returns an empty set of Point2D, as a smooth curve does not have singular points by definition. |
LineArc2D |
subCurve(double t0,
double t1)
Returns a new LineArc2D, which is the portion of this LineArc2D delimited by parameters t0 and t1. |
double |
t0()
Returns the parameter of the first point of the line arc, arbitrarily set to 0. |
double |
t1()
Returns the parameter of the last point of the line arc, arbitrarily set to 1. |
java.lang.String |
toString()
|
LineArc2D |
transform(AffineTransform2D trans)
Transforms the curve by an affine transform. |
Methods inherited from class math.geom2d.line.AbstractLine2D |
---|
buffer, cartesianEquation, clip, curvature, direction, distance, distance, getIntersection, getSymmetric, getSymmetric, horizontalAngle, intersection, intersections, isClosed, isColinear, isColinear, isEmpty, isInside, isParallel, isParallel, length, origin, parallel, parametric, perpendicular, polarCoefficients, polarCoefficientsSigned, position, position, positionOnLine, positionOnLine, project, projectedPoint, projectedPoint, signedDistance, signedDistance, smoothPieces, supportingLine, tangent, transform, windingAngle |
Methods inherited from class math.geom2d.curve.AbstractSmoothCurve2D |
---|
leftTangent, normal, rightTangent, vertices |
Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D |
---|
asAwtShape, asPolyline, draw |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface math.geom2d.domain.SmoothOrientedCurve2D |
---|
clip |
Methods inherited from interface math.geom2d.curve.SmoothCurve2D |
---|
normal, tangent |
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
---|
asPolyline, curvature, isClosed, leftTangent, rightTangent, smoothPieces |
Methods inherited from interface math.geom2d.domain.OrientedCurve2D |
---|
isInside, signedDistance, signedDistance, windingAngle |
Methods inherited from interface math.geom2d.curve.Curve2D |
---|
asAwtShape, draw, intersections, position, project, vertices |
Methods inherited from interface math.geom2d.Shape2D |
---|
distance, distance, isEmpty |
Constructor Detail |
---|
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 arcMethod Detail |
---|
public static LineArc2D create(Point2D p1, Point2D p2, double t0, double t1)
public double length()
length
in interface CirculinearCurve2D
length
in class AbstractLine2D
public double getX1()
public double getY1()
public double getX2()
public double getY2()
public LineArc2D parallel(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.
parallel
in interface CirculinearContinuousCurve2D
parallel
in interface CirculinearCurve2D
parallel
in interface CirculinearElement2D
d
- the distance between the original curve and he parallel curve.
public double t0()
t0
in interface Curve2D
@Deprecated public double getT0()
getT0
in interface Curve2D
public double t1()
t1
in interface Curve2D
@Deprecated public double getT1()
getT1
in interface Curve2D
public Point2D point(double t)
Curve2D
point
in interface Curve2D
public Point2D firstPoint()
firstPoint
in interface Curve2D
firstPoint
in class AbstractContinuousCurve2D
Curve2D.t0()
,
Curve2D.point(double)
public Point2D lastPoint()
lastPoint
in interface Curve2D
lastPoint
in class AbstractContinuousCurve2D
Curve2D.t1()
,
Curve2D.point(double)
public java.util.Collection<Point2D> singularPoints()
AbstractSmoothCurve2D
singularPoints
in interface Curve2D
singularPoints
in class AbstractSmoothCurve2D
Curve2D.singularPoints()
public boolean isSingular(double pos)
AbstractSmoothCurve2D
isSingular
in interface Curve2D
isSingular
in class AbstractSmoothCurve2D
pos
- the position of the point on the curve
Curve2D.isSingular(double)
public java.util.Collection<? extends LineArc2D> continuousCurves()
AbstractLine2D
continuousCurves
in interface CirculinearCurve2D
continuousCurves
in interface Curve2D
continuousCurves
in class AbstractLine2D
public LineArc2D reverse()
reverse
in interface CirculinearContinuousCurve2D
reverse
in interface CirculinearCurve2D
reverse
in interface CirculinearElement2D
reverse
in interface ContinuousCurve2D
reverse
in interface Curve2D
reverse
in interface SmoothCurve2D
reverse
in interface ContinuousOrientedCurve2D
reverse
in interface OrientedCurve2D
reverse
in interface SmoothOrientedCurve2D
public LineArc2D subCurve(double t0, double t1)
subCurve
in interface CirculinearContinuousCurve2D
subCurve
in interface CirculinearCurve2D
subCurve
in interface CirculinearElement2D
subCurve
in interface ContinuousCurve2D
subCurve
in interface Curve2D
subCurve
in interface SmoothCurve2D
subCurve
in interface ContinuousOrientedCurve2D
subCurve
in interface SmoothOrientedCurve2D
subCurve
in interface LinearElement2D
subCurve
in class AbstractLine2D
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curve
public boolean isBounded()
isBounded
in interface Shape2D
public Box2D boundingBox()
boundingBox
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
contains
in interface Shape2D
public java.awt.geom.GeneralPath getGeneralPath()
public java.awt.geom.GeneralPath appendPath(java.awt.geom.GeneralPath path)
appendPath
in interface ContinuousCurve2D
path
- the path to modify
public 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 LinearElement2D
transform
in interface LinearShape2D
transform
in interface Shape2D
transform
in class AbstractLine2D
trans
- an affine transform
public java.lang.String toString()
toString
in class java.lang.Object
public boolean almostEquals(GeometricObject2D obj, double eps)
GeometricObject2D
almostEquals
in interface GeometricObject2D
obj
- the object to compareeps
- a threshold value, for example the minimal coordinate difference
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public LineArc2D clone()
AbstractLine2D
clone
in interface Curve2D
clone
in class AbstractLine2D
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |