|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrender.Vec
Provides functionality to manipulate vectors.
| Constructor Summary | |
Vec()
|
|
| Method Summary | |
static void |
copy(double[] src,
double[] dst)
Copies contents of the src vector to the dst vector. |
static void |
cross(double[] a,
double[] b,
double[] dst)
Computes the cross-product of two vectors a and b and stores the result in dst. |
static double |
dot(double[] a,
double[] b)
Computes the dot product of vectors a and b. |
static double |
norm(double[] v)
Computes the magnitude of the vector. |
static void |
normalize(double[] v)
Normalizes vector v to unit-length. |
static void |
set(double[] dst,
double x,
double y,
double z)
Populates the dst vector with values x, y, z. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Vec()
| Method Detail |
public static void normalize(double[] v)
v - a vectorpublic static double norm(double[] v)
v - a vector
public static double dot(double[] a,
double[] b)
a - source vectorb - source vector
public static void cross(double[] a,
double[] b,
double[] dst)
a - source vector 1b - source vector 2dst - resulting vector from a cross b
public static void copy(double[] src,
double[] dst)
src - original vectordst - copy of original vector
public static void set(double[] dst,
double x,
double y,
double z)
dst - vector to be populatedx - component 0y - component 1z - component 2
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||