|
||||||||||
| 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
org.openmali.vecmath2.Vector3f
org.openmali.vecmath2.Coord3f
public class Coord3f
A Coord3f combines the functionality of a vector with the functionality of a point. Transformations on a Coord3f are as a point, so translation is taken into account. You can also find the distance of one Coord3f to another.
| Field Summary | |
|---|---|
static Coord3f |
ZERO
|
| Fields inherited from class org.openmali.vecmath2.Vector3f |
|---|
NEGATIVE_X_AXIS, NEGATIVE_Y_AXIS, NEGATIVE_Z_AXIS, POSITIVE_X_AXIS, POSITIVE_Y_AXIS, POSITIVE_Z_AXIS |
| Fields inherited from class org.openmali.vecmath2.TupleNf |
|---|
isDirty, roTrick, values |
| Constructor Summary | |
|---|---|
|
Coord3f()
|
protected |
Coord3f(boolean readOnly)
|
protected |
Coord3f(boolean readOnly,
float[] values)
|
protected |
Coord3f(boolean readOnly,
float x,
float y,
float z)
|
protected |
Coord3f(boolean readOnly,
Tuple3f tuple)
|
|
Coord3f(float[] values)
|
|
Coord3f(float x,
float y,
float z)
|
|
Coord3f(Tuple3f tuple)
|
| Method Summary | |
|---|---|
float |
angle(Tuple3f v2)
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0, PI]. |
void |
cross(Tuple3f v1,
Tuple3f v2)
Sets this vector to be the vector cross product of vectors v1 and v2. |
static Coord3f |
crossNew(Coord3f c1,
Coord3f c2)
|
float |
distance(Tuple3f a)
|
float |
distance(Tuple3f a,
Tuple3f b)
|
float |
distanceSquared(Tuple3f a)
|
float |
distanceSquared(Tuple3f a,
Tuple3f b)
|
float |
dot(Tuple3f v2)
Computes the dot product of the this vector and vector v2. |
static Coord3f |
fromPool()
Allocates an Coord3f instance from the pool. |
static Coord3f |
fromPool(float x,
float y,
float z)
Allocates an Coord3f instance from the pool. |
static Coord3f |
fromPool(Tuple3f tuple)
Allocates an Coord3f instance from the pool. |
void |
get(Coord3f buffer)
|
static Coord3f |
newReadOnly()
|
static Coord3f |
newReadOnly(float[] values)
|
static Coord3f |
newReadOnly(float x,
float y,
float z)
|
static Coord3f |
newReadOnly(Tuple3f tuple)
|
void |
normalize(Tuple3f vector)
Sets the value of this vector to the normalization of vector v1. |
static Coord3f |
scaleNew(Coord3f c1,
float scale)
|
void |
set(Coord3f coord)
|
static Coord3f |
subNew(Coord3f c1,
Coord3f c2)
|
static void |
toPool(Coord3f o)
Stores the given Coord3f instance in the pool. |
| Methods inherited from class org.openmali.vecmath2.Vector3f |
|---|
angle, cross, dot, length, lengthSquared, normalize, normalize, toPool |
| Methods inherited from class org.openmali.vecmath2.Tuple3f |
|---|
add, addX, addY, addZ, clone, div, divX, divY, divZ, equals, getX, getY, getZ, mul, mulX, mulY, mulZ, scale, set, setX, setY, setZ, sub, subX, subY, subZ, toPool |
| 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 |
| Field Detail |
|---|
public static final Coord3f ZERO
| Constructor Detail |
|---|
protected Coord3f(boolean readOnly,
float x,
float y,
float z)
protected Coord3f(boolean readOnly,
float[] values)
protected Coord3f(boolean readOnly,
Tuple3f tuple)
protected Coord3f(boolean readOnly)
public Coord3f(float x,
float y,
float z)
public Coord3f(float[] values)
public Coord3f(Tuple3f tuple)
public Coord3f()
| Method Detail |
|---|
public final void set(Coord3f coord)
public final void get(Coord3f buffer)
public final float distanceSquared(Tuple3f a,
Tuple3f b)
public final float distanceSquared(Tuple3f a)
public final float distance(Tuple3f a)
public final float distance(Tuple3f a,
Tuple3f b)
public final void normalize(Tuple3f vector)
vector - the un-normalized vector
public final void cross(Tuple3f v1,
Tuple3f v2)
v1 - the first vectorv2 - the second vectorpublic final float dot(Tuple3f v2)
v2 - the other vectorpublic final float angle(Tuple3f v2)
v2 - the other vector
public static final Coord3f subNew(Coord3f c1,
Coord3f c2)
public static final Coord3f crossNew(Coord3f c1,
Coord3f c2)
public static final Coord3f scaleNew(Coord3f c1,
float scale)
public static Coord3f newReadOnly(float x,
float y,
float z)
public static Coord3f newReadOnly(float[] values)
public static Coord3f newReadOnly(Tuple3f tuple)
public static Coord3f newReadOnly()
public static Coord3f fromPool()
public static Coord3f fromPool(float x,
float y,
float z)
public static Coord3f fromPool(Tuple3f tuple)
public static void toPool(Coord3f o)
o -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||