math.geom2d
Interface GeometricObject2D

All Known Subinterfaces:
Boundary2D, CircleLine2D, CircularShape2D, CirculinearBoundary2D, CirculinearContinuousCurve2D, CirculinearContour2D, CirculinearCurve2D, CirculinearCurveSet2D<T>, CirculinearDomain2D, CirculinearElement2D, CirculinearRing2D, CirculinearShape2D, Conic2D, ContinuousCurve2D, ContinuousOrientedCurve2D, Contour2D, Curve2D, CurveSet2D<T>, Domain2D, DomainSet2D<T>, EllipseArcShape2D, EllipseShape2D, LinearElement2D, LinearShape2D, OrientedCurve2D, PointSet2D, PointShape2D, Polygon2D, Shape2D, ShapeSet2D<T>, SmoothContour2D, SmoothCurve2D, SmoothOrientedCurve2D
All Known Implementing Classes:
AbstractContinuousCurve2D, AbstractLine2D, AbstractSmoothCurve2D, AffineTransform2D, BoundaryPolyCirculinearCurve2D, BoundaryPolyCurve2D, Box2D, Circle2D, CircleArc2D, CirculinearContourArray2D, CirculinearCurveArray2D, ContourArray2D, CubicBezierCurve2D, CurveArray2D, DomainArray2D, Ellipse2D, EllipseArc2D, GenericCirculinearDomain2D, GenericCirculinearRing2D, GenericDomain2D, HRectangle2D, Hyperbola2D, HyperbolaBranch2D, HyperbolaBranchArc2D, InvertedRay2D, Line2D, LineArc2D, LinearCurve2D, LinearRing2D, LineSegment2D, MultiPolygon2D, Parabola2D, ParabolaArc2D, Point2D, PointArray2D, PolyCirculinearCurve2D, PolyCubicBezierCurve2D, PolyCurve2D, Polyline2D, PolyOrientedCurve2D, QuadBezierCurve2D, Ray2D, Rectangle2D, ShapeArray2D, SimplePolygon2D, StraightLine2D, Vector2D

public interface GeometricObject2D

Grouping interface for all objects operating on Euclidean plane. This includes shapes, boxes, transforms, vectors...

Author:
dlegland

Method Summary
 boolean almostEquals(GeometricObject2D obj, double eps)
          Checks if the two objects are similar up to a given threshold value.
 

Method Detail

almostEquals

boolean almostEquals(GeometricObject2D obj,
                     double eps)
Checks if the two objects are similar up to a given threshold value. This method can be used to compare the results of geometric computations, that introduce errors due to numerical computations.

Parameters:
obj - the object to compare
eps - a threshold value, for example the minimal coordinate difference
Returns:
true if both object have the same value up to the threshold