Class Coordinate

java.lang.Object
com.luciad.cartesian.Coordinate

public final class Coordinate extends Object
A "POD" for a 3D coordinate.

Not a geometry, to be used as primitive in geometries.

  • Constructor Details

    • Coordinate

      public Coordinate()
      Constructs a coordinate with default values for x, y, and z using 0.
    • Coordinate

      public Coordinate(double x, double y)
      Constructs a coordinate with the provide values for x, y, and z.
      Parameters:
      x - the x value of the coordinate.
      y - the y value of the coordinate.
    • Coordinate

      public Coordinate(double x, double y, double z)
      Constructs a coordinate with the provide values for x, y, and z.
      Parameters:
      x - the x value of the coordinate.
      y - the y value of the coordinate.
      z - the z value of the coordinate.
  • Method Details

    • getX

      public double getX()
      The x value of the coordinate.
    • getY

      public double getY()
      The y value of the coordinate.
    • getZ

      public double getZ()
      The z value of the coordinate.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Returns the hash for this coordinate.
      Overrides:
      hashCode in class Object
      Returns:
      the hash for this coordinate.
    • toString

      @NotNull public String toString()
      Overrides:
      toString in class Object
    • add

      @NotNull public Coordinate add(@NotNull Coordinate other)
    • subtract

      @NotNull public Coordinate subtract(@NotNull Coordinate other)
    • multiply

      @NotNull public Coordinate multiply(double factor)
    • divide

      @NotNull public Coordinate divide(double factor)