Class Tuple3f

Object
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:
  • Field Summary

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    int
     
    final void
    setValueByDimension(int dimensionIndex, float valueToAssign)
    Assigns a value to a component of a tuple corresponding to a particular dimension by index.
     
    final float
    valueByDimension(int dimensionIndex)
    A component of a tuple corresponding to a particular dimension by index.
    final float
    A component of a tuple corresponding to a particular axis.
    float
    x()
    X-axis component of the tuple.
    x(float x)
    X-axis component of the tuple.
    float
    y()
    Y-axis component of the tuple.
    y(float y)
    Y-axis component of the tuple.
    float
    z()
    Z-axis component of the tuple.
    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

    • Tuple3f

      public Tuple3f()
  • 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