/**
* Creates a normalized quaternion based on rotations around x, y and z axis.
*/
public static Quat4f fromAngles(float rotX, float rotY, float rotZ) {
Quat4f quat = new Quat4f();
Quat4f qZ = new Quat4f();
QuaternionUtil.setRotation(qZ, new Vector3f(0, 0, 1), rotZ);
Quat4f qY = new Quat4f();
QuaternionUtil.setRotation(qY, new Vector3f(0, 1, 0), rotY);
Quat4f qX = new Quat4f();
QuaternionUtil.setRotation(qX, new Vector3f(1, 0, 0), rotX);
quat.set(0, 0, 0, 1);
quat.mul(qZ);
quat.mul(qY);
quat.mul(qX);