math.geom2d.line
Class LineObject2D
java.lang.Object
math.geom2d.curve.AbstractContinuousCurve2D
math.geom2d.curve.AbstractSmoothCurve2D
math.geom2d.line.Line2D
math.geom2d.line.LineObject2D
- All Implemented Interfaces:
- Serializable, Cloneable, CirculinearContinuousCurve2D, CirculinearCurve2D, CirculinearElement2D, CirculinearShape2D, ContinuousCirculinearCurve2D, ContinuousCurve2D, Curve2D, SmoothCurve2D, ContinuousOrientedCurve2D, OrientedCurve2D, SmoothOrientedCurve2D, LinearShape2D, Shape2D
Deprecated. use Line2D instead
@Deprecated
public class LineObject2D
- extends Line2D
- implements Cloneable
Line object defined from 2 points. This object keep points reference in
memory, and recomputes properties directly from points. LineObject2D is
mutable.
Example :
// Create an Edge2D
LineObject2D line = new LineObject2D(new Point2D(0, 0), new Point2D(1, 2));
// Change direction of line, by changing second point :
line.setPoint2(new Point2D(4, 5));
// Change position and direction of the line, by changing first point.
// 'line' is now the edge (2,3)-(4,5)
line.setPoint1(new Point2D(2, 3));
This class is maybe slower than Edge2D or StraightLine2D, because parameters
are updated each time a computation is made, causing lot of additional
processing.
- See Also:
- Serialized Form
Fields inherited from class math.geom2d.line.Line2D |
p1, p2 |
Constructor Summary |
LineObject2D(double x1,
double y1,
double x2,
double y2)
Deprecated. Define a new LineObject2D with two extremities. |
LineObject2D(Point2D point1,
Point2D point2)
Deprecated. Define a new LineObject2D with two extremities. |
Method Summary |
Line2D |
clone()
Deprecated. Overrides Object declaration to ensure Curve2D implementation are
cloned as Curve2D. |
Methods inherited from class math.geom2d.line.Line2D |
appendPath, clip, contains, contains, create, equals, getBoundingBox, getBuffer, getCartesianEquation, getContinuousCurves, getCurvature, getDistance, getDistance, getFirstPoint, getGeneralPath, getHorizontalAngle, getIntersection, getIntersections, getLastPoint, getLength, getLength, getOrigin, getOtherPoint, getParallel, getParallel, getParametric, getPerpendicular, getPoint, getPoint1, getPoint2, getPolarCoefficients, getPosition, getPosition, getReverseCurve, getSignedDistance, getSignedDistance, getSignedPolarCoefficients, getSmoothPieces, getSubCurve, getSupportingLine, getT0, getT1, getTangent, getVector, getWindingAngle, getX1, getX2, getY1, getY2, intersects, isBounded, isClosed, isColinear, isEmpty, isInside, isParallel, project, setPoint1, setPoint2, toString, transform, transform |
LineObject2D
public LineObject2D(Point2D point1,
Point2D point2)
- Deprecated.
- Define a new LineObject2D with two extremities.
LineObject2D
public LineObject2D(double x1,
double y1,
double x2,
double y2)
- Deprecated.
- Define a new LineObject2D with two extremities.
clone
public Line2D clone()
- Deprecated.
- Description copied from interface:
Curve2D
- Overrides Object declaration to ensure Curve2D implementation are
cloned as Curve2D.
- Specified by:
clone
in interface Curve2D
- Overrides:
clone
in class Line2D
- Returns:
- the cloned curve
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.