Class FieldLine<T extends CalculusFieldElement<T>>

java.lang.Object
org.hipparchus.geometry.euclidean.threed.FieldLine<T>
Type Parameters:
T - the type of the field elements

public class FieldLine<T extends CalculusFieldElement<T>> extends Object
The class represent lines in a three dimensional space.

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 Details Link icon

    • FieldLine Link icon

      public FieldLine(FieldVector3D<T> p1, FieldVector3D<T> p2, double tolerance) throws MathIllegalArgumentException
      Build a line from two points.
      Parameters:
      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 identical
      Throws:
      MathIllegalArgumentException - if the points are equal
    • FieldLine Link icon

      public FieldLine(FieldLine<T> line)
      Copy constructor.

      The created instance is completely independent from the original instance, it is a deep copy.

      Parameters:
      line - line to copy
  • Method Details Link icon

    • reset Link icon

      public void reset(FieldVector3D<T> p1, FieldVector3D<T> p2) throws MathIllegalArgumentException
      Reset the instance as if built from two points.
      Parameters:
      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)
      Throws:
      MathIllegalArgumentException - if the points are equal
    • getTolerance Link icon

      public double getTolerance()
      Get the tolerance below which points are considered identical.
      Returns:
      tolerance below which points are considered identical
    • revert Link icon

      public FieldLine<T> revert()
      Get a line with reversed direction.
      Returns:
      a new instance, with reversed direction
    • getDirection Link icon

      public FieldVector3D<T> getDirection()
      Get the normalized direction vector.
      Returns:
      normalized direction vector
    • getOrigin Link icon

      public FieldVector3D<T> getOrigin()
      Get the line point closest to the origin.
      Returns:
      line point closest to the origin
    • getAbscissa Link icon

      public T getAbscissa(FieldVector3D<T> 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.

      Parameters:
      point - point to check
      Returns:
      abscissa of the point
    • getAbscissa Link icon

      public T getAbscissa(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.

      Parameters:
      point - point to check
      Returns:
      abscissa of the point
    • pointAt Link icon

      public FieldVector3D<T> pointAt(T abscissa)
      Get one point from the line.
      Parameters:
      abscissa - desired abscissa for the point
      Returns:
      one point belonging to the line, at specified abscissa
    • pointAt Link icon

      public FieldVector3D<T> pointAt(double abscissa)
      Get one point from the line.
      Parameters:
      abscissa - desired abscissa for the point
      Returns:
      one point belonging to the line, at specified abscissa
    • isSimilarTo Link icon

      public boolean isSimilarTo(FieldLine<T> 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.

      Parameters:
      line - line to which instance should be compared
      Returns:
      true if the lines are similar
    • contains Link icon

      public boolean contains(FieldVector3D<T> p)
      Check if the instance contains a point.
      Parameters:
      p - point to check
      Returns:
      true if p belongs to the line
    • contains Link icon

      public boolean contains(Vector3D p)
      Check if the instance contains a point.
      Parameters:
      p - point to check
      Returns:
      true if p belongs to the line
    • distance Link icon

      public T distance(FieldVector3D<T> p)
      Compute the distance between the instance and a point.
      Parameters:
      p - to check
      Returns:
      distance between the instance and the point
    • distance Link icon

      public T distance(Vector3D p)
      Compute the distance between the instance and a point.
      Parameters:
      p - to check
      Returns:
      distance between the instance and the point
    • distance Link icon

      public T distance(FieldLine<T> line)
      Compute the shortest distance between the instance and another line.
      Parameters:
      line - line to check against the instance
      Returns:
      shortest distance between the instance and the line
    • closestPoint Link icon

      public FieldVector3D<T> closestPoint(FieldLine<T> line)
      Compute the point of the instance closest to another line.
      Parameters:
      line - line to check against the instance
      Returns:
      point of the instance closest to another line
    • intersection Link icon

      public FieldVector3D<T> intersection(FieldLine<T> line)
      Get the intersection point of the instance and another line.
      Parameters:
      line - other line
      Returns:
      intersection point of the instance and the other line or null if there are no intersection points