Beispiel #1
0
    public void startDevLocation()   // Test localization from Unity Editor
    {
        if (acapi.editorTestMode)
        {
            timeForRelocation = 200f;
            PlayerPrefs.SetFloat("TimeForRelocation", timeForRelocation);
        }
        pastArCamCoordinates = arCamCoordinates;
        arCamCoordinates     = new Vector3(aRcamera.transform.position.x, aRcamera.transform.position.y, aRcamera.transform.position.z);

        byte[] bytes = File.ReadAllBytes(devImagePath);
        Debug.Log("bytes = " + bytes.Length);
        Texture2D tex = new Texture2D(2, 2);

        tex.LoadImage(bytes);
        devCamMat.mainTexture = tex;


        //acapi.firstLocalization(59.934320f,  30.272610f, 30, devImagePath, showPlaceHolders); // Spb VO-yard
        //acapi.firstLocalization(41.122400f,  16.868400f, 30, devImagePath, showPlaceHolders); // Bari cafe (lat=41.1224f, lon=16.8684f)
        // acapi.firstLocalization(43.405290f,  39.955740f, 30, devImagePath, showPlaceHolders); // Sochi 43.404521f,39.954741f 43.404080,39.954735 43.404769,39.954042 43.40529,39.95574
        //acapi.firstLocalization(59.91467f, 30.30398f, 30, devImagePath, showPlaceHolders); // Новый дом, 8я красноармейская 59.914639, 30.304093 59.91462671296234, 30.304159752060876// 59.9131102286, 30.303762554748754
        acapi.firstLocalization(59.9145560f, 30.304109f, 30, devImagePath, showPlaceHolders);
        timerRelocation     = timeForRelocation;
        ARStarted           = true;
        relocationCompleted = false;
    }
Beispiel #2
0
    public void startDevLocation() { // Test localization from Unity Editor
        if (acapi.editorTestMode) timeForRelocation = 100f;
        pastArCamCoordinates = arCamCoordinates;
        arCamCoordinates = new Vector3(aRcamera.transform.position.x, aRcamera.transform.position.y, aRcamera.transform.position.z);

        byte[] bytes = File.ReadAllBytes(devImagePath);
        Debug.Log("bytes = " + bytes.Length);
        Texture2D tex = new Texture2D(2, 2);
        tex.LoadImage(bytes);
        devCamMat.mainTexture = tex;

        //acapi.firstLocalization(59.934320f, 30.272606f, devImagePath, showPlaceHolders); // 59.934320f, 30.272606f - ВО офис, двор
        //acapi.firstLocalization(41.1224f, 16.8684f, devImagePath, showPlaceHolders); //Bari cafe lat=41.1224f, long=16.8684f
        acapi.firstLocalization(43.40529f, 39.95574f, 30, devImagePath, showPlaceHolders); // Sochi - 43.404521f, 39.954741f / / 43.404080, 39.954735// 43.404769, 39.954042//43.40529, 39.95574

        timerRelocation = timeForRelocation;
        ARStarted = true;
        relocationCompleted = false;
    }