Ejemplo n.º 1
0
    public void StartHostAnchor()
    {
        _arDebugManager.LogInfo($"Start Host Anchor, numOfQueued = {numOfQueued}");
        FeatureMapQuality quality = _arAnchorManager.EstimateFeatureMapQualityForHosting(GetCameraPose());

        for (i = 0; i < numOfQueued; i++)
        {
            anchorToResolveList[i] = null;
        }
        for (i = 0; i < numOfQueued; i++)
        {
            HostAnchor(i);
        }
        numOfToBeResolved      = 0;
        anchorUpdateInProgress = true;
    }
    public void HostAnchor()
    {
        debugtext.text = "HostAnchor executing";


        FeatureMapQuality quality = anchormanager.EstimateFeatureMapQualityForHosting(GetCameraPose());

        cloudanchor = anchormanager.HostCloudAnchor(pendingHostAnchor, 1);

        if (cloudanchor == null)
        {
            debugtext.text = "Unable to host cloud anchor";
        }
        else
        {
            anchorHostInProgress = true;
        }
    }
Ejemplo n.º 3
0
    public void HostAnchor()
    {
        //ARDebugManager.Instance.LogInfo($"HostAnchor executing");

        FeatureMapQuality quality =
            arAnchorManager.EstimateFeatureMapQualityForHosting(GetCameraPose());

        cloudAnchor = arAnchorManager.HostCloudAnchor(pendingHostAnchor, 1);

        if (cloudAnchor == null)
        {
            // ARDebugManager.Instance.LogError("Unable to host cloud anchor");
        }
        else
        {
            anchorUpdateInProgress = true;
        }
    }
Ejemplo n.º 4
0
    public void StartHostAnchor()
    {
        _cloudAnchorsMetaManager = GameObject.FindWithTag("CloudAnchorsMetaBolt").GetComponent <CloudAnchorsMetaManagerOld>();
        _arDebugManager.LogInfo(_cloudAnchorsMetaManager.confirmimg());

        _arDebugManager.LogInfo($"Start Host Anchor, numOfQueued = {numOfQueued}");
        quality = _arAnchorManager.EstimateFeatureMapQualityForHosting(GetCameraPose());
        for (i = 0; i < numOfQueued; i++)
        {
            anchorToResolveList[i] = null;
        }
        for (i = 0; i < numOfQueued; i++)
        {
            HostAnchor(i);
        }
        numOfToBeResolved      = 0;
        anchorUpdateInProgress = true;
    }
Ejemplo n.º 5
0
    // 클라우드 앵커 등록
    void HostProcessing()
    {
        // 로컬 앵커가 생성되지 않았을 때 리턴
        if (localAnchor == null)
        {
            return;
        }

        // 피쳐 포인트의 갯수 많을 수록 맵핑 퀄리티가 증가함.

        /*
         *  Insufficient = 0 // 불충분
         *  Sufficient   = 1 // 충분
         *  Good         = 2 // Good
         */
        FeatureMapQuality quality
            = anchorManager.EstimateFeatureMapQualityForHosting(GetCameraPose());

        string mappingText = string.Format("맵핑 품질 = {0}", quality);

        // 맵핑 퀄리티가 1이상일 때 호스팅 요청
        if (quality == FeatureMapQuality.Sufficient || quality == FeatureMapQuality.Good)
        {
            // Google Cloud Anchor API를 사용해 업로드(클라우드 앵커의 생성을 요청)
            cloudAnchor = anchorManager.HostCloudAnchor(localAnchor, 1);

            if (cloudAnchor == null)
            {
                mappingText = "클라우드 앵커 생성 실패";
            }
            else
            {
                mappingText = "클라우드 앵커 생성 시작";
                mode        = Mode.HOST_PENDING;
            }
        }

        messageText.text = mappingText;
    }