|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.TupleNi<Tuple4i>
org.openmali.vecmath2.Tuple4i
public class Tuple4i
A simple four-dimensional tuple implementation. Inspired by Kenji Hiranabe's Tuple4i implementation
| Field Summary |
|---|
| Fields inherited from class org.openmali.vecmath2.TupleNi |
|---|
isDirty, N, roTrick, values |
| Constructor Summary | |
|---|---|
|
Tuple4i()
Creates a new Tuple4i instance. |
protected |
Tuple4i(boolean readOnly)
Creates a new Tuple4i instance. |
protected |
Tuple4i(boolean readOnly,
int[] values,
boolean[] isDirty,
boolean copy)
Creates a new Tuple4i instance. |
protected |
Tuple4i(boolean readOnly,
int x,
int y,
int z,
int w)
Creates a new Tuple4i instance. |
protected |
Tuple4i(boolean readOnly,
Tuple4i that)
Creates a new Tuple4i instance. |
|
Tuple4i(int[] values)
Creates a new Tuple4i instance. |
|
Tuple4i(int x,
int y,
int z,
int w)
Creates a new Tuple4i instance. |
|
Tuple4i(Tuple4i that)
Creates a new Tuple4i instance. |
| Method Summary | |
|---|---|
Tuple4i |
add(int x,
int y,
int z,
int w)
Adds the given parameters to this tuple's values. |
Tuple4i |
addW(int v)
Adds v to this tuple's w value. |
Tuple4i |
addX(int v)
Adds v to this tuple's x value. |
Tuple4i |
addY(int v)
Adds v to this tuple's y value. |
Tuple4i |
addZ(int v)
Adds v to this tuple's z value. |
Tuple4i |
asReadOnly()
|
Tuple4i |
clone()
Creates and returns a copy of this object. |
Tuple4i |
div(int vx,
int vy,
int vz,
int vw)
Divides this tuple's values by vx, vy, vz. |
Tuple4i |
divW(int v)
Divides this tuple's w value by v. |
Tuple4i |
divX(int v)
Divides this tuple's x value by v. |
Tuple4i |
divY(int v)
Divides this tuple's y value by v. |
Tuple4i |
divZ(int v)
Divides this tuple's z value by v. |
boolean |
equals(java.lang.Object tuple2)
Returns true if the Object t1 is of type Tuple3f and all of the data members of t1 are equal to the corresponding data members in this Tuple2f. |
boolean |
equals(Tuple4i tuple2)
Returns true if all of the data members of GVector vector1 are equal to the corresponding data members in this GVector. |
static Tuple4i |
fromPool()
Allocates an Tuple4i instance from the pool. |
static Tuple4i |
fromPool(int x,
int y,
int z,
int w)
Allocates an Tuple4i instance from the pool. |
static Tuple4i |
fromPool(Tuple4i tuple)
Allocates an Tuple4i instance from the pool. |
Tuple4i |
getReadOnly()
|
int |
getW()
|
int |
getX()
|
int |
getY()
|
int |
getZ()
|
int |
hashCode()
Returns a hash number based on the data values in this object. |
Tuple4i |
mul(int vx,
int vy,
int vz,
int vw)
Multiplies this tuple's values with vx, vy. |
Tuple4i |
mulW(int v)
Multiplies this tuple's w value with v. |
Tuple4i |
mulX(int v)
Multiplies this tuple's x value with v. |
Tuple4i |
mulY(int v)
Multiplies this tuple's y value with v. |
Tuple4i |
mulZ(int v)
Multiplies this tuple's z value with v. |
static Tuple4i |
newReadOnly()
Creates a new Tuple4i instance. |
static Tuple4i |
newReadOnly(int[] values)
Creates a new Tuple4i instance. |
static Tuple4i |
newReadOnly(int x,
int y,
int z,
int w)
Creates a new Tuple4i instance. |
static Tuple4i |
newReadOnly(Tuple4i tuple)
Creates a new Tuple4i instance. |
Tuple4i |
scale(int factorX,
int factorY,
int factorZ,
int factorW)
Sets the value of this tuple to the scalar multiplication of tuple t1. |
Tuple4i |
setValues(int x,
int y,
int z,
int w)
Sets all three values of this Tuple to the specified ones. |
Tuple4i |
setW(int w)
Sets the value of the w-element of this tuple. |
Tuple4i |
setX(int x)
Sets the value of the x-element of this tuple. |
Tuple4i |
setY(int y)
Sets the value of the y-element of this tuple. |
Tuple4i |
setZ(int z)
Sets the value of the z-element of this tuple. |
Tuple4i |
sub(int x,
int y,
int z,
int w)
Subtracts the given parameters from this tuple's values. |
Tuple4i |
subW(int v)
Subtracts v from this tuple's w value. |
Tuple4i |
subX(int v)
Subtracts v from this tuple's x value. |
Tuple4i |
subY(int v)
Subtracts v from this tuple's y value. |
Tuple4i |
subZ(int v)
Subtracts v from this tuple's z value. |
static void |
toPool(Tuple4i o)
Stores the given Tuple4i instance in the pool. |
java.lang.String |
toString()
Returns a string that contains the values of this Tuple2f. |
int |
w()
|
Tuple4i |
w(int w)
Sets the value of the w-element of this tuple. |
int |
x()
|
Tuple4i |
x(int x)
Sets the value of the x-element of this tuple. |
int |
y()
|
Tuple4i |
y(int y)
Sets the value of the y-element of this tuple. |
int |
z()
|
Tuple4i |
z(int z)
Sets the value of the z-element of this tuple. |
| Methods inherited from class org.openmali.vecmath2.TupleNi |
|---|
absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, deserialize, get, get, get, getSerializationBufferSize, getSize, getValue, isDirty, isReadOnly, negate, negate, readExternal, scale, scale, scaleAdd, scaleAdd, serialize, set, set, set, setClean, setValue, setZero, sub, sub, writeExternal |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Tuple4i(boolean readOnly,
int x,
int y,
int z,
int w)
readOnly - x - the x element to usey - the y element to usez - the z element to usew - the w element to use
protected Tuple4i(boolean readOnly,
int[] values,
boolean[] isDirty,
boolean copy)
readOnly - values - the values array (must be at least size 4)isDirty - the isDirty-valuecopy - copy the array?
protected Tuple4i(boolean readOnly,
Tuple4i that)
readOnly - that - the Tuple4i to copy the values fromprotected Tuple4i(boolean readOnly)
readOnly -
public Tuple4i(int x,
int y,
int z,
int w)
x - the x element to usey - the y element to usez - the z element to usew - the w element to usepublic Tuple4i(int[] values)
values - the values array (must be at least size 4)public Tuple4i(Tuple4i that)
that - the Tuple4i to copy the values frompublic Tuple4i()
| Method Detail |
|---|
public final Tuple4i setX(int x)
x -
public final Tuple4i setY(int y)
y -
public final Tuple4i setZ(int z)
z -
public final Tuple4i setW(int w)
w -
public final int getX()
public final int getY()
public final int getZ()
public final int getW()
public final Tuple4i x(int x)
x -
public final Tuple4i y(int y)
y -
public final Tuple4i z(int z)
z -
public final Tuple4i w(int w)
w -
public final int x()
public final int y()
public final int z()
public final int w()
public final Tuple4i setValues(int x,
int y,
int z,
int w)
x - the x element to usey - the y element to usez - the z element to usew - the w element to use
public final Tuple4i addX(int v)
v -
public final Tuple4i addY(int v)
v -
public final Tuple4i addZ(int v)
v -
public final Tuple4i addW(int v)
v -
public final Tuple4i add(int x,
int y,
int z,
int w)
x - y - z - w -
public final Tuple4i subX(int v)
v -
public final Tuple4i subY(int v)
v -
public final Tuple4i subZ(int v)
v -
public final Tuple4i subW(int v)
v -
public final Tuple4i sub(int x,
int y,
int z,
int w)
x - y - z - w -
public final Tuple4i mulX(int v)
v -
public final Tuple4i mulY(int v)
v -
public final Tuple4i mulZ(int v)
v -
public final Tuple4i mulW(int v)
v -
public final Tuple4i mul(int vx,
int vy,
int vz,
int vw)
vx - vy - vz - vw -
public final Tuple4i divX(int v)
v -
public final Tuple4i divY(int v)
v -
public final Tuple4i divZ(int v)
v -
public final Tuple4i divW(int v)
v -
public final Tuple4i div(int vx,
int vy,
int vz,
int vw)
vx - vy - vz - vw -
public final Tuple4i scale(int factorX,
int factorY,
int factorZ,
int factorW)
factorX - factorY - factorZ - factorW -
public Tuple4i asReadOnly()
asReadOnly in class TupleNi<Tuple4i>TupleNi.getReadOnly()public Tuple4i getReadOnly()
getReadOnly in class TupleNi<Tuple4i>TupleNi.asReadOnly()public int hashCode()
hashCode in class TupleNi<Tuple4i>public boolean equals(Tuple4i tuple2)
equals in class TupleNi<Tuple4i>tuple2 - The vector with which the comparison is made.
public boolean equals(java.lang.Object tuple2)
equals in class TupleNi<Tuple4i>tuple2 - the Object with which the comparison is made
public java.lang.String toString()
toString in class TupleNi<Tuple4i>public Tuple4i clone()
clone in class java.lang.Objectjava.lang.OutOfMemoryError - if there is not enough memory.Cloneable
public static Tuple4i newReadOnly(int x,
int y,
int z,
int w)
x - the x element to usey - the y element to usez - the z element to usew - the w element to usepublic static Tuple4i newReadOnly(int[] values)
values - the values array (must be at least size 4)public static Tuple4i newReadOnly(Tuple4i tuple)
tuple - the Tuple4i to copy the values frompublic static Tuple4i newReadOnly()
public static Tuple4i fromPool()
public static Tuple4i fromPool(int x,
int y,
int z,
int w)
public static Tuple4i fromPool(Tuple4i tuple)
public static void toPool(Tuple4i o)
o -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||