math.geom2d.line
Class LineObject2D

Package class diagram package LineObject2D
java.lang.Object
  extended by math.geom2d.curve.AbstractContinuousCurve2D
      extended by math.geom2d.curve.AbstractSmoothCurve2D
          extended by math.geom2d.line.Line2D
              extended by 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

Field Summary
 
Fields inherited from class math.geom2d.line.Line2D
p1, p2
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
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
 
Methods inherited from class math.geom2d.curve.AbstractSmoothCurve2D
getLeftTangent, getRightTangent, getSingularPoints, isSingular
 
Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D
draw, getAsAWTShape, getAsPolyline, wrapCurve
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D
getAsPolyline, getLeftTangent, getRightTangent
 
Methods inherited from interface math.geom2d.curve.Curve2D
draw, getAsAWTShape, getSingularPoints, isSingular
 

Constructor Detail

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.

Method Detail

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.