private class AlignInLineAction.Line extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private double |
a
Line equation ax + by + c = 0
Such as a^2 + b^2 = 1, ie (-b, a) is a unit vector of line
|
private double |
b
Line equation ax + by + c = 0
Such as a^2 + b^2 = 1, ie (-b, a) is a unit vector of line
|
private double |
c
Line equation ax + by + c = 0
Such as a^2 + b^2 = 1, ie (-b, a) is a unit vector of line
|
private double |
xM
(xM, yM) are coordinates of a point of the line
|
private double |
yM
(xM, yM) are coordinates of a point of the line
|
| Constructor and Description |
|---|
Line(Node first,
Node last)
Init a line by 2 nodes.
|
Line(Way way)
Init a line equation from a way.
|
| Modifier and Type | Method and Description |
|---|---|
Command |
intersectionCommand(Node n,
AlignInLineAction.Line other)
Intersection of two line.
|
Command |
projectionCommand(Node n)
Orthogonal projection of a node N along this line.
|
private double a
private double b
private double c
private double xM
private double yM
public Line(Node first, Node last) throws AlignInLineAction.InvalidSelection
first - On point of the linelast - Other point of the lineAlignInLineAction.InvalidSelectionpublic Line(Way way) throws AlignInLineAction.InvalidSelection
way - Use extremity of this way to compute line equationAlignInLineAction.InvalidSelectionpublic Command projectionCommand(Node n)
n - Node to be projectedpublic Command intersectionCommand(Node n, AlignInLineAction.Line other) throws AlignInLineAction.InvalidSelection
n - Node to move to the intersectionother - Second line for intersectionAlignInLineAction.InvalidSelection