Class Tuple3f

Object
org.anchoranalysis.spatial.point.Tuple3f
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Point3f

public abstract class Tuple3f
extends Object
implements Serializable
A three-dimensional tuple of float values.
Author:
Owen Feehan
See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected float x
    X-axis component of the tuple.
    protected float y
    Y-axis component of the tuple.
    protected float z
    Z-axis component of the tuple.
  • Constructor Summary

    Constructors 
    Constructor Description
    Tuple3f()  
  • Method Summary

    Modifier and Type Method Description
    protected boolean canEqual​(Object other)  
    boolean equals​(Object o)  
    int hashCode()  
    void setValueByDimension​(int dimensionIndex, float valueToAssign)
    Assigns a value to a component of a tuple corresponding to a particular dimension by index.
    String toString()  
    float valueByDimension​(int dimensionIndex)
    A component of a tuple corresponding to a particular dimension by index.
    float valueByDimension​(Axis axis)
    A component of a tuple corresponding to a particular axis.
    float x()
    X-axis component of the tuple.
    Tuple3f x​(float x)
    X-axis component of the tuple.
    float y()
    Y-axis component of the tuple.
    Tuple3f y​(float y)
    Y-axis component of the tuple.
    float z()
    Z-axis component of the tuple.
    Tuple3f z​(float z)
    Z-axis component of the tuple.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      protected float x
      X-axis component of the tuple.
    • y

      protected float y
      Y-axis component of the tuple.
    • z

      protected float z
      Z-axis component of the tuple.
  • Constructor Details

  • Method Details

    • valueByDimension

      public final float valueByDimension​(Axis axis)
      A component of a tuple corresponding to a particular axis.
      Parameters:
      axis - the axis.
      Returns:
      the component of the tuple corresponding to that axis.
    • valueByDimension

      public final float valueByDimension​(int dimensionIndex)
      A component of a tuple corresponding to a particular dimension by index.
      Parameters:
      dimensionIndex - the index corresponding to an axis, as per AxisConverter.
      Returns:
      the component of the tuple corresponding to that axis.
    • setValueByDimension

      public final void setValueByDimension​(int dimensionIndex, float valueToAssign)
      Assigns a value to a component of a tuple corresponding to a particular dimension by index.
      Parameters:
      dimensionIndex - the index corresponding to an axis, as per AxisConverter.
      valueToAssign - the value to assign.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • x

      public float x()
      X-axis component of the tuple.
    • y

      public float y()
      Y-axis component of the tuple.
    • z

      public float z()
      Z-axis component of the tuple.
    • x

      public Tuple3f x​(float x)
      X-axis component of the tuple.
      Returns:
      this.
    • y

      public Tuple3f y​(float y)
      Y-axis component of the tuple.
      Returns:
      this.
    • z

      public Tuple3f z​(float z)
      Z-axis component of the tuple.
      Returns:
      this.
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual​(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object