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