|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.shlublu.javax.math.Vector3D
Creation : 2002/03/21 Class dedicated to implement 3D vector operations
Field Summary | |
double |
x
x coordinate |
double |
y
y coordinate |
double |
z
z coordinate |
Constructor Summary | |
Vector3D()
Empty constructor, init to (.0, .0, .0) |
|
Vector3D(double dblX,
double dblY,
double dblZ)
Constructor, init to the given arguments |
|
Vector3D(Vector3D v)
Constructor, init to the given vector |
Method Summary | |
void |
add(Vector3D v)
Add the given vector |
java.lang.Object |
clone()
Return a Vector3D equals() to this one |
Vector3D |
crossProduct(Vector3D v)
Get the cross product with the given vector |
void |
divide(double d)
Divide this vector |
boolean |
equals(java.lang.Object o)
True if o is not null, from the Vector3D class without beeing from a subclass, and have the same coordinates in the same order than this. |
void |
equilibrate()
Equilibrate this vector |
Vector3D |
getDifference(Vector3D vToSubstract)
Get the difference vector |
Vector3D |
getDivided(double d)
Get the divided vector corresponding to this one |
Vector3D |
getEquilibrated()
Return an equilibrated vector corresponding to this |
Vector3D |
getNormalized()
Return a normalized vector corresponding to this |
Point3D |
getPoint()
Get the Point corresponding to this Vector |
Vector3D |
getProduct(double d)
Get the multiplied vector corresponding to this one |
Vector3D |
getProjected(Vector3D v)
Get the projection on this of the given vector |
Vector3D |
getSum(Vector3D vToAdd)
Get the sum vector |
void |
multiply(double d)
Multiply this vector |
double |
norm()
Get this vector's norm |
void |
normalize()
Normalize this vector |
Vector3D |
projectOn(Vector3D v)
Get the projection on the given vector of this |
double |
scalarProduct(Vector3D v)
Get the scalar (or dot) product with the given vector |
void |
substract(Vector3D v)
Substract the given vector |
java.lang.String |
toString()
Get this vector as a string |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double x
public double y
public double z
Constructor Detail |
public Vector3D()
public Vector3D(double dblX, double dblY, double dblZ)
public Vector3D(Vector3D v)
Method Detail |
public java.lang.String toString()
toString
in interface Vector
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface Vector
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in interface Vector
clone
in class java.lang.Object
public Point3D getPoint()
public double norm()
norm
in interface Vector
public void normalize()
normalize
in interface Vector
public Vector3D getNormalized()
public void equilibrate()
equilibrate
in interface Vector
public Vector3D getEquilibrated()
public void multiply(double d)
multiply
in interface Vector
public Vector3D getProduct(double d)
public void divide(double d)
divide
in interface Vector
public Vector3D getDivided(double d)
public void add(Vector3D v)
public Vector3D getSum(Vector3D vToAdd)
public void substract(Vector3D v)
public Vector3D getDifference(Vector3D vToSubstract)
public double scalarProduct(Vector3D v)
public Vector3D crossProduct(Vector3D v)
public Vector3D getProjected(Vector3D v)
public Vector3D projectOn(Vector3D v)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |