1 /**
2 *
3 */
4
5 package math.geom2d.line;
6
7 import math.geom2d.AffineTransform2D;
8 import math.geom2d.Point2D;
9 import math.geom2d.Vector2D;
10 import math.geom2d.circulinear.CirculinearCurve2D;
11
12 /**
13 * A curve that can be inscribed in a straight line, line a ray, a straight
14 * line, or a line segment.
15 *
16 * @author dlegland
17 */
18 public interface LinearShape2D extends CirculinearCurve2D {
19
20 public abstract StraightLine2D getSupportingLine();
21
22 /**
23 * Gets Angle with axis (O,i), counted counter-clockwise. Result is given
24 * between 0 and 2*pi.
25 */
26 public abstract double getHorizontalAngle();
27
28 /**
29 * Returns a point in the linear shape.
30 *
31 * @return a point in the linear shape.
32 */
33 public abstract Point2D getOrigin();
34
35 /**
36 * Return one direction vector of the linear shape.
37 *
38 * @return a direction vector
39 */
40 public abstract Vector2D getVector();
41
42 /**
43 * Returns the unique intersection with a linear shape. If the intersection
44 * doesn't exist (parallel lines), returns null.
45 */
46 public abstract Point2D getIntersection(LinearShape2D line);
47
48 public LinearShape2D transform(AffineTransform2D trans);
49 }