|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSciLib.Math.quaternion
public class quaternion
This class contains some methods to handle a quaternion
| Field Summary | |
|---|---|
rPoint |
a
public members |
double |
b
|
| Constructor Summary | |
|---|---|
quaternion()
make a unit quaternion object <0, 1> |
|
quaternion(double f,
double x,
double y,
double z)
make a quaternion (x, y, z, d) object |
|
quaternion(rPoint a,
double b)
make a quaternion (a, b) object |
|
| Method Summary | |
|---|---|
quaternion |
conjugate()
the conjugate of this quaternion |
static quaternion |
conjugate(quaternion x,
quaternion y)
the division of 2 quaternions x/y |
static quaternion |
minus(quaternion x,
quaternion y)
minus 2 quaternions |
static quaternion |
mult(quaternion x,
quaternion y)
multiplication of 2 quaternions |
double |
norm()
the square norm of this quaternion |
static quaternion |
plus(quaternion x,
quaternion y)
add 2 quaternions |
void |
print()
print this quaternion on the screen |
quaternion |
reciprocal()
the reciprocal of this quaternion |
void |
scale(double s)
scale a quaternion |
void |
setPoint(double x,
double y,
double z,
double d)
set rPoint |
java.lang.String |
toString()
make a String from this quaternion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public rPoint a
public double b
| Constructor Detail |
|---|
public quaternion()
public quaternion(double f,
double x,
double y,
double z)
f - the first coordinatex - the second coordinatey - the third coordinatez - the fourth coordinate
public quaternion(rPoint a,
double b)
a - A rPoint objectb - the fourth coordinate| Method Detail |
|---|
public void setPoint(double x,
double y,
double z,
double d)
x - the first coordinatey - the second coordinatez - the third coordinated - the fourth coordinate
public static quaternion plus(quaternion x,
quaternion y)
x - a quaterniony - a quaternion
public static quaternion minus(quaternion x,
quaternion y)
x - a quaterniony - a quaternion
public static quaternion mult(quaternion x,
quaternion y)
x - a quaterniony - a quaternion
public quaternion conjugate()
public double norm()
public quaternion reciprocal()
public void scale(double s)
s - A double value
public static quaternion conjugate(quaternion x,
quaternion y)
public java.lang.String toString()
toString in class java.lang.Objectpublic void print()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||