Package javax.vecmath

Class Tuple3b

java.lang.Object
javax.vecmath.Tuple3b
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Color3b

public abstract class Tuple3b extends Object implements Serializable
A three byte tuple.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    byte
    The first value.
    byte
    The second value.
    byte
    The third value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs and initializes a Tuple3b to (0,0,0).
    Tuple3b(byte[] t)
    Constructs and initializes a Tuple3b from input array of length 3.
    Tuple3b(byte b1, byte b2, byte b3)
    Constructs and initializes a Tuple3b from the specified three values.
    Constructs and initializes a Tuple3b from the specified Tuple3b.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the Object o1 is of type Tuple3b and all of the data members of t1 are equal to the corresponding data members in this Tuple3b.
    boolean
    Returns true if all of the data members of Tuple3b t1 are equal to the corresponding data members in this
    final void
    get(byte[] t)
    Places the value of the x,y,z components of this Tuple3b into the array of length 3.
    final void
    Places the value of the x,y,z components of this tuple into the tuple t1.
    int
    Returns a hash number based on the data values in this object.
    final void
    set(byte[] t)
    Sets the value of the data members of this tuple to the value of the argument tuple t1.
    final void
    Sets the value of the data members of this tuple to the value of the argument tuple t1.
    Returns a string that contains the values of this Tuple3b.

    Methods inherited from class java.lang.Object

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

    • x

      public byte x
      The first value.
    • y

      public byte y
      The second value.
    • z

      public byte z
      The third value.
  • Constructor Details

    • Tuple3b

      public Tuple3b(byte b1, byte b2, byte b3)
      Constructs and initializes a Tuple3b from the specified three values.
      Parameters:
      b1 - the first value
      b2 - the second value
      b3 - the third value
    • Tuple3b

      public Tuple3b(byte[] t)
      Constructs and initializes a Tuple3b from input array of length 3.
      Parameters:
      t - the array of length 3 containing b1 b2 b3 in order
    • Tuple3b

      public Tuple3b(Tuple3b t1)
      Constructs and initializes a Tuple3b from the specified Tuple3b.
      Parameters:
      t1 - the Tuple3b containing the initialization x y z data
    • Tuple3b

      public Tuple3b()
      Constructs and initializes a Tuple3b to (0,0,0).
  • Method Details

    • set

      public final void set(Tuple3b t1)
      Sets the value of the data members of this tuple to the value of the argument tuple t1.
      Parameters:
      t1 - the source tuple for the memberwise copy
    • set

      public final void set(byte[] t)
      Sets the value of the data members of this tuple to the value of the argument tuple t1.
      Parameters:
      t - array of length 3 which is the source for the memberwise copy
    • get

      public final void get(byte[] t)
      Places the value of the x,y,z components of this Tuple3b into the array of length 3.
      Parameters:
      t - array of length 3 into which the component values are copied
    • get

      public final void get(Tuple3b t)
      Places the value of the x,y,z components of this tuple into the tuple t1.
      Parameters:
      t - the tuple into which the values are placed
    • hashCode

      public int hashCode()
      Returns a hash number based on the data values in this object. Two different Tuple3b objects with identical data values (ie, returns true for equals(Tuple3b) ) will return the same hash number. Two vectors with different data members may return the same hash value, although this is not likely.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Tuple3b t1)
      Returns true if all of the data members of Tuple3b t1 are equal to the corresponding data members in this
      Parameters:
      t1 - the vector with which the comparison is made.
    • equals

      public boolean equals(Object o1)
      Returns true if the Object o1 is of type Tuple3b and all of the data members of t1 are equal to the corresponding data members in this Tuple3b.
      Overrides:
      equals in class Object
      Parameters:
      o1 - the object with which the comparison is made.
    • toString

      public String toString()
      Returns a string that contains the values of this Tuple3b. The form is (x,y,z).
      Overrides:
      toString in class Object
      Returns:
      the String representation