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