Class Tuple4b
java.lang.Object
javax.vecmath.Tuple4b
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Color4b
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTuple4b()
Constructs and initializes a Tuple4b to (0,0,0,0).Tuple4b
(byte[] t) Constructs and initializes a Tuple4b from input array of length 4.Tuple4b
(byte b1, byte b2, byte b3, byte b4) Constructs and initializes a Tuple4b from the specified three values.Constructs and initializes a Tuple4b from the specified Tuple4b. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if all of the data members of Tuple4b t1 are equal to the corresponding data members in thisfinal void
get
(byte[] t) Places the value of the x,y,z components of this Tuple4b into the array of length 4.final void
Places the value of the x,y,z components of this tuple into the tuple t1.int
hashCode()
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.toString()
Returns a string that contains the values of this Tuple4b.
-
Field Details
-
x
public byte xThe first value. -
y
public byte yThe second value. -
z
public byte zThe third value. -
w
public byte wThe fourth value.
-
-
Constructor Details
-
Tuple4b
public Tuple4b(byte b1, byte b2, byte b3, byte b4) Constructs and initializes a Tuple4b from the specified three values.- Parameters:
b1
- the first valueb2
- the second valueb3
- the third valueb4
- the fourth value
-
Tuple4b
public Tuple4b(byte[] t) Constructs and initializes a Tuple4b from input array of length 4.- Parameters:
t
- the array of length 4 containing b1 b2 b3 b4 in order
-
Tuple4b
Constructs and initializes a Tuple4b from the specified Tuple4b.- Parameters:
t1
- the Tuple4b containing the initialization x y z w data
-
Tuple4b
public Tuple4b()Constructs and initializes a Tuple4b to (0,0,0,0).
-
-
Method Details
-
set
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 4 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 Tuple4b into the array of length 4.- Parameters:
t
- array of length 4 into which the component values are copied
-
get
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 Tuple4b objects with identical data values (ie, returns true for equals(Tuple4b) ) will return the same hash number. Two vectors with different data members may return the same hash value, although this is not likely. -
equals
Returns true if all of the data members of Tuple4b t1 are equal to the corresponding data members in this- Parameters:
t1
- the vector with which the comparison is made.
-
toString
-