public static Vector3f sphericalToCartesianZ(Vector3f sphereCoords, Vector3f store) {
        if (store == null) {
            store = new Vector3f();
        }
        store.y = sphereCoords.x * FastMath.sin(sphereCoords.y);
        float a = sphereCoords.x * FastMath.cos(sphereCoords.y);
        store.x = a * FastMath.cos(sphereCoords.z);
        store.z = a * FastMath.sin(sphereCoords.z);

        return store;
    }
Converts a point from Spherical coordinates to Cartesian (using positive
Z as up) and stores the results in the store var.

@param sphereCoords the input spherical coordinates: x=distance from
origin, y=latitude in radians, z=longitude in radians (not null,
unaffected)
@param store storage for the result (modified if not null)
@return the Cartesian coordinates (either store or a new vector)
jme3-core/src/main/java/com/jme3/math/FastMath.java