|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmath.Vector
math.Vector3D
public class Vector3D
a three dimensional vector extending the 4 vector the fourth component is therefor 0
Field Summary |
---|
Fields inherited from class math.Vector |
---|
w, x, y, z |
Constructor Summary | |
---|---|
Vector3D()
standard constructor |
|
Vector3D(double x,
double y,
double z)
constructor, creates a vector from three doubles |
|
Vector3D(Point3D start,
Point3D end)
constructor, creates a vector from a start and an end point |
|
Vector3D(Vector3D v)
copy constructor |
Method Summary | |
---|---|
void |
add(Vector3D v)
add a vector |
double |
dot(Vector3D v)
returns the scalar product with a vector |
void |
minus(Vector3D v)
subtracts a vector |
boolean |
normalize()
normalize the vector |
void |
scale(double s)
scales the vector with the double s |
void |
set(double x,
double y,
double z)
sets the vector |
void |
set(Vector3D v)
sets the vector |
Methods inherited from class math.Vector |
---|
dot |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Vector3D()
public Vector3D(double x, double y, double z)
x
- y
- z
- public Vector3D(Vector3D v)
v
- [in] vectorpublic Vector3D(Point3D start, Point3D end)
start
- [in] start pointend
- [in] end pointMethod Detail |
---|
public boolean normalize()
normalize
in class Vector
public double dot(Vector3D v)
v
- [in] vector
public void scale(double s)
s
- scalepublic void set(Vector3D v)
v
- [in] vectorpublic void set(double x, double y, double z)
x
- y
- z
- public void add(Vector3D v)
v
- the vector to addpublic void minus(Vector3D v)
v
- the vector to subtract
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |