|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VectorInterface<T extends TupleNf<T>,V extends TupleNf<?>>
Common interface for all vector types.
Using it may slow down execution time because of prevented inlining.
| Method Summary | |
|---|---|
float |
angle(V vector2)
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI]. |
VectorInterface<T,V> |
cross(V v1,
V v2)
Sets this vector to be the vector cross product of vectors v1 and v2. |
float |
dot(V vector2)
Computes the dot product of the this vector and vector v2. |
float |
length()
|
float |
lengthSquared()
|
VectorInterface<T,V> |
normalize()
Normalizes this vector in place. |
VectorInterface<T,V> |
normalize(V vector)
Sets the value of this vector to the normalization of vector v1. |
| 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, get, getSize, getValue, interpolate, interpolate, isDirty, isReadOnly, mul, mulValue, negate, negate, round, round, scale, scale, scaleAdd, scaleAdd, set, set, set, setClean, setValue, setZero, sub, sub, subValue |
| Method Detail |
|---|
float lengthSquared()
float length()
VectorInterface<T,V> normalize()
VectorInterface<T,V> normalize(V vector)
vector - the un-normalized vector
VectorInterface<T,V> cross(V v1,
V v2)
v1 - the first vectorv2 - the second vector
float dot(V vector2)
vector2 - the other vectorfloat angle(V vector2)
vector2 - the other vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||