|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core3D.ComplexVector3D
public class ComplexVector3D
A 3D vector with components of type Complex named x, y, and z.
Field Summary | |
---|---|
static ComplexVector3D |
ORIGIN
The origin, (ZERO_C,ZERO_C,ZERO_C). |
static ComplexVector3D |
UNIT_X
The unit vector in the x direction, (ONE_C,ZERO_C,ZERO_C). |
static ComplexVector3D |
UNIT_Y
The unit vector in the y direction, (ZERO_C,ONE_C,ZERO_C). |
static ComplexVector3D |
UNIT_Z
The uint vector in the z direction, (ZERO_C,ZERO_C,ONE_C). |
Complex |
x
The first component of the vector. |
Complex |
y
The second component of the vector. |
Complex |
z
The third component of the vector. |
Constructor Summary | |
---|---|
ComplexVector3D()
Construct a vector with all three components initially equal to zero. |
|
ComplexVector3D(Complex x,
Complex y,
Complex z)
Construct a vector that initially has coordinates (x,y,z). |
|
ComplexVector3D(ComplexVector3D v)
Construct a vector that is initially a copy of a specified vector. |
|
ComplexVector3D(Vector3D rea,
Vector3D ima)
Construct a vector that initially has real part rea and imaginary part ima. |
Method Summary | |
---|---|
void |
assign(Complex a,
Complex b,
Complex c)
|
void |
assign(ComplexVector3D v)
|
void |
assignMinus(ComplexVector3D v)
|
void |
assignPlus(ComplexVector3D v)
|
void |
assignTimes(Complex d)
This vector is scalar multiplied by d. |
void |
assignTimes(double r)
|
boolean |
equals(java.lang.Object obj)
Returns true if obj is a non-null object whose class in ComplexVector3D and such that
the three corrdinates of the vector obj are the same as the coordinates of this
vector. |
Vector3D |
im()
The imaginary part of a ComplexVector. |
ComplexVector3D |
minus(ComplexVector3D v)
Returns the vector difference of this vector and v. |
void |
negate()
Multiplies each component of this vector by -1. |
double |
norm()
Returns the length of this vector, computed as Math.sqrt(x*x+y*y+z*z) |
void |
normalize()
Divides each component of the vector by the norm of the vector, giving a vector that has length 1. |
ComplexVector3D |
plus(ComplexVector3D v)
Returns the vector sum of this vector and v. |
Vector3D |
re()
The real part of a ComplexVector. |
ComplexVector3D |
times(Complex d)
Returns the scalar product of this vector times d. |
ComplexVector3D |
times(double r)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Complex x
public Complex y
public Complex z
public static final ComplexVector3D ORIGIN
public static final ComplexVector3D UNIT_X
public static final ComplexVector3D UNIT_Y
public static final ComplexVector3D UNIT_Z
Constructor Detail |
---|
public ComplexVector3D()
public ComplexVector3D(Complex x, Complex y, Complex z)
public ComplexVector3D(Vector3D rea, Vector3D ima)
public ComplexVector3D(ComplexVector3D v)
v
- the constructed vector is (v.x, v.y, v.z), or is (0,0,0) if v is null.Method Detail |
---|
public void assign(Complex a, Complex b, Complex c)
public void assign(ComplexVector3D v)
public boolean equals(java.lang.Object obj)
obj
is a non-null object whose class in ComplexVector3D and such that
the three corrdinates of the vector obj
are the same as the coordinates of this
vector.
equals
in class java.lang.Object
public Vector3D re()
public Vector3D im()
public double norm()
Math.sqrt(x*x+y*y+z*z)
public void normalize()
public void negate()
public ComplexVector3D plus(ComplexVector3D v)
v
- a non-null vectorpublic void assignPlus(ComplexVector3D v)
public ComplexVector3D minus(ComplexVector3D v)
v
- a non-null vectorpublic void assignMinus(ComplexVector3D v)
public ComplexVector3D times(Complex d)
d
- the scalar that is to be multiplied times this vectorpublic ComplexVector3D times(double r)
public void assignTimes(Complex d)
public void assignTimes(double r)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |