T
- the type of the field elementspublic class FieldLine<T extends RealFieldElement<T>> extends Object
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.
Constructor and Description |
---|
FieldLine(FieldLine<T> line)
Copy constructor.
|
FieldLine(FieldVector3D<T> p1,
FieldVector3D<T> p2,
double tolerance)
Build a line from two points.
|
Modifier and Type | Method and Description |
---|---|
FieldVector3D<T> |
closestPoint(FieldLine<T> line)
Compute the point of the instance closest to another line.
|
boolean |
contains(FieldVector3D<T> p)
Check if the instance contains a point.
|
boolean |
contains(Vector3D p)
Check if the instance contains a point.
|
T |
distance(FieldLine<T> line)
Compute the shortest distance between the instance and another line.
|
T |
distance(FieldVector3D<T> p)
Compute the distance between the instance and a point.
|
T |
distance(Vector3D p)
Compute the distance between the instance and a point.
|
T |
getAbscissa(FieldVector3D<T> point)
Get the abscissa of a point with respect to the line.
|
T |
getAbscissa(Vector3D point)
Get the abscissa of a point with respect to the line.
|
FieldVector3D<T> |
getDirection()
Get the normalized direction vector.
|
FieldVector3D<T> |
getOrigin()
Get the line point closest to the origin.
|
double |
getTolerance()
Get the tolerance below which points are considered identical.
|
FieldVector3D<T> |
intersection(FieldLine<T> line)
Get the intersection point of the instance and another line.
|
boolean |
isSimilarTo(FieldLine<T> line)
Check if the instance is similar to another line.
|
FieldVector3D<T> |
pointAt(double abscissa)
Get one point from the line.
|
FieldVector3D<T> |
pointAt(T abscissa)
Get one point from the line.
|
void |
reset(FieldVector3D<T> p1,
FieldVector3D<T> p2)
Reset the instance as if built from two points.
|
FieldLine<T> |
revert()
Get a line with reversed direction.
|
public FieldLine(FieldVector3D<T> p1, FieldVector3D<T> p2, double tolerance) throws MathIllegalArgumentException
p1
- first point belonging to the line (this can be any point)p2
- second point belonging to the line (this can be any point, different from p1)tolerance
- tolerance below which points are considered identicalMathIllegalArgumentException
- if the points are equalpublic void reset(FieldVector3D<T> p1, FieldVector3D<T> p2) throws MathIllegalArgumentException
p1
- first point belonging to the line (this can be any point)p2
- second point belonging to the line (this can be any point, different from p1)MathIllegalArgumentException
- if the points are equalpublic double getTolerance()
public FieldLine<T> revert()
public FieldVector3D<T> getDirection()
public FieldVector3D<T> getOrigin()
public T getAbscissa(FieldVector3D<T> point)
The abscissa is 0 if the projection of the point and the projection of the frame origin on the line are the same point.
point
- point to checkpublic T getAbscissa(Vector3D point)
The abscissa is 0 if the projection of the point and the projection of the frame origin on the line are the same point.
point
- point to checkpublic FieldVector3D<T> pointAt(T abscissa)
abscissa
- desired abscissa for the pointpublic FieldVector3D<T> pointAt(double abscissa)
abscissa
- desired abscissa for the pointpublic boolean isSimilarTo(FieldLine<T> line)
Lines are considered similar if they contain the same points. This does not mean they are equal since they can have opposite directions.
line
- line to which instance should be comparedpublic boolean contains(FieldVector3D<T> p)
p
- point to checkpublic boolean contains(Vector3D p)
p
- point to checkpublic T distance(FieldVector3D<T> p)
p
- to checkpublic T distance(Vector3D p)
p
- to checkpublic T distance(FieldLine<T> line)
line
- line to check against the instancepublic FieldVector3D<T> closestPoint(FieldLine<T> line)
line
- line to check against the instancepublic FieldVector3D<T> intersection(FieldLine<T> line)
line
- other lineCopyright © 2016–2019 Hipparchus.org. All rights reserved.