math.geom2d.curve
Class AbstractSmoothCurve2D
- java.lang.Object
-
- math.geom2d.curve.AbstractContinuousCurve2D
-
- math.geom2d.curve.AbstractSmoothCurve2D
-
- All Implemented Interfaces:
- java.lang.Cloneable, ContinuousCurve2D, Curve2D, SmoothCurve2D, GeometricObject2D, Shape2D
- Direct Known Subclasses:
- AbstractLine2D, Circle2D, CircleArc2D, CubicBezierCurve2D, Ellipse2D, EllipseArc2D, HyperbolaBranch2D, HyperbolaBranchArc2D, Line2D, Parabola2D, ParabolaArc2D, QuadBezierCurve2D
public abstract class AbstractSmoothCurve2D extends AbstractContinuousCurve2D implements SmoothCurve2D, java.lang.Cloneable
Provides a base implementation for smooth curves.
-
-
Constructor Summary
Constructors Constructor and Description AbstractSmoothCurve2D()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description abstract SmoothCurve2Dclone()Deprecated.use copy constructor instead (0.11.2)booleanisSingular(double pos)Returns always false, as a smooth curve does not have singular points by definition.Vector2DleftTangent(double t)Computes the left tangent at the given position.Vector2Dnormal(double t)Returns the normal vector of the curve at the given position.Vector2DrightTangent(double t)Computes the right tangent at the given position.java.util.Collection<Point2D>singularPoints()Returns an empty set of Point2D, as a smooth curve does not have singular points by definition.java.util.Collection<? extends SmoothCurve2D>smoothPieces()Returns a set of smooth curves.java.util.Collection<Point2D>vertices()Returns a set of Point2D, containing the extremities of the curve if they are not infinite.-
Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D
asAwtShape, asPolyline, continuousCurves, draw, firstPoint, lastPoint
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface math.geom2d.curve.SmoothCurve2D
clip, reverse, subCurve, tangent, transform
-
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D
appendPath, asPolyline, curvature, isClosed
-
Methods inherited from interface math.geom2d.curve.Curve2D
asAwtShape, continuousCurves, draw, firstPoint, getT0, getT1, intersections, lastPoint, point, position, project, t0, t1
-
Methods inherited from interface math.geom2d.Shape2D
boundingBox, contains, contains, distance, distance, isBounded, isEmpty
-
Methods inherited from interface math.geom2d.GeometricObject2D
almostEquals
-
-
-
-
Method Detail
-
leftTangent
public Vector2D leftTangent(double t)
Description copied from interface:ContinuousCurve2DComputes the left tangent at the given position. If the curve is smooth at positiont, 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 positiontcorresponds to a singular point, the tangent of the smooth portion beforetis computed.- Specified by:
leftTangentin interfaceContinuousCurve2D- Parameters:
t- the position on the curve- Returns:
- the left tangent vector at the curve for position t
-
rightTangent
public Vector2D rightTangent(double t)
Description copied from interface:ContinuousCurve2DComputes the right tangent at the given position. If the curve is smooth at positiont, 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 positiontcorresponds to a singular point, the tangent of the smooth portion aftertis computed.- Specified by:
rightTangentin interfaceContinuousCurve2D- Parameters:
t- the position on the curve- Returns:
- the right tangent vector at the curve for position t
-
normal
public Vector2D normal(double t)
Description copied from interface:SmoothCurve2DReturns the normal vector of the curve at the given position.- Specified by:
normalin interfaceSmoothCurve2D- Parameters:
t- a position on the curve- Returns:
- the normal vector computed for position t
- See Also:
SmoothCurve2D.tangent(double)
-
smoothPieces
public java.util.Collection<? extends SmoothCurve2D> smoothPieces()
Description copied from interface:ContinuousCurve2DReturns a set of smooth curves.- Specified by:
smoothPiecesin interfaceContinuousCurve2D
-
singularPoints
public java.util.Collection<Point2D> singularPoints()
Returns an empty set of Point2D, as a smooth curve does not have singular points by definition.- Specified by:
singularPointsin interfaceCurve2D- Returns:
- a collection of Point2D.
- See Also:
Curve2D.singularPoints()
-
vertices
public java.util.Collection<Point2D> vertices()
Returns a set of Point2D, containing the extremities of the curve if they are not infinite.- Specified by:
verticesin interfaceCurve2D- Returns:
- a collection of Point2D.
- See Also:
Curve2D.vertices()
-
isSingular
public boolean isSingular(double pos)
Returns always false, as a smooth curve does not have singular points by definition.- Specified by:
isSingularin interfaceCurve2D- Parameters:
pos- the position of the point on the curve- Returns:
- true if the point at this location is singular
- See Also:
Curve2D.isSingular(double)
-
clone
@Deprecated public abstract SmoothCurve2D clone()
Deprecated. use copy constructor instead (0.11.2)- Specified by:
clonein interfaceCurve2D- Specified by:
clonein classAbstractContinuousCurve2D
-
-
DMelt 3.0 © DataMelt by jWork.ORG