public Quaternion fromAngles(float[] angles) {
        if (angles.length != 3) {
            throw new IllegalArgumentException(
                    "Angles array must have three elements");
        }

        return fromAngles(angles[0], angles[1], angles[2]);
    }
Sets the quaternion from the specified Tait-Bryan angles, applying the
rotations in x-z-y extrinsic order or y-z'-x" intrinsic order.

@param angles an array of Tait-Bryan angles (in radians, exactly 3
    elements, the X angle in {@code angles[0]}, the Y angle in {@code
    angles[1]}, and the Z angle in {@code angles[2]}, not null,
    unaffected)
@return the (modified) current instance (for chaining)
@throws IllegalArgumentException if {@code angles.length != 3}
jme3-core/src/main/java/com/jme3/math/Quaternion.java