Class GeoTuple4D_F64<T extends GeoTuple4D_F64>

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Point4D_F64, Vector4D_F64

public abstract class GeoTuple4D_F64<T extends GeoTuple4D_F64> extends GeoTuple_F64<T>
Generic Tuple for geometric objects that store (x,y,z,w)
See Also:
  • Field Details

    • x

      public double x
    • y

      public double y
    • z

      public double z
    • w

      public double w
  • Constructor Details

    • GeoTuple4D_F64

      protected GeoTuple4D_F64(double x, double y, double z, double w)
    • GeoTuple4D_F64

      protected GeoTuple4D_F64()
  • Method Details

    • getDimension

      public int getDimension()
      Description copied from class: GeoTuple
      The dimensionality of space the tuple is contained in and the number of values it has.
      Specified by:
      getDimension in class GeoTuple<T extends GeoTuple4D_F64>
      Returns:
      Dimensionality of the object.
    • _setTo

      protected void _setTo(GeoTuple4D_F64 a)
    • setTo

      public T setTo(GeoTuple3D_F64<?> p, double w)
    • setTo

      public T setTo(double x, double y, double z, double w)
    • zero

      public void zero()
      Description copied from class: GeoTuple
      Sets all coefficients and parameters to zero, which is typically the initial state.
      Specified by:
      zero in class GeoTuple<T extends GeoTuple4D_F64>
    • isIdentical

      public boolean isIdentical(double x, double y, double z, double w)
    • isIdentical

      public boolean isIdentical(double x, double y, double z, double w, double tol)
    • isIdentical

      public boolean isIdentical(GeoTuple4D_F64 t, double tol)
      Description copied from class: GeoTuple_F64
      Checks to see if the two GeoTuple have values which are nearly the same. False is always returned if the dimension is different.
      Overrides:
      isIdentical in class GeoTuple_F64<T extends GeoTuple4D_F64>
      Parameters:
      t - The GeoTuple it is being compared against.
      tol - How similar each element must be for them to be considered identical.
      Returns:
      if they are identical or not.
    • getIdx

      public double getIdx(int index)
      Description copied from class: GeoTuple_F64
      Returns the value of the tuple along the specified coordinate system axis.
      Specified by:
      getIdx in class GeoTuple_F64<T extends GeoTuple4D_F64>
      Parameters:
      index - Which axis in the coordinate system.
      Returns:
      Its value.
    • setIdx

      public void setIdx(int index, double value)
      Specified by:
      setIdx in class GeoTuple_F64<T extends GeoTuple4D_F64>
    • scale

      public void scale(double scalar)
    • plusIP

      public void plusIP(GeoTuple4D_F64 a)

      In-place addition

      this.x = this.x + a.x;
      Parameters:
      a - value which is to be added
    • times

      public T times(double scalar)
    • timesIP

      public void timesIP(double scalar)
      In-place scalar multiplication
      Parameters:
      scalar - value that it is multiplied by
    • divideIP

      public void divideIP(double scalar)
    • normalize

      public void normalize()
    • norm

      public double norm()
      Description copied from class: GeoTuple_F64
      Computes the Euclidean norm.
      Overrides:
      norm in class GeoTuple_F64<T extends GeoTuple4D_F64>
      Returns:
      norm.
    • normSq

      public double normSq()
      Description copied from class: GeoTuple_F64
      Computes the square of the Euclidean norm.
      Overrides:
      normSq in class GeoTuple_F64<T extends GeoTuple4D_F64>
      Returns:
      norm squared.
    • distance

      public double distance(GeoTuple4D_F64 t)
      Overrides:
      distance in class GeoTuple_F64<T extends GeoTuple4D_F64>
    • distance

      public double distance(double x, double y, double z, double w)
    • distance2

      public double distance2(GeoTuple4D_F64 t)
      Overrides:
      distance2 in class GeoTuple_F64<T extends GeoTuple4D_F64>
    • distance2

      public double distance2(double x, double y, double z, double w)
    • print

      public void print()
    • isNaN

      public boolean isNaN()
      Description copied from class: GeoTuple_F64
      Returns true if at least one value is NaN
      Overrides:
      isNaN in class GeoTuple_F64<T extends GeoTuple4D_F64>
    • maxAbs

      public double maxAbs()
      Returns the absolute value of the component with the largest absolute value
      Returns:
      max absolute value
    • setTo

      public T setTo(T src)
      Description copied from class: GeoTuple
      Sets this equal to 'src'
      Specified by:
      setTo in class GeoTuple<T extends GeoTuple4D_F64>
      Parameters:
      src - The tuple being copied
      Returns:
      Reference to 'this' class instance. Used to chain operations.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class GeoTuple_F64<T extends GeoTuple4D_F64>
    • toString

      protected String toString(String name)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class GeoTuple_F64<T extends GeoTuple4D_F64>