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 TypeMethodDescriptionvoiddoublegetSize()doubleGetW()doubleGetX()doubleGetY()doubleGetZ()multiply(Quaternion qb) Multiplication between two Quaternionsvoidvoidset(double w, double x, double y, double z) voidSet the rotation Quaternionvoidset(Quaternion q) Set the Quaternion using another onevoidshow()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()
-