|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.curve.AbstractContinuousCurve2D
math.geom2d.polygon.LinearCurve2D
public abstract class LinearCurve2D
Abstract class that is the base implementation of Polyline2D and LinearRing2D.
| Field Summary |
|---|
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY |
| Method Summary | |
|---|---|
boolean |
addVertex(Point2D vertex)
Adds a vertex at the end of this polyline. |
java.awt.geom.GeneralPath |
asGeneralPath()
Returns a general path iterator. |
Box2D |
boundingBox()
Returns the bounding box of this linear curve. |
CirculinearDomain2D |
buffer(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. |
void |
clearVertices()
|
CurveSet2D<? extends LinearCurve2D> |
clip(Box2D box)
Clips the polyline by a box. |
int |
closestVertexIndex(Point2D point)
Computes the index of the closest vertex to the input point. |
boolean |
contains(double x,
double y)
Checks if the shape contains the planar point defined by (x,y). |
boolean |
contains(Point2D point)
Checks if the shape contains the given point. |
java.util.Collection<? extends LinearCurve2D> |
continuousCurves()
Returns the collection of continuous curves which constitute this curve. |
double |
curvature(double t)
Computes the curvature at the given position. |
double |
distance(double x,
double y)
Returns 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 |
distance(Point2D point)
Returns 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. |
void |
draw(java.awt.Graphics2D g2)
Draws the curve on the given Graphics2D object. |
abstract LineSegment2D |
edge(int index)
Returns the i-th edge of this linear curve. |
abstract int |
edgeNumber()
Returns the number of edges of this linear curve. |
abstract java.util.Collection<LineSegment2D> |
edges()
Returns a collection of LineSegment2D that represent the individual edges of this linear curve. |
LineSegment2D |
firstEdge()
|
Point2D |
firstPoint()
Returns the first point of the linear curve. |
double |
getT0()
Deprecated. replaced by t0() (since 0.11.1). |
void |
insertVertex(int index,
Point2D vertex)
Inserts a vertex at a given position in the polyline. |
java.util.Collection<Point2D> |
intersections(LinearShape2D line)
Returns the intersection points of the curve with the specified line. |
boolean |
isBounded()
Always returns true, because a linear curve is always bounded. |
boolean |
isEmpty()
Returns true if the polyline does not contain any point. |
boolean |
isSingular(double pos)
Checks if a point is singular. |
abstract LineSegment2D |
lastEdge()
|
Vector2D |
leftTangent(double t)
Computes the left tangent at the given position. |
double |
length()
|
double |
length(double pos)
|
CirculinearContinuousCurve2D |
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. |
double |
position(double length)
|
double |
position(Point2D point)
Computes the position of the point on 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. |
Point2D |
removeVertex(int index)
Removes the vertex specified by the index. |
boolean |
removeVertex(Point2D vertex)
Removes the first instance of the given vertex from this polyline. |
Vector2D |
rightTangent(double t)
Computes the right tangent at the given position. |
void |
setVertex(int index,
Point2D position)
Changes the position of the i-th vertex. |
double |
signedDistance(double x,
double y)
The same as distanceSigned(Point2D), but by passing 2 double as arguments. |
double |
signedDistance(Point2D point)
Returns the signed distance of the curve to the given point. |
java.util.Collection<Point2D> |
singularPoints()
Returns a set of singular points, i. e. which do not locally admit derivative. |
java.util.Collection<? extends LineSegment2D> |
smoothPieces()
Returns a set of circulinear elements, which are basis for circulinear curves. |
double |
t0()
Returns 0. |
Point2D |
vertex(int i)
Returns the i-th vertex of the polyline. |
Point2D[] |
vertexArray()
Returns the collection of vertices as an array of Point2D. |
java.util.Iterator<Point2D> |
vertexIterator()
Returns an iterator on the collection of points. |
int |
vertexNumber()
Returns the number of vertices. |
java.util.Collection<Point2D> |
vertices()
Returns the vertices of the polyline. |
| Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D |
|---|
asAwtShape, asPolyline, clone, lastPoint |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface math.geom2d.circulinear.CirculinearContinuousCurve2D |
|---|
reverse, subCurve, transform |
| Methods inherited from interface math.geom2d.domain.ContinuousOrientedCurve2D |
|---|
transform |
| Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
appendPath, asPolyline, isClosed |
| Methods inherited from interface math.geom2d.domain.OrientedCurve2D |
|---|
isInside, windingAngle |
| Methods inherited from interface math.geom2d.curve.Curve2D |
|---|
asAwtShape, clone, getT1, lastPoint, point, t1 |
| Methods inherited from interface math.geom2d.GeometricObject2D |
|---|
almostEquals |
| Method Detail |
|---|
public java.util.Iterator<Point2D> vertexIterator()
public Point2D[] vertexArray()
public boolean addVertex(Point2D vertex)
public void insertVertex(int index,
Point2D vertex)
public boolean removeVertex(Point2D vertex)
vertex - the position of the vertex to remove
public Point2D removeVertex(int index)
index - the index of the vertex to remove
public void setVertex(int index,
Point2D position)
public void clearVertices()
public java.util.Collection<Point2D> vertices()
vertices in interface Curve2DCurve2D.singularPoints()public Point2D vertex(int i)
i - index of the vertex, between 0 and the number of verticespublic int vertexNumber()
public int closestVertexIndex(Point2D point)
public abstract LineSegment2D edge(int index)
public abstract int edgeNumber()
public abstract java.util.Collection<LineSegment2D> edges()
public LineSegment2D firstEdge()
public abstract LineSegment2D lastEdge()
public double length()
length in interface CirculinearCurve2Dpublic double length(double pos)
length in interface CirculinearCurve2Dpublic double position(double length)
position in interface CirculinearCurve2Dpublic CirculinearDomain2D buffer(double dist)
CirculinearShape2D
buffer in interface CirculinearShape2Ddist - the maximal distance between a point of the buffer and the
shape
public CirculinearContinuousCurve2D 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 CirculinearContinuousCurve2Dparallel in interface CirculinearCurve2Dd - the distance between the original curve and he parallel curve.
public double signedDistance(Point2D point)
OrientedCurve2D
signedDistance in interface OrientedCurve2Dpoint - a point of the plane
public double signedDistance(double x,
double y)
OrientedCurve2D
signedDistance in interface OrientedCurve2Dx - x-coord of a pointy - y-coord of a point
public Vector2D leftTangent(double t)
ContinuousCurve2Dt, the result is the
same as the tangent computed for the corresponding smooth curve, and
is equal to the result of rightTangent(double).
If the position t corresponds to a singular point, the
tangent of the smooth portion before t is computed.
leftTangent in interface ContinuousCurve2Dt - the position on the curve
public Vector2D rightTangent(double t)
ContinuousCurve2Dt, the result is the
same as the tangent computed for the corresponding smooth curve, and
is equal to the result of leftTangent(double).
If the position t corresponds to a singular point, the
tangent of the smooth portion after t is computed.
rightTangent in interface ContinuousCurve2Dt - the position on the curve
public double curvature(double t)
ContinuousCurve2Dt that correspond to smooth parts, and is
infinite for singular points.
curvature in interface ContinuousCurve2Dt - the position on the curve
public java.util.Collection<? extends LineSegment2D> smoothPieces()
CirculinearContinuousCurve2D
smoothPieces in interface CirculinearContinuousCurve2DsmoothPieces in interface ContinuousCurve2Dpublic double t0()
t0 in interface Curve2D@Deprecated public double getT0()
getT0 in interface Curve2Dpublic Point2D firstPoint()
firstPoint in interface Curve2DfirstPoint in class AbstractContinuousCurve2DCurve2D.t0(),
Curve2D.point(double)public java.util.Collection<Point2D> singularPoints()
Curve2D
singularPoints in interface Curve2DCurve2D.vertices()public boolean isSingular(double pos)
Curve2D
isSingular in interface Curve2Dpos - the position of the point on the curve
public double position(Point2D point)
Curve2Dpoint(double) method.
position in interface Curve2Dpoint - a point belonging to the curve
Curve2D.point(double)public java.util.Collection<Point2D> intersections(LinearShape2D line)
Curve2D
intersections in interface Curve2Dpublic java.util.Collection<? extends LinearCurve2D> continuousCurves()
Curve2D
continuousCurves in interface CirculinearCurve2DcontinuousCurves in interface Curve2DcontinuousCurves in class AbstractContinuousCurve2Dpublic double project(Point2D point)
Curve2D
project in interface Curve2Dpoint - a point to project
public double distance(double x,
double y)
Shape2D
distance in interface Shape2Dpublic double distance(Point2D point)
Shape2D
distance in interface Shape2Dpublic boolean isEmpty()
isEmpty in interface Shape2Dpublic boolean isBounded()
isBounded in interface Shape2Dpublic Box2D boundingBox()
boundingBox in interface Shape2D
public boolean contains(double x,
double y)
Shape2D
contains in interface Shape2Dpublic boolean contains(Point2D point)
Shape2D
contains in interface Shape2Dpublic CurveSet2D<? extends LinearCurve2D> clip(Box2D box)
clip in interface CirculinearContinuousCurve2Dclip in interface CirculinearCurve2Dclip in interface ContinuousCurve2Dclip in interface Curve2Dclip in interface ContinuousOrientedCurve2Dclip in interface OrientedCurve2Dclip in interface Shape2Dbox - the clipping box
public java.awt.geom.GeneralPath asGeneralPath()
public void draw(java.awt.Graphics2D g2)
Curve2D
draw in interface Curve2Ddraw in interface Shape2Ddraw in class AbstractContinuousCurve2Dg2 - the graphics to draw the curve in
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||