# Class T3i

java.lang.Object
javajs.util.T3i

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `P3i`

public abstract class T3i extends Object implements Serializable
A 3-element tuple represented by signed integer x,y,z coordinates.

Since:
  Java 3D 1.2
Version:
  specification 1.2, implementation $Revision: 1.9 $, $Date: 2006/07/28 17:01:32 $
Author:
  Kenji hiranabe additions by Bob Hanson hansonr@stolaf.edu 9/30/2012 for unique constructor and method names for the optimization of compiled JavaScript using Java2Script
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`x`
The x coordinate.
`int`
`y`
The y coordinate.
`int`
`z`
The z coordinate.

## Constructor Summary

Constructors
Constructor
Description
`T3i()`
Constructs and initializes a Tuple3i to (0,0,0).

## Method Summary

Modifier and Type
Method
Description
`final void`
`add(T3i t)`
Sets the value of this tuple to the sum of itself and t1.
`String`
`asString()`
`boolean`
`equals(Object o)`
Returns true if the Object o is of type Tuple3i and all of the data members of t are equal to the corresponding data members in this Tuple3i.
`int`
`hashCode()`
Returns a hash number based on the data values in this object.
`final void`
`scaleAdd(int s, T3i t1, T3i t2)`
Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).
`final void`
`set(int x, int y, int z)`
Sets the value of this tuple to to the specified x, y, and z coordinates.
`final void`
`setT(T3i t1)`
Sets the value of this tuple to the value of tuple t1.
`String`
`toString()`
Returns a string that contains the values of this Tuple3i.

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### x

public int x
The x coordinate.

### y

public int y
The y coordinate.

### z

public int z
The z coordinate.

## Constructor Details

### T3i

public T3i()
Constructs and initializes a Tuple3i to (0,0,0).

## Method Details

### set

public final void set(int x, int y, int z)
Sets the value of this tuple to to the specified x, y, and z coordinates.

Parameters:
  `x` - the x coordinate.
  `y` - the y coordinate.
  `z` - the z coordinate.

### setT

public final void setT(T3i t1)
Sets the value of this tuple to the value of tuple t1.

Parameters:
  `t1` - the tuple to be copied.

### add

public final void add(T3i t)
Sets the value of this tuple to the sum of itself and t1.

Parameters:
  `t` - is the other tuple

### scaleAdd

public final void scaleAdd(int s, T3i t1, T3i t2)
Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).

Parameters:
  `s` - the scalar value
  `t1` - the tuple to be multipled
  `t2` - the tuple to be added

### hashCode

public int hashCode()
Returns a hash number based on the data values in this object. Two different Tuple3i objects with identical data values (ie, returns true for equals(Tuple3i) ) 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(Object o)
Returns true if the Object o is of type Tuple3i and all of the data members of t are equal to the corresponding data members in this Tuple3i.

Overrides:
  `equals` in class `Object`
Parameters:
  `o` - the object with which the comparison is made.

### asString

public String asString()

### toString

public String toString()
Returns a string that contains the values of this Tuple3i. The form is (x,y,z).

Overrides:
  `toString` in class `Object`
Returns:
  the String representation