Interface Point<S extends Space,P extends Point<S,P>>

Type Parameters:
S - Type of the space.
P - Type of the points in space.
All Superinterfaces:
Serializable
All Known Subinterfaces:
Vector<S,V>
All Known Implementing Classes:
S1Point, S2Point, Vector1D, Vector2D, Vector3D

public interface Point<S extends Space,P extends Point<S,P>> extends Serializable
This interface represents a generic geometrical point.
See Also:
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    double
    Compute the distance between the instance and another point.
    Get the space to which the point belongs.
    boolean
    Returns true if any coordinate of this point is NaN; false otherwise
    moveTowards(P other, double ratio)
    Move towards another point.
  • Method Details Link icon

    • getSpace Link icon

      Space getSpace()
      Get the space to which the point belongs.
      Returns:
      containing space
    • isNaN Link icon

      boolean isNaN()
      Returns true if any coordinate of this point is NaN; false otherwise
      Returns:
      true if any coordinate of this point is NaN; false otherwise
    • distance Link icon

      double distance(P p)
      Compute the distance between the instance and another point.
      Parameters:
      p - second point
      Returns:
      the distance between the instance and p
    • moveTowards Link icon

      P moveTowards(P other, double ratio)
      Move towards another point.

      Motion is linear (along space curvature) and based on a ratio where 0.0 stands for not moving at all, 0.5 stands for moving halfway towards other point, and 1.0 stands for moving fully to the other point.

      Parameters:
      other - other point
      ratio - motion ratio,
      Returns:
      moved point
      Since:
      4.0