|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectQuaternion
public class Quaternion
Quaternions. Basic operations.
Constructor Summary | |
---|---|
Quaternion(double a,
double b,
double c,
double d)
Constructor from four double values. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone of the quaternion. |
Quaternion |
conjugate()
Conjugate of the quaternion. |
Quaternion |
divideByLeft(Quaternion q)
Left quotient of quaternions. |
Quaternion |
divideByRight(Quaternion q)
Right quotient of quaternions. |
Quaternion |
dotMult(Quaternion q)
Dot product of quaternions. |
boolean |
equals(java.lang.Object qo)
Equality test of quaternions. |
double |
getIpart()
Imaginary part i of the quaternion. |
double |
getJpart()
Imaginary part j of the quaternion. |
double |
getKpart()
Imaginary part k of the quaternion. |
double |
getRpart()
Real part of the quaternion. |
int |
hashCode()
Integer hashCode has to be the same for equal objects. |
Quaternion |
inverse()
Inverse of the quaternion. |
boolean |
isZero()
Test whether the quaternion is zero. |
Quaternion |
minus(Quaternion q)
Difference of quaternions. |
double |
norm()
Norm of the quaternion. |
Quaternion |
opposite()
Opposite of the quaternion. |
Quaternion |
plus(Quaternion q)
Sum of quaternions. |
Quaternion |
times(double r)
Multiplication by a coefficient. |
Quaternion |
times(Quaternion q)
Product of quaternions. |
java.lang.String |
toString()
Conversion of the quaternion to the string. |
static Quaternion |
valueOf(java.lang.String s)
Conversion from the string to the quaternion. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Quaternion(double a, double b, double c, double d)
a
- real partb
- imaginary part ic
- imaginary part jd
- imaginary part kMethod Detail |
---|
public double getRpart()
public double getIpart()
public double getJpart()
public double getKpart()
public java.lang.String toString()
toString
in class java.lang.Object
public static Quaternion valueOf(java.lang.String s)
toString
method.
s
- string of form produced by the toString
method
java.lang.IllegalArgumentException
- if string s does not represent
a quaternion (defined by the toString
method)public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
this
java.lang.CloneNotSupportedException
public boolean isZero()
public Quaternion conjugate()
this
public Quaternion opposite()
-this
public Quaternion plus(Quaternion q)
q
- addend
this+q
public Quaternion times(Quaternion q)
q
- factor
this*q
public Quaternion times(double r)
r
- coefficient
this*r
public Quaternion inverse()
1/this
public Quaternion minus(Quaternion q)
q
- subtrahend
this-q
public Quaternion divideByRight(Quaternion q)
q
- (right) divisor
this*inverse(q)
public Quaternion divideByLeft(Quaternion q)
q
- (left) divisor
inverse(q)*this
public boolean equals(java.lang.Object qo)
equals
in class java.lang.Object
qo
- second quaternion
this.equals(qo)
public Quaternion dotMult(Quaternion q)
q
- factor
public int hashCode()
hashCode
in class java.lang.Object
public double norm()
this
(norm is a real number)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |