|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Curve2D
Interface for piecewise smooth curves, like polylines, conics, straight lines, line segments...
Several interfaces exist to use more explicit type of curves:
ContinuousCurve2D
for finite or infinite
continuous curves, SmoothCurve2D
for curves that
admit a derivative (and hence a tangent, a curvature...) at each point,
OrientedCurve2D
that are used to
define the boundary
of a
domain
...
Points on curves are identified using curve parameterization. This parameterization is left to the implementation.
Field Summary |
---|
Fields inherited from interface math.geom2d.Shape2D |
---|
ACCURACY |
Method Summary | |
---|---|
CurveSet2D<? extends Curve2D> |
clip(Box2D box)
When a curve is clipped, the result is a set of curves. |
Curve2D |
clone()
Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D. |
void |
draw(Graphics2D g2)
Draws the curve on the given Graphics2D object. |
Shape |
getAsAWTShape()
|
Collection<? extends ContinuousCurve2D> |
getContinuousCurves()
Returns the collection of continuous curves which constitute this curve. |
Point2D |
getFirstPoint()
Get the first point of the curve. |
Collection<Point2D> |
getIntersections(LinearShape2D line)
Returns the intersection points of the curve with the specified line. |
Point2D |
getLastPoint()
Get the last point of the curve. |
Point2D |
getPoint(double t)
Gets the point from a parametric representation of the curve. |
double |
getPosition(Point2D point)
Get position of the point on the curve. |
Curve2D |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in reverse order. |
Collection<Point2D> |
getSingularPoints()
Returns a set of singular points, i. |
Curve2D |
getSubCurve(double t0,
double t1)
Returns a portion of the original curve, delimited by two positions on the curve. |
double |
getT0()
Get value of parameter t for the first point of the curve. |
double |
getT1()
Get value of parameter t for the last point of the curve. |
boolean |
isSingular(double pos)
Checks if a point is singular. |
double |
project(Point2D point)
Returns the position of the closest orthogonal projection of the point on the curve, or of the closest singular point. |
Curve2D |
transform(AffineTransform2D trans)
Transforms the curve by an affine transform. |
Methods inherited from interface math.geom2d.Shape2D |
---|
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty |
Method Detail |
---|
double getT0()
double getT1()
Point2D getPoint(double t)
Point2D getFirstPoint()
getPoint(getT0())
.
Point2D getLastPoint()
getPoint(getT1())
.
Collection<Point2D> getSingularPoints()
boolean isSingular(double pos)
pos
- the position of the point on the curve
double getPosition(Point2D point)
point
- a point belonging to the curve
double project(Point2D point)
point
- a point to project
Collection<Point2D> getIntersections(LinearShape2D line)
Curve2D getReverseCurve()
Collection<? extends ContinuousCurve2D> getContinuousCurves()
Curve2D getSubCurve(double t0, double t1)
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curve
Curve2D transform(AffineTransform2D trans)
transform
in interface Shape2D
trans
- an affine transform
CurveSet2D<? extends Curve2D> clip(Box2D box)
clip
in interface Shape2D
box
- the clipping box
Shape getAsAWTShape()
void draw(Graphics2D g2)
draw
in interface Shape2D
g2
- the graphics to draw the curveCurve2D clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |