Top Description Fields Constructors Methods
javax.vecmath

public abstract Class Tuple4i

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Known Direct Subclasses
javax.vecmath.Point4i
Imports
java.lang.Math

A 4-element tuple represented by signed integer x,y,z,w coordinates.
Since
vecmath 1.2

Field Summary

Modifier and TypeField and Description
pack-priv static final long
public int
w

The w coordinate.

public int
x

The x coordinate.

public int
y

The y coordinate.

public int
z

The z coordinate.

Constructor Summary

AccessConstructor and Description
public
Tuple4i(int
the x coordinate
x
,
int
the y coordinate
y
,
int
the z coordinate
z
,
int
the w coordinate
w
)

Constructs and initializes a Tuple4i from the specified x, y, z, and w coordinates.

public
Tuple4i(int[]
the array of length 4 containing x, y, z, and w in order.
t
)

Constructs and initializes a Tuple4i from the array of length 4.

public
Tuple4i(Tuple4i
the Tuple4i containing the initialization x, y, z, and w data.
t1
)

Constructs and initializes a Tuple4i from the specified Tuple4i.

public
Tuple4i()

Constructs and initializes a Tuple4i to (0,0,0,0).

Method Summary

Modifier and TypeMethod and Description
public final void
absolute(Tuple4i
the source tuple, which will not be modified
t
)

Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.

public final void
absolute()

Sets each component of this tuple to its absolute value.

public final void
add(Tuple4i
the first tuple
t1
,
Tuple4i
the second tuple
t2
)

Sets the value of this tuple to the sum of tuples t1 and t2.

public final void
add(Tuple4i
the other tuple
t1
)

Sets the value of this tuple to the sum of itself and t1.

public final void
clamp(int
the lowest value in the tuple after clamping
min
,
int
the highest value in the tuple after clamping
max
,
Tuple4i
the source tuple, which will not be modified
t
)

Clamps the tuple parameter to the range [low, high] and places the values into this tuple.

public final void
clamp(int
the lowest value in this tuple after clamping
min
,
int
the highest value in this tuple after clamping
max
)

Clamps this tuple to the range [low, high].

public final void
clampMax(int
the highest value in the tuple after clamping
max
,
Tuple4i
the source tuple, which will not be modified
t
)

Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.

public final void
clampMax(int
the highest value in the tuple after clamping
max
)

Clamps the maximum value of this tuple to the max parameter.

public final void
clampMin(int
the lowest value in the tuple after clamping
min
,
Tuple4i
the source tuple, which will not be modified
t
)

Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.

public final void
clampMin(int
the lowest value in this tuple after clamping
min
)

Clamps the minimum value of this tuple to the min parameter.

public Object

Returns:

a clone of this instance.
clone
()

Overrides java.lang.Object.clone.

Creates a new object of the same class as this object.
public boolean

Returns:

true or false
equals
(Object
the object with which the comparison is made
t1
)

Overrides java.lang.Object.equals.

Returns true if the Object t1 is of type Tuple4i and all of the data members of t1 are equal to the corresponding data members in this Tuple4i.
public final void
get(int[]
the array
t
)

Copies the values of this tuple into the array t.

public final void
get(Tuple4i
the target tuple
t
)

Copies the values of this tuple into the tuple t.

public final int

Returns:

the w coordinate.
getW
()

Get the w coordinate.

public final int

Returns:

the x coordinate.
getX
()

Get the x coordinate.

public final int

Returns:

the y coordinate.
getY
()

Get the y coordinate.

public final int

Returns:

the z coordinate.
getZ
()

Get the z coordinate.

public int

Returns:

the integer hash code value
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value based on the data values in this object.
public final void
negate(Tuple4i
the source tuple
t1
)

Sets the value of this tuple to the negation of tuple t1.

public final void
negate()

Negates the value of this tuple in place.

public final void
scale(int
the scalar value
s
,
Tuple4i
the source tuple
t1
)

Sets the value of this tuple to the scalar multiplication of tuple t1.

public final void
scale(int
the scalar value
s
)

Sets the value of this tuple to the scalar multiplication of the scale factor with this.

public final void
scaleAdd(int
the scalar value
s
,
Tuple4i
the tuple to be multipled
t1
,
Tuple4i
the tuple to be added
t2
)

Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).

public final void
scaleAdd(int
the scalar value
s
,
Tuple4i
the tuple to be added
t1
)

Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).

public final void
set(int
the x coordinate
x
,
int
the y coordinate
y
,
int
the z coordinate
z
,
int
the w coordinate
w
)

Sets the value of this tuple to the specified x, y, z, and w coordinates.

public final void
set(int[]
the array of length 4 containing x, y, z, and w in order.
t
)

Sets the value of this tuple to the specified coordinates in the array of length 4.

public final void
set(Tuple4i
the tuple to be copied
t1
)

Sets the value of this tuple to the value of tuple t1.

public final void
setW(int
value to w coordinate.
w
)

Set the w coordinate.

public final void
setX(int
value to x coordinate.
x
)

Set the x coordinate.

public final void
setY(int
value to y coordinate.
y
)

Set the y coordinate.

public final void
setZ(int
value to z coordinate.
z
)

Set the z coordinate.

public final void
sub(Tuple4i
the first tuple
t1
,
Tuple4i
the second tuple
t2
)

Sets the value of this tuple to the difference of tuples t1 and t2 (this = t1 - t2).

public final void
sub(Tuple4i
the other tuple
t1
)

Sets the value of this tuple to the difference of itself and t1 (this = this - t1).

public String

Returns:

the String representation
toString
()

Overrides java.lang.Object.toString.

Returns a string that contains the values of this Tuple4i.
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID
wback to summary
public int w

The w coordinate.

xback to summary
public int x

The x coordinate.

yback to summary
public int y

The y coordinate.

zback to summary
public int z

The z coordinate.

Constructor Detail

Tuple4iback to summary
public Tuple4i(int x, int y, int z, int w)

Constructs and initializes a Tuple4i from the specified x, y, z, and w coordinates.

Parameters
x:int

the x coordinate

y:int

the y coordinate

z:int

the z coordinate

w:int

the w coordinate

Tuple4iback to summary
public Tuple4i(int[] t)

Constructs and initializes a Tuple4i from the array of length 4.

Parameters
t:int[]

the array of length 4 containing x, y, z, and w in order.

Tuple4iback to summary
public Tuple4i(Tuple4i t1)

Constructs and initializes a Tuple4i from the specified Tuple4i.

Parameters
t1:Tuple4i

the Tuple4i containing the initialization x, y, z, and w data.

Tuple4iback to summary
public Tuple4i()

Constructs and initializes a Tuple4i to (0,0,0,0).

Method Detail

absoluteback to summary
public final void absolute(Tuple4i t)

Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.

Parameters
t:Tuple4i

the source tuple, which will not be modified

absoluteback to summary
public final void absolute()

Sets each component of this tuple to its absolute value.

addback to summary
public final void add(Tuple4i t1, Tuple4i t2)

Sets the value of this tuple to the sum of tuples t1 and t2.

Parameters
t1:Tuple4i

the first tuple

t2:Tuple4i

the second tuple

addback to summary
public final void add(Tuple4i t1)

Sets the value of this tuple to the sum of itself and t1.

Parameters
t1:Tuple4i

the other tuple

clampback to summary
public final void clamp(int min, int max, Tuple4i t)

Clamps the tuple parameter to the range [low, high] and places the values into this tuple.

Parameters
min:int

the lowest value in the tuple after clamping

max:int

the highest value in the tuple after clamping

t:Tuple4i

the source tuple, which will not be modified

clampback to summary
public final void clamp(int min, int max)

Clamps this tuple to the range [low, high].

Parameters
min:int

the lowest value in this tuple after clamping

max:int

the highest value in this tuple after clamping

clampMaxback to summary
public final void clampMax(int max, Tuple4i t)

Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.

Parameters
max:int

the highest value in the tuple after clamping

t:Tuple4i

the source tuple, which will not be modified

clampMaxback to summary
public final void clampMax(int max)

Clamps the maximum value of this tuple to the max parameter.

Parameters
max:int

the highest value in the tuple after clamping

clampMinback to summary
public final void clampMin(int min, Tuple4i t)

Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.

Parameters
min:int

the lowest value in the tuple after clamping

t:Tuple4i

the source tuple, which will not be modified

clampMinback to summary
public final void clampMin(int min)

Clamps the minimum value of this tuple to the min parameter.

Parameters
min:int

the lowest value in this tuple after clamping

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Creates a new object of the same class as this object.

Returns:Object

a clone of this instance.

Exceptions
OutOfMemoryError:
if there is not enough memory.
Since
vecmath 1.3
See Also
java.lang.Cloneable
equalsback to summary
public boolean equals(Object t1)

Overrides java.lang.Object.equals.

Returns true if the Object t1 is of type Tuple4i and all of the data members of t1 are equal to the corresponding data members in this Tuple4i.

Parameters
t1:Object

the object with which the comparison is made

Returns:boolean

true or false

getback to summary
public final void get(int[] t)

Copies the values of this tuple into the array t.

Parameters
t:int[]

the array

getback to summary
public final void get(Tuple4i t)

Copies the values of this tuple into the tuple t.

Parameters
t:Tuple4i

the target tuple

getWback to summary
public final int getW()

Get the w coordinate.

Returns:int

the w coordinate.

Since
vecmath 1.5
getXback to summary
public final int getX()

Get the x coordinate.

Returns:int

the x coordinate.

Since
vecmath 1.5
getYback to summary
public final int getY()

Get the y coordinate.

Returns:int

the y coordinate.

Since
vecmath 1.5
getZback to summary
public final int getZ()

Get the z coordinate.

Returns:int

the z coordinate.

Since
vecmath 1.5
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value based on the data values in this object. Two different Tuple4i objects with identical data values (i.e., Tuple4i.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.

Returns:int

the integer hash code value

negateback to summary
public final void negate(Tuple4i t1)

Sets the value of this tuple to the negation of tuple t1.

Parameters
t1:Tuple4i

the source tuple

negateback to summary
public final void negate()

Negates the value of this tuple in place.

scaleback to summary
public final void scale(int s, Tuple4i t1)

Sets the value of this tuple to the scalar multiplication of tuple t1.

Parameters
s:int

the scalar value

t1:Tuple4i

the source tuple

scaleback to summary
public final void scale(int s)

Sets the value of this tuple to the scalar multiplication of the scale factor with this.

Parameters
s:int

the scalar value

scaleAddback to summary
public final void scaleAdd(int s, Tuple4i t1, Tuple4i t2)

Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).

Parameters
s:int

the scalar value

t1:Tuple4i

the tuple to be multipled

t2:Tuple4i

the tuple to be added

scaleAddback to summary
public final void scaleAdd(int s, Tuple4i t1)

Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).

Parameters
s:int

the scalar value

t1:Tuple4i

the tuple to be added

setback to summary
public final void set(int x, int y, int z, int w)

Sets the value of this tuple to the specified x, y, z, and w coordinates.

Parameters
x:int

the x coordinate

y:int

the y coordinate

z:int

the z coordinate

w:int

the w coordinate

setback to summary
public final void set(int[] t)

Sets the value of this tuple to the specified coordinates in the array of length 4.

Parameters
t:int[]

the array of length 4 containing x, y, z, and w in order.

setback to summary
public final void set(Tuple4i t1)

Sets the value of this tuple to the value of tuple t1.

Parameters
t1:Tuple4i

the tuple to be copied

setWback to summary
public final void setW(int w)

Set the w coordinate.

Parameters
w:int

value to w coordinate.

Since
vecmath 1.5
setXback to summary
public final void setX(int x)

Set the x coordinate.

Parameters
x:int

value to x coordinate.

Since
vecmath 1.5
setYback to summary
public final void setY(int y)

Set the y coordinate.

Parameters
y:int

value to y coordinate.

Since
vecmath 1.5
setZback to summary
public final void setZ(int z)

Set the z coordinate.

Parameters
z:int

value to z coordinate.

Since
vecmath 1.5
subback to summary
public final void sub(Tuple4i t1, Tuple4i t2)

Sets the value of this tuple to the difference of tuples t1 and t2 (this = t1 - t2).

Parameters
t1:Tuple4i

the first tuple

t2:Tuple4i

the second tuple

subback to summary
public final void sub(Tuple4i t1)

Sets the value of this tuple to the difference of itself and t1 (this = this - t1).

Parameters
t1:Tuple4i

the other tuple

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string that contains the values of this Tuple4i. The form is (x,y,z,w).

Returns:String

the String representation