|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmath.VectorOps
public class VectorOps
a class with vector operations
Constructor Summary | |
---|---|
VectorOps()
|
Method Summary | |
---|---|
static Vector3D |
createDiffuseVector(OrthonormalBasis uvw,
Point2D p)
creates a diffuse vector from a 2D random point |
static Vector3D |
cross(Vector3D v1,
Vector3D v2)
returns the cross product of two vectors |
static double |
dot(Vector3D v1,
Vector3D v2)
returns the scalar product of two vectors |
static int |
indexOfMinAbsComponent(Vector3D v)
Returns index of smallest component |
static double |
magnitude(Vector3D v)
returns the length of the vector |
static Vector3D |
minus(Vector3D v1,
Vector3D v2)
subtracts the vector v2 from v1 |
static Vector3D |
normalize(Vector3D v)
normalize a 3d vector |
static double |
normalizeMag(Vector3D v)
normalizes a vector and returns its length |
static Vector3D |
perpendicular(Vector3D v)
Returns a vector perpendicular to this one |
static Vector3D |
perturb(Vector3D vec,
double down,
double around)
perturbs the vector down and around |
static Vector3D |
plus(Vector3D v1,
Vector3D v2)
adds two vectors |
static Vector3D |
scale(double s,
Vector3D v)
scales the vector with the double s |
static Point3D |
toPoint3D(Vector v)
converts a 4-vector to a 3d-point |
static Vector3D |
toVector3D(Vector v)
converts a 4-vector to a 3-vector |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VectorOps()
Method Detail |
---|
public static Vector3D normalize(Vector3D v)
v
- [in] vector
public static double dot(Vector3D v1, Vector3D v2)
v1
- [in] vector #1v2
- [in] vector #2
public static Vector3D cross(Vector3D v1, Vector3D v2)
v1
- [in] vector #1v2
- [in] vector #2
public static Vector3D minus(Vector3D v1, Vector3D v2)
v1
- [in] vector #1v2
- [in] vector #2
public static Vector3D plus(Vector3D v1, Vector3D v2)
v1
- [in] vector #1v2
- [in] vector #2
public static Vector3D scale(double s, Vector3D v)
s
- [in] sv
- [in] vector
public static double normalizeMag(Vector3D v)
v
- [in] vector
public static double magnitude(Vector3D v)
v
- [in] vector
public static Vector3D toVector3D(Vector v)
v
- [in] vector
public static Point3D toPoint3D(Vector v)
v
- [in] vector
public static int indexOfMinAbsComponent(Vector3D v)
v
- [in] vector
public static Vector3D perpendicular(Vector3D v)
v
- [in] vector
public static Vector3D createDiffuseVector(OrthonormalBasis uvw, Point2D p)
uvw
- [in] onbp
- [in] 2d-pointpublic static Vector3D perturb(Vector3D vec, double down, double around)
vec
- [in] vectordown
- around
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |