public void worldToSpherical(Vector3 vec){
  if (pjUnprojected == null) {
    String projStr="+proj=longlat +a=" + projInfo.getSemiMajorAxis() + " +b="+ projInfo.getSemiMinorAxis()+ " +no_defs";
    pjUnprojected=Proj4.newInstance(projStr);
  }
  if (pjProjected == null) {
    pjProjected=Proj4.newInstance(proj4String);
  }
  try {
    vec.toArray(coord);
    pjProjected.transform(pjUnprojected,coord);
    vec.setX(Math.toDegrees(coord[0]));
    vec.setY(Math.toDegrees(coord[1]));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

public void worldToSpherical ( Vector3 vec ) { if ( pjUnprojected == null ) { String projStr = "+proj=longlat +a=" + projInfo . getSemiMajorAxis ( ) + " +b=" + projInfo . getSemiMinorAxis ( ) + " +no_defs" ; pjUnprojected = Proj4 . newInstance ( projStr ) ; } if ( pjProjected == null ) { pjProjected = Proj4 . newInstance ( proj4String ) ; } try { vec . toArray ( coord ) ; pjProjected . transform ( pjUnprojected , coord ) ; vec . setX ( Math . toDegrees ( coord [ 0 ] ) ) ; vec . setY ( Math . toDegrees ( coord [ 1 ] ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
convert virtual world coordinates to lon / lat . results are in degrees .
