math.geom2d.line
Interface LinearShape2D

All Superinterfaces:
CirculinearCurve2D, CirculinearShape2D, java.lang.Cloneable, Curve2D, GeometricObject2D, Shape2D
All Known Subinterfaces:
LinearElement2D
All Known Implementing Classes:
AbstractLine2D, InvertedRay2D, Line2D, LineArc2D, LineSegment2D, Ray2D, StraightLine2D

public interface LinearShape2D
extends CirculinearCurve2D

A curve that can be inscribed in a straight line, like a ray, a straight line, or a line segment. Classes implementing this interface can be discontinuous, contrary to the interface LinearElement2D.

Author:
dlegland

Field Summary
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
Method Summary
 Vector2D direction()
          Return one direction vector of the linear shape.
 double horizontalAngle()
          Returns the angle with axis (O,i), counted counter-clockwise.
 Point2D intersection(LinearShape2D line)
          Returns the unique intersection with a linear shape.
 Point2D origin()
          Returns a point in the linear shape.
 StraightLine2D supportingLine()
          Returns the straight line that contains this linear shape.
 LinearShape2D transform(AffineTransform2D trans)
          Transforms this linear shape.
 
Methods inherited from interface math.geom2d.circulinear.CirculinearCurve2D
clip, continuousCurves, length, length, parallel, position, reverse, subCurve, transform
 
Methods inherited from interface math.geom2d.circulinear.CirculinearShape2D
buffer
 
Methods inherited from interface math.geom2d.curve.Curve2D
asAwtShape, clone, draw, firstPoint, getT0, getT1, intersections, isSingular, lastPoint, point, position, project, singularPoints, t0, t1, vertices
 
Methods inherited from interface math.geom2d.Shape2D
boundingBox, contains, contains, distance, distance, isBounded, isEmpty
 
Methods inherited from interface math.geom2d.GeometricObject2D
almostEquals
 

Method Detail

supportingLine

StraightLine2D supportingLine()
Returns the straight line that contains this linear shape. The direction is the same, and if possible the direction vector should be the same.

Returns:
the straight line that contains this linear shape

horizontalAngle

double horizontalAngle()
Returns the angle with axis (O,i), counted counter-clockwise. Result is given between 0 and 2*pi.


origin

Point2D origin()
Returns a point in the linear shape.

Returns:
a point in the linear shape.

direction

Vector2D direction()
Return one direction vector of the linear shape.

Returns:
a direction vector

intersection

Point2D intersection(LinearShape2D line)
Returns the unique intersection with a linear shape. If the intersection doesn't exist (parallel lines), returns null.


transform

LinearShape2D transform(AffineTransform2D trans)
Transforms this linear shape.

Specified by:
transform in interface Curve2D
Specified by:
transform in interface Shape2D
Parameters:
trans - an affine transform
Returns:
the transformed shape