Esempio n. 1
0
    public void start(BumCameraType type)
    {
        //webcamT = new WebCamTexture();
        //for (int i = 0; i < WebCamTexture.devices.Length; i++)
        //{
        //    Debug.Log(WebCamTexture.devices.Length);
        //    //如果是前置摄像机
        //    if (WebCamTexture.devices[i].isFrontFacing )
        //    {
        //        webcamT.deviceName = WebCamTexture.devices[i].name;
        //        break;
        //    }
        //    //如果是后置摄像机
        //    if (!WebCamTexture.devices[i].isFrontFacing)
        //    {
        //        webcamT.deviceName = WebCamTexture.devices[i].name;
        //        break;
        //    }
        //}
        //if (webcamT.isPlaying) webcamT.Stop();
        Transform transform;

        if (arCamerasDic.TryGetValue(type, out transform))
        {
            transform.gameObject.SetActive(true);
        }
    }
Esempio n. 2
0
    public Transform getCamera(BumCameraType type)
    {
        Transform root = null;

        arCamerasDic.TryGetValue(type, out root);

        return(root);
    }
Esempio n. 3
0
    public void stop(BumCameraType type)
    {
        Transform transform;

        if (arCamerasDic.TryGetValue(type, out transform))
        {
            transform.gameObject.SetActive(false);
        }
    }
Esempio n. 4
0
    public void pause(BumCameraType type)
    {
        //switch (type)
        //{

        //    default: break;
        //    case BumARType.eBumARType_Tango: break;
        //    case BumARType.eBumARType_Void: break;
        //    case BumARType.eBumARType_VoidCloud: break;
        //    case BumARType.eBumARType_VoidSlam: break;
        //    case BumARType.eBumARType_ARKit: break;
        //    case BumARType.eBumARType_ARCore: break;
        //}
    }