/** * Converts this complex to a quaternion by * using (0, 0, 1) as a rotation axis. * * @return A quaternion of this rotation around the unit z */ public Quaternionf toQuaternion() { return toQuaternion(Vector3f.UNIT_Z); }
/** * Converts this complex to a quaternion by * using (0, 0, 1) as a rotation axis. * * @return A quaternion of this rotation around the unit z */ public Quaternionf toQuaternion() { return toQuaternion(Vector3f.UNIT_Z); }
/** * Converts this complex to a quaternion by * using the provided double components vector * as a rotation axis. * * @param x The x component of the axis vector * @param y The y component of the axis vector * @param z The z component of the axis vector * @return A quaternion of this rotation around the given axis */ public Quaternionf toQuaternion(double x, double y, double z) { return toQuaternion((float) x, (float) y, (float) z); }
/** * Converts this complex to a quaternion by * using the provided double components vector * as a rotation axis. * * @param x The x component of the axis vector * @param y The y component of the axis vector * @param z The z component of the axis vector * @return A quaternion of this rotation around the given axis */ public Quaternionf toQuaternion(double x, double y, double z) { return toQuaternion((float) x, (float) y, (float) z); }
/** * Converts this complex to a quaternion by * using the provided vector as a rotation axis. * * @param axis The rotation axis * @return A quaternion of this rotation around the given axis */ public Quaternionf toQuaternion(Vector3f axis) { return toQuaternion(axis.getX(), axis.getY(), axis.getZ()); }
/** * Converts this complex to a quaternion by * using the provided vector as a rotation axis. * * @param axis The rotation axis * @return A quaternion of this rotation around the given axis */ public Quaternionf toQuaternion(Vector3f axis) { return toQuaternion(axis.getX(), axis.getY(), axis.getZ()); }