|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.vecmath2.util.TupleUtils
public final class TupleUtils
Some functions which can operate on Tuples, since some of the functions for points are not available to vectors in general.
| Method Summary | ||
|---|---|---|
static float |
angle(Tuple3f v1,
Tuple3f v2)
Returns the angle in radians between the vectors v1 and v2. |
|
static int |
compareTuple(Tuple3f ta,
Tuple3f tb)
|
|
static AxisAngle3f |
computeRotation(Tuple3f v1,
Tuple3f v2,
int normalize,
AxisAngle3f result)
Computes the rotation between the vectors v1 ans v2. |
|
static
|
cross(Tuple3f v1,
Tuple3f v2,
T result)
Sets the result-vector to be the vector cross product of vectors v1 and v2. |
|
static float |
distanceSquared(Tuple3f a,
Tuple3f b)
|
|
static float |
dot(Tuple3f v1,
Tuple3f v2)
Computes the dot product of the vectors v1 and vector v2. |
|
static boolean |
limit(Tuple3f tuple,
float maxx,
float maxy)
Limits the tuple into a rectangle (0, 0, maxx, maxy). |
|
static boolean |
limit(Tuple3f tuple,
float minx,
float miny,
float maxx,
float maxy)
Limits the tuple in a rectangle. |
|
static
|
normalizeVector(T vector)
Normalize the input vector. |
|
static float |
vectorLength(Tuple3f v)
|
|
static float |
vectorLengthSquared(Tuple3f v)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final <T extends Tuple3f> T normalizeVector(T vector)
vector - the input vector to normalize
public static float distanceSquared(Tuple3f a,
Tuple3f b)
public static final float vectorLengthSquared(Tuple3f v)
public static final float vectorLength(Tuple3f v)
public static final <T extends Tuple3f> T cross(Tuple3f v1,
Tuple3f v2,
T result)
v1 - the first vectorv2 - the second vectorresult - the result vector
public static final float dot(Tuple3f v1,
Tuple3f v2)
v1 - the first vectorv2 - the second vector
public static final float angle(Tuple3f v1,
Tuple3f v2)
v1 - the first vectorv2 - the second vector
public static int compareTuple(Tuple3f ta,
Tuple3f tb)
public static boolean limit(Tuple3f tuple,
float minx,
float miny,
float maxx,
float maxy)
tuple - minx - miny - maxx - maxy -
public static boolean limit(Tuple3f tuple,
float maxx,
float maxy)
tuple - maxx - maxy -
public static final AxisAngle3f computeRotation(Tuple3f v1,
Tuple3f v2,
int normalize,
AxisAngle3f result)
v1 - the first vectorv2 - the second vectornormalize - normalize input vectors (bitmask)result - the result object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||