Each oriented line is intrinsically associated with an abscissa which is a coordinate on the line. The point at abscissa 0 is the orthogonal projection of the origin on the line, another equivalent way to express this is to say that it is the point of the line which is closest to the origin. Abscissa increases in the line direction.
| Modifier and Type | Field and Description |
|---|---|
| private static final double | DEFAULT_TOLERANCE
Default value for tolerance. |
| private Vector3D | direction
Line direction. |
| private final double | tolerance
Tolerance below which points are considered identical. |
| private Vector3D | zero
Line point closest to the origin. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | Line(final Vector3D
first point belonging to the line (this can be any point) p1, final Vector3D second point belonging to the line (this can be any point, different from p1) p2)
Deprecated
as of 3.3, replaced with
Line(Vector3D, Vector3D, double)
Build a line from two points. |
| Modifier and Type | Method and Description |
|---|---|
| public Vector3D | Returns: point of the instance closest to another lineline to check against the instance line)Compute the point of the instance closest to another line. |
| public boolean | |
| public double | |
| public double | |
| public double | Returns: abscissa of the pointpoint to check point)Get the abscissa of a point with respect to the line. |
| public Vector3D | |
| public Vector3D | |
| public double | Returns: tolerance below which points are considered identicalGet the tolerance below which points are considered identical. |
| public Vector3D | Returns: intersection point of the instance and the other line or null if there are no intersection pointsother line line)Get the intersection point of the instance and another line. |
| public boolean | Returns: true if the lines are similarline to which instance should be compared line)Check if the instance is similar to another line. |
| public Vector3D | Returns: one point belonging to the line, at specified abscissadesired abscissa for the point abscissa)Get one point from the line. |
| public void | |
| public Line | |
| public Vector3D | Returns: n-dimension point of the space corresponding to the specified sub-space point(n-1)-dimension point of the sub-space vector)Transform a sub-space point into a space point. |
| public Vector3D | toSpace(final Point<Euclidean1D>
(n-1)-dimension point of the sub-space point)Implements org. Transform a sub-space point into a space point. |
| public Vector1D | Returns: (n-1)-dimension point of the sub-space corresponding to the specified space pointn-dimension point of the space vector)Transform a space point into a sub-space point. |
| public Vector1D | toSubSpace(final Point<Euclidean3D>
n-dimension point of the space point)Implements org. Transform a space point into a sub-space point. |
| public SubLine |
| DEFAULT_TOLERANCE | back to summary |
|---|---|
| private static final double DEFAULT_TOLERANCE Default value for tolerance. | |
| direction | back to summary |
|---|---|
| private Vector3D direction Line direction. | |
| tolerance | back to summary |
|---|---|
| private final double tolerance Tolerance below which points are considered identical. | |
| zero | back to summary |
|---|---|
| private Vector3D zero Line point closest to the origin. | |
| Line | back to summary |
|---|---|
| public Line(final Vector3D p1, final Vector3D p2, final double tolerance) throws MathIllegalArgumentException Build a line from two points.
| |
| Line | back to summary |
|---|---|
| public Line(final Line line) Copy constructor. The created instance is completely independent from the original instance, it is a deep copy.
| |
| Line | back to summary |
|---|---|
| public Line(final Vector3D p1, final Vector3D p2) throws MathIllegalArgumentException
Deprecated as of 3.3, replaced with Build a line from two points.
| |
| closestPoint | back to summary |
|---|---|
| public Vector3D closestPoint(final Line line) Compute the point of the instance closest to another line. | |
| contains | back to summary |
|---|---|
| public boolean contains(final Vector3D p) Check if the instance contains a point.
| |
| distance | back to summary |
|---|---|
| public double distance(final Vector3D p) Compute the distance between the instance and a point.
| |
| distance | back to summary |
|---|---|
| public double distance(final Line line) Compute the shortest distance between the instance and another line.
| |
| getAbscissa | back to summary |
|---|---|
| public double getAbscissa(final Vector3D point) Get the abscissa of a point with respect to the line. The abscissa is 0 if the projection of the point and the projection of the frame origin on the line are the same point.
| |
| getDirection | back to summary |
|---|---|
| public Vector3D getDirection() Get the normalized direction vector.
| |
| getOrigin | back to summary |
|---|---|
| public Vector3D getOrigin() Get the line point closest to the origin.
| |
| getTolerance | back to summary |
|---|---|
| public double getTolerance() Get the tolerance below which points are considered identical.
| |
| intersection | back to summary |
|---|---|
| public Vector3D intersection(final Line line) Get the intersection point of the instance and another line. | |
| isSimilarTo | back to summary |
|---|---|
| public boolean isSimilarTo(final Line line) Check if the instance is similar to another line. Lines are considered similar if they contain the same points. This does not mean they are equal since they can have opposite directions.
| |
| pointAt | back to summary |
|---|---|
| public Vector3D pointAt(final double abscissa) Get one point from the line.
| |
| reset | back to summary |
|---|---|
| public void reset(final Vector3D p1, final Vector3D p2) throws MathIllegalArgumentException Reset the instance as if built from two points.
| |
| revert | back to summary |
|---|---|
| public Line revert() Get a line with reversed direction.
| |
| toSpace | back to summary |
|---|---|
| public Vector3D toSpace(Vector<Euclidean1D> vector) Transform a sub-space point into a space point.
| |
| toSpace | back to summary |
|---|---|
| public Vector3D toSpace(final Point<Euclidean1D> point) Implements org. Doc from org. Transform a sub-space point into a space point.
| |
| toSubSpace | back to summary |
|---|---|
| public Vector1D toSubSpace(Vector<Euclidean3D> vector) Transform a space point into a sub-space point.
| |
| toSubSpace | back to summary |
|---|---|
| public Vector1D toSubSpace(final Point<Euclidean3D> point) Implements org. Doc from org. Transform a space point into a sub-space point.
| |
| wholeLine | back to summary |
|---|---|
| public SubLine wholeLine() Build a sub-line covering the whole line.
| |