|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.TupleNf<Tuple2f>
org.openmali.vecmath2.Tuple2f
public class Tuple2f
A simple three-dimensional tuple implementation. Inspired by Kenji Hiranabe's Tuple2f implementation
| Field Summary |
|---|
| Fields inherited from class org.openmali.vecmath2.TupleNf |
|---|
isDirty, roTrick, values |
| Constructor Summary | |
|---|---|
|
Tuple2f()
Creates a new Tuple2f instance. |
protected |
Tuple2f(boolean readOnly)
Creates a new Tuple2f instance. |
protected |
Tuple2f(boolean readOnly,
float[] values)
Creates a new Tuple2f instance. |
protected |
Tuple2f(boolean readOnly,
float x,
float y)
Creates a new Tuple2f instance. |
protected |
Tuple2f(boolean readOnly,
Tuple2f that)
Creates a new Tuple2f instance. |
|
Tuple2f(float[] values)
Creates a new Tuple2f instance. |
|
Tuple2f(float x,
float y)
Creates a new Tuple2f instance. |
|
Tuple2f(Tuple2f that)
Creates a new Tuple2f instance. |
| Method Summary | |
|---|---|
Tuple2f |
add(float x,
float y)
Adds the given parameters to this tuple's values. |
Tuple2f |
addX(float v)
Adds v to this tuple's x value. |
Tuple2f |
addY(float v)
Adds v to this tuple's y value. |
Tuple2f |
clone()
Creates and returns a copy of this object. |
Tuple2f |
div(float vx,
float vy)
Divides this tuple's values by vx, vy, vz. |
Tuple2f |
divX(float v)
Divides this tuple's x value by v. |
Tuple2f |
divY(float v)
Divides this tuple's y 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. |
static Tuple2f |
fromPool()
Allocates an Tuple2f instance from the pool. |
static Tuple2f |
fromPool(float x,
float y)
Allocates an Tuple2f instance from the pool. |
static Tuple2f |
fromPool(Tuple2f tuple)
Allocates an Tuple2f instance from the pool. |
float |
getX()
|
float |
getY()
|
Tuple2f |
mul(float vx,
float vy)
Multiplies this tuple's values with vx, vy. |
Tuple2f |
mulX(float v)
Multiplies this tuple's x value with v. |
Tuple2f |
mulY(float v)
Multiplies this tuple's y value with v. |
static Tuple2f |
newReadOnly()
Creates a new Tuple2f instance. |
static Tuple2f |
newReadOnly(float[] values)
Creates a new Tuple2f instance. |
static Tuple2f |
newReadOnly(float x,
float y)
Creates a new Tuple2f instance. |
static Tuple2f |
newReadOnly(Tuple2f tuple)
Creates a new Tuple2f instance. |
Tuple2f |
scale(float factorX,
float factorY)
Sets the value of this tuple to the scalar multiplication of tuple t1. |
Tuple2f |
set(float x,
float y)
Sets all three values of this Tuple to the specified ones. |
Tuple2f |
setX(float x)
Sets the value of the x-element of this tuple. |
Tuple2f |
setY(float y)
Sets the value of the y-element of this tuple. |
Tuple2f |
sub(float x,
float y)
Subtracts the given parameters from this tuple's values. |
Tuple2f |
subX(float v)
Subtracts v from this tuple's x value. |
Tuple2f |
subY(float v)
Subtracts v from this tuple's y value. |
static void |
toPool(Tuple2f o)
Stores the given Tuple2f instance in the pool. |
| Methods inherited from class org.openmali.vecmath2.TupleNf |
|---|
absolute, absolute, add, add, addValue, clamp, clamp, clampMax, clampMax, clampMin, clampMin, deserialize, div, divValue, epsilonEquals, equals, fill, get, get, getSerializationBufferSize, getSize, getValue, hashCode, interpolate, interpolate, isDirty, isReadOnly, mul, mulValue, negate, negate, readExternal, round, round, scale, scale, scaleAdd, scaleAdd, serialize, set, set, setClean, setValue, setZero, sub, sub, subValue, toString, writeExternal, writeToBuffer, writeToBuffer |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| Methods inherited from interface org.openmali.vecmath2.TupleInterface |
|---|
absolute, absolute, add, add, addValue, clamp, clamp, clampMax, clampMax, clampMin, clampMin, div, divValue, epsilonEquals, fill, get, get, getSize, getValue, interpolate, interpolate, isDirty, isReadOnly, mul, mulValue, negate, negate, round, round, scale, scale, scaleAdd, scaleAdd, set, set, setClean, setValue, setZero, sub, sub, subValue |
| Constructor Detail |
|---|
protected Tuple2f(boolean readOnly,
float x,
float y)
readOnly - x - the x element to usey - the y element to use
protected Tuple2f(boolean readOnly,
float[] values)
readOnly - values - the values array (must be at least size 2)
protected Tuple2f(boolean readOnly,
Tuple2f that)
readOnly - that - the Tuple2f to copy the values fromprotected Tuple2f(boolean readOnly)
readOnly -
public Tuple2f(float x,
float y)
x - the x element to usey - the y element to usepublic Tuple2f(float[] values)
values - the values array (must be at least size 2)public Tuple2f(Tuple2f that)
that - the Tuple2f to copy the values frompublic Tuple2f()
| Method Detail |
|---|
public final Tuple2f set(float x,
float y)
x - the x element to usey - the y element to use
public final Tuple2f setX(float x)
x -
public final Tuple2f setY(float y)
y -
public final float getX()
public final float getY()
public final Tuple2f addX(float v)
v -
public final Tuple2f addY(float v)
v -
public final Tuple2f add(float x,
float y)
x - y -
public final Tuple2f subX(float v)
v -
public final Tuple2f subY(float v)
v -
public final Tuple2f sub(float x,
float y)
x - y -
public final Tuple2f mulX(float v)
v -
public final Tuple2f mulY(float v)
v -
public final Tuple2f mul(float vx,
float vy)
vx - vy -
public final Tuple2f divX(float v)
v -
public final Tuple2f divY(float v)
v -
public final Tuple2f div(float vx,
float vy)
vx - vy -
public final Tuple2f scale(float factorX,
float factorY)
factorX - factorY -
public boolean equals(java.lang.Object tuple2)
equals in class TupleNf<Tuple2f>tuple2 - the Object with which the comparison is made
public Tuple2f clone()
clone in class java.lang.Objectjava.lang.OutOfMemoryError - if there is not enough memory.Cloneable
public static Tuple2f newReadOnly(float x,
float y)
x - the x element to usey - the y element to usepublic static Tuple2f newReadOnly(float[] values)
values - the values array (must be at least size 2)public static Tuple2f newReadOnly(Tuple2f tuple)
tuple - the Tuple2f to copy the values frompublic static Tuple2f newReadOnly()
public static Tuple2f fromPool()
public static Tuple2f fromPool(float x,
float y)
public static Tuple2f fromPool(Tuple2f tuple)
public static void toPool(Tuple2f o)
o -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||