|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.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.curve.ContinuousCurve2D |
|---|
CIRCLE, CLOSED_EDGE, LOOP, OPEN_EDGE |
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY, defaultClipWindow, EMPTY_SET |
| 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(Circle2D circle,
Point2D startPoint,
Point2D endPoint)
create a new circle arc based on an already existing circle, and two points giving angles of arc, assuming arc is direct. |
|
CircleArc2D(Circle2D circle,
Point2D startPoint,
Point2D endPoint,
boolean direct)
Deprecated. as this is a too much specific function. |
|
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 | |
|---|---|
java.awt.geom.GeneralPath |
appendPath(java.awt.geom.GeneralPath path)
Append the path of the curve to the given path. |
CurveSet2D<CircleArc2D> |
clip(Box2D box)
Clip the circle arc by a box. |
boolean |
contains(double x,
double y)
|
boolean |
contains(double arg0,
double arg1,
double arg2,
double arg3)
Always return false |
boolean |
contains(java.awt.geom.Point2D p)
|
boolean |
contains(java.awt.geom.Rectangle2D arg0)
Always return false |
boolean |
containsAngle(double angle)
|
boolean |
equals(java.lang.Object obj)
two circle arc arre equal if the have same center, same radius, same starting and ending angles, and same orientation. |
Point2D |
getCenter()
Deprecated. should access center from supporting circle |
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. fillable) shape. |
double |
getDistance(java.awt.geom.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. |
Point2D |
getFirstPoint()
Get the first point of the curve. |
protected java.awt.geom.GeneralPath |
getGeneralPath()
Get the path, with moveTo(). |
java.util.Collection<Point2D> |
getIntersections(StraightObject2D line)
Compute intersections of the circle arc with a line. |
Point2D |
getLastPoint()
Get the last point of the curve. |
double |
getLength()
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans)
Return pathiterator for this circle arc. |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
Return pathiterator for this circle arc. |
Point2D |
getPoint(double t)
Returns the position of a point form the curvilinear position. |
Point2D |
getPoint(double t,
Point2D point)
Same as getPoint(t), but gives the point as a parameter. |
double |
getPosition(Point2D point)
return relative position between 0 and the angle extent. |
double |
getRadius()
Deprecated. should access radius from supporting circle |
CircleArc2D |
getReverseCurve()
returns the circle arc which refers to the reversed 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(java.awt.geom.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. |
java.util.Collection<? extends SmoothCurve2D> |
getSmoothPieces()
return a SmoothCurve array containing this ellipse arc. |
CircleArc2D |
getSubCurve(double t0,
double t1)
return a new CircleArc2D. |
Circle2D |
getSupportCircle()
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(java.awt.geom.Point2D point)
Return the angle portion that the curve turn around the given point. |
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
intersects(java.awt.geom.Rectangle2D r)
|
boolean |
isBounded()
Always return true |
boolean |
isClosed()
a circle arc is never closed by definition. |
boolean |
isDirect()
|
boolean |
isInside(java.awt.geom.Point2D point)
return true if the point is 'inside' the domain bounded by the curve. |
void |
setArc(Point2D center,
double radius,
double start,
double extent)
|
void |
setArc(Point2D center,
double radius,
double start,
double end,
boolean direct)
Deprecated. |
void |
setCenter(Point2D point)
Change the center of the support circle. |
void |
setRadius(double r)
Change the radius of the support circle |
EllipseArc2D |
transform(AffineTransform2D trans)
return an instance of EllipseArc2D, or CircleArc2D if transform is a similarity. |
| Methods inherited from class math.geom2d.conic.EllipseArc2D |
|---|
getAngle, getAsPolyline, getBoundingBox, getBounds, getBounds2D, getContinuousCurves, getCurvature, getInnerPath, project |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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(Circle2D circle,
Point2D startPoint,
Point2D endPoint,
boolean direct)
public CircleArc2D(Circle2D circle,
Point2D startPoint,
Point2D endPoint)
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 boolean containsAngle(double angle)
public double getRadius()
public Point2D getCenter()
public Circle2D getSupportCircle()
public void setCenter(Point2D point)
point - the new center of the arc.public void setRadius(double r)
r - the new radius
public void setArc(Point2D center,
double radius,
double start,
double extent)
@Deprecated
public void setArc(Point2D center,
double radius,
double start,
double end,
boolean direct)
public boolean isDirect()
public double getLength()
public double getWindingAngle(java.awt.geom.Point2D point)
OrientedCurve2D
getWindingAngle in interface OrientedCurve2DgetWindingAngle in class EllipseArc2Dpoint - a point of the plane
public boolean isInside(java.awt.geom.Point2D point)
OrientedCurve2D
isInside in interface OrientedCurve2DisInside in class EllipseArc2Dpoint - a point in the plane
public double getSignedDistance(java.awt.geom.Point2D p)
OrientedCurve2D
getSignedDistance in interface OrientedCurve2DgetSignedDistance in class EllipseArc2Dp - a point of the plane
public double getSignedDistance(double x,
double y)
OrientedCurve2D
getSignedDistance in interface OrientedCurve2DgetSignedDistance in class EllipseArc2Dx - x-coord of a pointy - y-coord of a point
public Vector2D getTangent(double t)
getTangent in interface SmoothCurve2DgetTangent in class EllipseArc2Dpublic java.util.Collection<? extends SmoothCurve2D> getSmoothPieces()
EllipseArc2D
getSmoothPieces in interface ContinuousCurve2DgetSmoothPieces in class EllipseArc2Dmath.geom2d.ContinuousCurve2D#getSmoothPieces()public boolean isClosed()
isClosed in interface ContinuousCurve2DisClosed in class EllipseArc2Dpublic double getT0()
getT0 in interface Curve2DgetT0 in class EllipseArc2Dpublic double getT1()
getT1 in interface Curve2DgetT1 in class EllipseArc2Dpublic Point2D getPoint(double t)
getPoint in interface Curve2DgetPoint in class EllipseArc2D
public Point2D getPoint(double t,
Point2D point)
Curve2D
getPoint in interface Curve2DgetPoint in class EllipseArc2Dpublic Point2D getFirstPoint()
getFirstPoint in interface Curve2DgetFirstPoint in class EllipseArc2Dpublic Point2D getLastPoint()
getLastPoint in interface Curve2DgetLastPoint in class EllipseArc2Dpublic double getPosition(Point2D point)
getPosition in interface Curve2DgetPosition in class EllipseArc2Dpoint - a point belonging to the curve
public java.util.Collection<Point2D> getIntersections(StraightObject2D line)
getIntersections in interface Curve2DgetIntersections in class EllipseArc2Dpublic double getDistance(java.awt.geom.Point2D p)
Shape2D
getDistance in interface Shape2DgetDistance in class EllipseArc2D
public double getDistance(double x,
double y)
Shape2D
getDistance in interface Shape2DgetDistance in class EllipseArc2Dpublic boolean isBounded()
isBounded in interface Shape2DisBounded in class EllipseArc2D
public CircleArc2D getSubCurve(double t0,
double t1)
getSubCurve in interface ContinuousCurve2DgetSubCurve in interface ContinuousOrientedCurve2DgetSubCurve in interface Curve2DgetSubCurve in interface SmoothCurve2DgetSubCurve in interface SmoothOrientedCurve2DgetSubCurve in class EllipseArc2Dt0 - position of the start of the sub-curvet1 - position of the end of the sub-curve
public CircleArc2D getReverseCurve()
getReverseCurve in interface ContinuousCurve2DgetReverseCurve in interface ContinuousOrientedCurve2DgetReverseCurve in interface Curve2DgetReverseCurve in interface OrientedCurve2DgetReverseCurve in interface SmoothCurve2DgetReverseCurve in interface SmoothOrientedCurve2DgetReverseCurve in class EllipseArc2Dpublic CurveSet2D<CircleArc2D> clip(Box2D box)
clip in interface ContinuousCurve2Dclip in interface ContinuousOrientedCurve2Dclip in interface Curve2Dclip in interface OrientedCurve2Dclip in interface SmoothCurve2Dclip in interface SmoothOrientedCurve2Dclip in interface Shape2Dclip in class EllipseArc2Dbox - the clipping box
public EllipseArc2D transform(AffineTransform2D trans)
transform in interface ContinuousCurve2Dtransform in interface ContinuousOrientedCurve2Dtransform in interface Curve2Dtransform in interface OrientedCurve2Dtransform in interface SmoothCurve2Dtransform in interface SmoothOrientedCurve2Dtransform in interface Shape2Dtransform in class EllipseArc2Dtrans - an affine transform
public boolean contains(java.awt.geom.Point2D p)
contains in interface java.awt.Shapecontains in class EllipseArc2D
public boolean contains(double x,
double y)
contains in interface java.awt.Shapecontains in class EllipseArc2D
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface java.awt.Shapeintersects in class EllipseArc2Dpublic boolean intersects(java.awt.geom.Rectangle2D r)
intersects in interface java.awt.Shapeintersects in class EllipseArc2D
public boolean contains(double arg0,
double arg1,
double arg2,
double arg3)
contains in interface java.awt.Shapecontains in class EllipseArc2Dpublic boolean contains(java.awt.geom.Rectangle2D arg0)
contains in interface java.awt.Shapecontains in class EllipseArc2Dpublic java.awt.geom.GeneralPath appendPath(java.awt.geom.GeneralPath path)
ContinuousCurve2D
appendPath in interface ContinuousCurve2DappendPath in class EllipseArc2Dpath - a path to modify
protected java.awt.geom.GeneralPath getGeneralPath()
getGeneralPath in class EllipseArc2Dpublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans)
getPathIterator in interface java.awt.ShapegetPathIterator in class EllipseArc2D
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
getPathIterator in interface java.awt.ShapegetPathIterator in class EllipseArc2Dpublic boolean equals(java.lang.Object obj)
equals in class EllipseArc2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||