|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core.Quaternion
public class Quaternion
Represents an element of the set of quaternions.
Field Summary | |
---|---|
double |
a
|
double |
b
|
double |
c
|
double |
d
|
static Quaternion |
q1
|
static Quaternion |
qI
|
static Quaternion |
qJ
|
static Quaternion |
qK
|
static Quaternion |
ZERO
|
Constructor Summary | |
---|---|
Quaternion()
Create a quaternion with all coordinates intially equal to zero. |
|
Quaternion(double a,
double b,
double c,
double d)
Create a quaternion from initial values for each coordinate. |
|
Quaternion(Quaternion source)
Create a copy of an exiting non-null Quaternion object |
Method Summary | |
---|---|
Quaternion |
conj()
p.conj() returns the conjugate to p |
Quaternion |
dividedBy(Quaternion q)
Compute the quotient of this quaternaion by another quaternion. |
double |
dot(Quaternion q)
p.dot(q) returns the scalar product |
boolean |
equals(java.lang.Object obj)
|
Quaternion |
inverse()
Compute the multiplicative inverser of this quaternion. |
Quaternion |
minus(Quaternion q)
Compute the difference of this quaternaion and another quaternion |
double |
norm()
Returns the norm of this quaternion. |
Quaternion |
plus(Quaternion q)
Compute the sum of this quaternaion and another quaternion |
Quaternion |
rotateAroundHopfFibre(double phi)
Returns rotation by phi around standard Hopf fiber through (1,0,0,0) |
Quaternion |
rotateAroundHopfFibre(double phi,
Quaternion q0)
Returns rotation by phi around standard Hopf fiber through q0 |
Vector3D |
StereographicProjection()
Returns stereographic projection from (-1,0,0,0) |
Quaternion |
times(double x)
Compute the product of this quaternaion and a real number |
Quaternion |
times(Quaternion q)
Compute the product of this quaternaion and another quaternion |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Quaternion ZERO
public static final Quaternion q1
public static final Quaternion qI
public static final Quaternion qJ
public static final Quaternion qK
public double a
public double b
public double c
public double d
Constructor Detail |
---|
public Quaternion()
public Quaternion(double a, double b, double c, double d)
public Quaternion(Quaternion source)
source
- the object to be copied. A NullPointerException is thrown if
this is null.Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public double dot(Quaternion q)
public double norm()
public Quaternion conj()
public Quaternion plus(Quaternion q)
q
- the non-null quaternion to be added to this one. If this is null, a NullPointerException is thrown.public Quaternion minus(Quaternion q)
q
- the non-null quaternion to be subtracted from this one. If this is null, a NullPointerException is thrown.public Quaternion times(Quaternion q)
q
- the non-null quaternion to be ultiplied by this one. If this is null, a NullPointerException is thrown.public Quaternion times(double x)
public Quaternion inverse()
public Quaternion dividedBy(Quaternion q)
q
- the non-null quaternion that this quaternion is to be multiplied by. If this is null, a NullPointerException is thrown.public Quaternion rotateAroundHopfFibre(double phi)
public Quaternion rotateAroundHopfFibre(double phi, Quaternion q0)
public Vector3D StereographicProjection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |