Class GeoTuple3D_F32<T extends GeoTuple3D_F32>

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Point3D_F32, Vector3D_F32

@Generated("georegression.struct.GeoTuple3D_F64") public abstract class GeoTuple3D_F32<T extends GeoTuple3D_F32> extends GeoTuple_F32<T>
Generic Tuple for geometric objects that store (x,y,z)
See Also:
  • Field Details

    • x

      public float x
    • y

      public float y
    • z

      public float z
  • Constructor Details

    • GeoTuple3D_F32

      protected GeoTuple3D_F32(float x, float y, float z)
    • GeoTuple3D_F32

      protected GeoTuple3D_F32()
  • 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 GeoTuple3D_F32>
      Returns:
      Dimensionality of the object.
    • _setTo

      protected void _setTo(GeoTuple3D_F32 a)
    • setTo

      public T setTo(GeoTuple2D_F32<?> p, float z)
    • setTo

      public T setTo(float x, float y, float z)
    • 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 GeoTuple3D_F32>
    • isIdentical

      public boolean isIdentical(float x, float y, float z)
    • isIdentical

      public boolean isIdentical(float x, float y, float z, float tol)
    • isIdentical

      public boolean isIdentical(GeoTuple3D_F32 t, float tol)
      Description copied from class: GeoTuple_F32
      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_F32<T extends GeoTuple3D_F32>
      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 float getIdx(int index)
      Description copied from class: GeoTuple_F32
      Returns the value of the tuple along the specified coordinate system axis.
      Specified by:
      getIdx in class GeoTuple_F32<T extends GeoTuple3D_F32>
      Parameters:
      index - Which axis in the coordinate system.
      Returns:
      Its value.
    • setIdx

      public void setIdx(int index, float value)
      Specified by:
      setIdx in class GeoTuple_F32<T extends GeoTuple3D_F32>
    • plusIP

      public void plusIP(GeoTuple3D_F32 a)

      In-place addition

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

      public T plus(GeoTuple3D_F32 a)

      Addition

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

      public void plusIP(float alpha, GeoTuple3D_F32 a)

      In-place addition

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

      public T plus(float alpha, GeoTuple3D_F32 a)

      Addition

      ret.x = this.x + alpha*a.x;
      Parameters:
      a - value which is to be added
    • timesIP

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

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

      public void divideIP(float scalar)
    • times

      public T times(float scalar)
      Scalar multiplication
      Parameters:
      scalar - value which is it multiplied by
      Returns:
      new matrix which is the original scaled
    • norm

      public float norm()
      Description copied from class: GeoTuple_F32
      Computes the Euclidean norm.
      Overrides:
      norm in class GeoTuple_F32<T extends GeoTuple3D_F32>
      Returns:
      norm.
    • normSq

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

      public float distance(float x, float y, float z)
    • setTo

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

      public float distance(GeoTuple3D_F32 t)
      Overrides:
      distance in class GeoTuple_F32<T extends GeoTuple3D_F32>
    • distance2

      public float distance2(GeoTuple3D_F32 t)
      Overrides:
      distance2 in class GeoTuple_F32<T extends GeoTuple3D_F32>
    • distance2

      public float distance2(float x, float y, float z)
    • print

      public void print()
    • isNaN

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

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

      public String toString(String name)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class GeoTuple_F32<T extends GeoTuple3D_F32>