Package com.luciad.geometries
Class Curve
java.lang.Object
com.luciad.geometries.Geometry
com.luciad.geometries.Curve
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
BezierCurve,CircularArcBy3Points,CircularArcByBulge,CircularArcByCenterPoint,CompositeCurve,EllipticalArc,Line,Ring
1-dimensional geometric primitive, representing the continuous image of a line.
One-dimensional geometries may be composed of simple curve segments where for adjacent curve segments the end and start point fall together to form a continuous geometry. A curve may be composed of curve segments that each have a different interpolation type. The most common use for curves is to have curve segments with the same interpolation type (e.g. polyline).
You can read more about the available geometries here.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()computePoint(double parameter) Computes a point of the curve, defined by the given parameter.protected voidfinalize()doubleReturns the length of the curve.Methods inherited from class com.luciad.geometries.Geometry
getBounds, getReference
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classGeometry
-
computePoint
Computes a point of the curve, defined by the given parameter.- At parameter 0, the point is the start point of the curve.
- At parameter 1, the point is the end point of the curve.
- Parameters:
parameter- the parameter value, within[0,1], to compute the point location for.- Returns:
- the computed point location.
- Throws:
IllegalArgumentException- if parameter is not within[0,1], or if the point could not be computed. For example, when the curve is defined by invalid points.
-
getLength2D
Returns the length of the curve.- Returns:
- the length of the curve.
- Throws:
IllegalArgumentException- if the length could not be computed. For example, when the curve is defined by invalid points.
-