|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.curve.AbstractContinuousCurve2D math.geom2d.curve.AbstractSmoothCurve2D math.geom2d.conic.EllipseArc2D math.geom2d.conic.CircleArc2D
public class CircleArc2D
A circle arc, defined by the center and the radius of the containing circle, by a starting angle, and by a (signed) angle extent.
A circle arc is directed: if angle extent is positive, the arc is counter clockwise. Otherwise, it is clockwise.
A circle arc is parameterized using angle from center. The arc contains all points with a parametric equation of t, for each t between 0 and the angle extent.
Field Summary | |
---|---|
protected Circle2D |
circle
|
Fields inherited from class math.geom2d.conic.EllipseArc2D |
---|
angleExtent, ellipse, startAngle |
Fields inherited from interface math.geom2d.Shape2D |
---|
ACCURACY |
Constructor Summary | |
---|---|
CircleArc2D()
Create a circle arc whose support circle is centered on (0,0) and has a radius equal to 1. |
|
CircleArc2D(Circle2D circle,
double startAngle,
double angleExtent)
create a new circle arc based on an already existing circle. |
|
CircleArc2D(Circle2D circle,
double startAngle,
double endAngle,
boolean direct)
create a new circle arc based on an already existing circle, specifying if arc is direct or not. |
|
CircleArc2D(double xc,
double yc,
double r,
double start,
double extent)
Base constructor with all parameters specified |
|
CircleArc2D(double xc,
double yc,
double r,
double start,
double end,
boolean direct)
Base constructor, for constructiong arc from circle parameters, start and end angles, and by specifying whether arc is direct or not. |
|
CircleArc2D(Point2D center,
double radius,
double startAngle,
double angleExtent)
Create a new circle arc with specified point center and radius |
|
CircleArc2D(Point2D center,
double radius,
double start,
double end,
boolean direct)
Create a new circle arc with specified point center and radius, start and end angles, and by specifying whether arc is direct or not. |
Method Summary | |
---|---|
CurveSet2D<CircleArc2D> |
clip(Box2D box)
Clip the circle arc by a box. |
CircleArc2D |
clone()
Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D. |
boolean |
contains(double x,
double y)
Checks if the shape contains the planar point defined by (x,y). |
boolean |
contains(Point2D p)
Checks if the shape contains the given point. |
static CircleArc2D |
create(Circle2D support,
double startAngle,
double angleExtent)
|
static CircleArc2D |
create(Circle2D support,
double startAngle,
double endAngle,
boolean direct)
|
static CircleArc2D |
create(Point2D center,
double radius,
double startAngle,
double angleExtent)
|
static CircleArc2D |
create(Point2D center,
double radius,
double startAngle,
double endAngle,
boolean direct)
|
boolean |
equals(Object obj)
Two circle arc are equal if the have same center, same radius, same starting and ending angles, and same orientation. |
CirculinearDomain2D |
getBuffer(double dist)
Computes the buffer of the shape, formed by the set of points located at a distance from the shape that is lower or equal to d. |
Collection<? extends CircleArc2D> |
getContinuousCurves()
Returns the collection of continuous curves which constitute this curve. |
double |
getDistance(double x,
double y)
get the distance of the shape to the given point, specified by x and y, or the distance of point to the frontier of the shape in the case of a plain (i.e. |
double |
getDistance(Point2D p)
get the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape. |
Collection<Point2D> |
getIntersections(LinearShape2D line)
Compute intersections of the circle arc with a line. |
double |
getLength()
|
double |
getLength(double pos)
|
CircleArc2D |
getParallel(double dist)
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)
Returns the position of a point form the curvilinear position. |
double |
getPosition(double length)
|
double |
getPosition(Point2D point)
return relative position between 0 and the angle extent. |
CircleArc2D |
getReverseCurve()
Returns the circle arc which refers to the same parent circle, with same start angle, and with opposite angle extent. |
double |
getSignedDistance(double x,
double y)
The same as getSignedDistance(Point2D), but by passing 2 double as arguments. |
double |
getSignedDistance(Point2D p)
Get the signed distance of the curve to the given point: this distance is positive if the point lies outside the shape, and is negative if the point lies inside the shape. |
Collection<? extends CircleArc2D> |
getSmoothPieces()
Returns a set of smooth curves. |
CircleArc2D |
getSubCurve(double t0,
double t1)
return a new CircleArc2D. |
Circle2D |
getSupportCircle()
Deprecated. use getSupportingCircle instead |
Circle2D |
getSupportingCircle()
Returns the circle which contains the circle arc. |
double |
getT0()
Always return 0 |
double |
getT1()
return the last position of the circle are, which is given by the angle extent of the arc. |
Vector2D |
getTangent(double t)
|
double |
getWindingAngle(Point2D point)
Return the angle portion that the curve turn around the given point. |
boolean |
isBounded()
Always return true |
boolean |
isClosed()
a circle arc is never closed by definition. |
boolean |
isInside(Point2D point)
Returns true if the point is 'inside' the domain bounded by the curve. |
double |
project(Point2D point)
Returns the position of the closest orthogonal projection of the point on the curve, or of the closest singular point. |
void |
setArc(Point2D center,
double radius,
double start,
double extent)
Deprecated. conics will become imutable in a future release |
void |
setCenter(Point2D point)
Deprecated. conics will become imutable in a future release |
void |
setRadius(double r)
Deprecated. conics will become imutable in a future release |
String |
toString()
|
EllipseArc2D |
transform(AffineTransform2D trans)
Returns an instance of EllipseArc2D, or CircleArc2D if transform is a similarity. |
CirculinearElement2D |
transform(CircleInversion2D inv)
Transforms the shape by a circle inversion. |
Methods inherited from class math.geom2d.conic.EllipseArc2D |
---|
appendPath, containsAngle, create, create, draw, getAngle, getAngleExtent, getBoundingBox, getCurvature, getGeneralPath, getStartAngle, getSupportingEllipse, isDirect, isEmpty |
Methods inherited from class math.geom2d.curve.AbstractSmoothCurve2D |
---|
getLeftTangent, getRightTangent, getSingularPoints, isSingular |
Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D |
---|
getAsAWTShape, getAsPolyline, getFirstPoint, getLastPoint, wrapCurve |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
---|
appendPath, getAsPolyline, getLeftTangent, getRightTangent |
Methods inherited from interface math.geom2d.curve.Curve2D |
---|
draw, getAsAWTShape, getFirstPoint, getLastPoint, getSingularPoints, isSingular |
Methods inherited from interface math.geom2d.Shape2D |
---|
getBoundingBox, isEmpty |
Methods inherited from interface math.geom2d.curve.SmoothCurve2D |
---|
getCurvature |
Field Detail |
---|
protected Circle2D circle
Constructor Detail |
---|
public CircleArc2D()
public CircleArc2D(Circle2D circle, double startAngle, double angleExtent)
public CircleArc2D(Circle2D circle, double startAngle, double endAngle, boolean direct)
public CircleArc2D(Point2D center, double radius, double startAngle, double angleExtent)
public CircleArc2D(Point2D center, double radius, double start, double end, boolean direct)
public CircleArc2D(double xc, double yc, double r, double start, double end, boolean direct)
public CircleArc2D(double xc, double yc, double r, double start, double extent)
Method Detail |
---|
public static CircleArc2D create(Circle2D support, double startAngle, double angleExtent)
public static CircleArc2D create(Circle2D support, double startAngle, double endAngle, boolean direct)
public static CircleArc2D create(Point2D center, double radius, double startAngle, double angleExtent)
public static CircleArc2D create(Point2D center, double radius, double startAngle, double endAngle, boolean direct)
@Deprecated public Circle2D getSupportCircle()
@Deprecated public void setCenter(Point2D point)
point
- the new center of the arc.@Deprecated public void setRadius(double r)
r
- the new radius@Deprecated public void setArc(Point2D center, double radius, double start, double extent)
public Circle2D getSupportingCircle()
getSupportingCircle
in interface CircularShape2D
public CirculinearDomain2D getBuffer(double dist)
CirculinearShape2D
getBuffer
in interface CirculinearShape2D
dist
- the maximal distance between a point of the buffer and the
shape
public CircleArc2D getParallel(double dist)
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
dist
- the distance between the original curve and he parallel curve.
public double getLength()
getLength
in interface CirculinearCurve2D
public double getLength(double pos)
getLength
in interface CirculinearCurve2D
public double getPosition(double length)
getPosition
in interface CirculinearCurve2D
public CirculinearElement2D transform(CircleInversion2D inv)
CirculinearShape2D
transform
in interface CirculinearContinuousCurve2D
transform
in interface CirculinearCurve2D
transform
in interface CirculinearElement2D
transform
in interface CirculinearShape2D
transform
in interface ContinuousCirculinearCurve2D
inv
- the circle inversion
public double getWindingAngle(Point2D point)
OrientedCurve2D
getWindingAngle
in interface OrientedCurve2D
getWindingAngle
in class EllipseArc2D
point
- a point of the plane
public boolean isInside(Point2D point)
OrientedCurve2D
isInside
in interface OrientedCurve2D
isInside
in class EllipseArc2D
point
- a point in the plane
public double getSignedDistance(Point2D p)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
getSignedDistance
in class EllipseArc2D
p
- a point of the plane
public double getSignedDistance(double x, double y)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
getSignedDistance
in class EllipseArc2D
x
- x-coord of a pointy
- y-coord of a point
public Vector2D getTangent(double t)
getTangent
in interface SmoothCurve2D
getTangent
in class EllipseArc2D
public Collection<? extends CircleArc2D> getSmoothPieces()
ContinuousCurve2D
getSmoothPieces
in interface CirculinearContinuousCurve2D
getSmoothPieces
in interface ContinuousCirculinearCurve2D
getSmoothPieces
in interface ContinuousCurve2D
getSmoothPieces
in class AbstractSmoothCurve2D
public boolean isClosed()
isClosed
in interface ContinuousCurve2D
isClosed
in class EllipseArc2D
public double getT0()
getT0
in interface Curve2D
getT0
in class EllipseArc2D
public double getT1()
getT1
in interface Curve2D
getT1
in class EllipseArc2D
public Point2D getPoint(double t)
getPoint
in interface Curve2D
getPoint
in class EllipseArc2D
public double getPosition(Point2D point)
getPosition
in interface Curve2D
getPosition
in class EllipseArc2D
point
- a point belonging to the curve
public Collection<Point2D> getIntersections(LinearShape2D line)
getIntersections
in interface Curve2D
getIntersections
in class EllipseArc2D
public double project(Point2D point)
Curve2D
project
in interface Curve2D
project
in class EllipseArc2D
point
- a point to project
public double getDistance(Point2D p)
Shape2D
getDistance
in interface Shape2D
getDistance
in class EllipseArc2D
public double getDistance(double x, double y)
Shape2D
getDistance
in interface Shape2D
getDistance
in class EllipseArc2D
public boolean isBounded()
isBounded
in interface Shape2D
isBounded
in class EllipseArc2D
public CircleArc2D getSubCurve(double t0, double t1)
getSubCurve
in interface CirculinearContinuousCurve2D
getSubCurve
in interface CirculinearCurve2D
getSubCurve
in interface CirculinearElement2D
getSubCurve
in interface ContinuousCirculinearCurve2D
getSubCurve
in interface CircularShape2D
getSubCurve
in interface ContinuousCurve2D
getSubCurve
in interface Curve2D
getSubCurve
in interface SmoothCurve2D
getSubCurve
in interface ContinuousOrientedCurve2D
getSubCurve
in interface SmoothOrientedCurve2D
getSubCurve
in class EllipseArc2D
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curve
public CircleArc2D getReverseCurve()
getReverseCurve
in interface CirculinearContinuousCurve2D
getReverseCurve
in interface CirculinearCurve2D
getReverseCurve
in interface CirculinearElement2D
getReverseCurve
in interface ContinuousCirculinearCurve2D
getReverseCurve
in interface CircularShape2D
getReverseCurve
in interface ContinuousCurve2D
getReverseCurve
in interface Curve2D
getReverseCurve
in interface SmoothCurve2D
getReverseCurve
in interface ContinuousOrientedCurve2D
getReverseCurve
in interface OrientedCurve2D
getReverseCurve
in interface SmoothOrientedCurve2D
getReverseCurve
in class EllipseArc2D
public Collection<? extends CircleArc2D> getContinuousCurves()
Curve2D
getContinuousCurves
in interface CirculinearCurve2D
getContinuousCurves
in interface Curve2D
getContinuousCurves
in class EllipseArc2D
public CurveSet2D<CircleArc2D> clip(Box2D box)
clip
in interface CirculinearContinuousCurve2D
clip
in interface CirculinearCurve2D
clip
in interface CirculinearElement2D
clip
in interface ContinuousCirculinearCurve2D
clip
in interface CircularShape2D
clip
in interface ContinuousCurve2D
clip
in interface Curve2D
clip
in interface SmoothCurve2D
clip
in interface ContinuousOrientedCurve2D
clip
in interface OrientedCurve2D
clip
in interface SmoothOrientedCurve2D
clip
in interface Shape2D
clip
in class EllipseArc2D
box
- the clipping box
public EllipseArc2D transform(AffineTransform2D trans)
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 Shape2D
transform
in class EllipseArc2D
trans
- an affine transform
public boolean contains(Point2D p)
Shape2D
contains
in interface Shape2D
contains
in class EllipseArc2D
public boolean contains(double x, double y)
Shape2D
contains
in interface Shape2D
contains
in class EllipseArc2D
public String toString()
toString
in class EllipseArc2D
public boolean equals(Object obj)
equals
in class EllipseArc2D
public CircleArc2D clone()
Curve2D
clone
in interface Curve2D
clone
in class EllipseArc2D
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |