Package org.jlab.rec.rich
Class Quaternion
java.lang.Object
org.jlab.rec.rich.Quaternion
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQuaternion
(double w, double x, double y, double z) Quaternion
(double angle, Vector3D rotationAxis) -
Method Summary
Modifier and TypeMethodDescriptionvoid
double
getSize()
double
GetW()
double
GetX()
double
GetY()
double
GetZ()
multiply
(Quaternion qb) Multiplication between two Quaternionsvoid
void
set
(double w, double x, double y, double z) void
Set the rotation Quaternionvoid
set
(Quaternion q) Set the Quaternion using another onevoid
show()
toRotation
(Quaternion q1)
-
Field Details
-
x
public double x -
y
public double y -
z
public double z -
w
public double w
-
-
Constructor Details
-
Quaternion
public Quaternion() -
Quaternion
-
Quaternion
public Quaternion(double w, double x, double y, double z)
-
-
Method Details
-
set
Set the rotation Quaternion- Parameters:
angle
- the angle of rotationrotationAxis
- the rotation axis (normal two the vector plane)
-
set
public void set(double w, double x, double y, double z) -
set
Set the Quaternion using another one- Parameters:
q
-
-
getSize
public double getSize() -
normalize
public void normalize() -
multiply
Multiplication between two Quaternions- Parameters:
qb
- the one that multiplyresult
- of the multiplication
-
conjugate
public void conjugate() -
rotate
-
toRotation
-
GetX
public double GetX() -
GetY
public double GetY() -
GetZ
public double GetZ() -
GetW
public double GetW() -
show
public void show()
-