Пример #1
0
    void OnDevicePoseStatusChanged(Vuforia.TrackableBehaviour.Status status, Vuforia.TrackableBehaviour.StatusInfo statusInfo)
    {
        Debug.Log("OnDevicePoseStatusChanged(" + status + ", " + statusInfo + ")");

        switch (statusInfo)
        {
        case Vuforia.TrackableBehaviour.StatusInfo.INITIALIZING:

            if (Vuforia.VuforiaRuntimeUtilities.GetActiveFusionProvider() ==
                Vuforia.FusionProviderType.PLATFORM_SENSOR_FUSION)
            {
                m_TrackerStatus.text = "Initializing Tracker";
            }
            else
            {
                m_TrackerStatus.text = "Waiting for anchor to be placed to initialize";
            }

            break;

        case Vuforia.TrackableBehaviour.StatusInfo.EXCESSIVE_MOTION:
            m_TrackerStatus.text = "Move slower";
            break;

        case Vuforia.TrackableBehaviour.StatusInfo.INSUFFICIENT_FEATURES:
            m_TrackerStatus.text = "Not enough visual features in the scene";
            break;

        default:
            m_TrackerStatus.text = "";
            break;
        }
    }
Пример #2
0
    void OnDevicePoseStatusChanged(Vuforia.TrackableBehaviour.Status status, Vuforia.TrackableBehaviour.StatusInfo statusInfo)
    {
        // Debug.Log("OnDevicePoseStatusChanged(" + status + ", " + statusInfo + ")");

        if (statusInfo == Vuforia.TrackableBehaviour.StatusInfo.RELOCALIZING)
        {
            // If the status is Relocalizing, then start the timer if it isn't active
            if (!this.relocalizationStatusDelayTimer.Enabled)
            {
                this.relocalizationStatusDelayTimer.Start();
            }
        }
        else
        {
            // If the status is not Relocalizing, then stop the timers if they are active
            if (this.relocalizationStatusDelayTimer.Enabled)
            {
                this.relocalizationStatusDelayTimer.Stop();
            }

            if (this.resetDeviceTrackerTimer.Enabled)
            {
                this.resetDeviceTrackerTimer.Stop();
            }

            // Clear the status message
            StatusMessage.Instance.Display(string.Empty);
        }
    }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        status  = tb.CurrentStatus;
        status1 = tb1.CurrentStatus;
        status2 = tb2.CurrentStatus;

        if (status == Vuforia.TrackableBehaviour.Status.DETECTED || status == Vuforia.TrackableBehaviour.Status.TRACKED || status == Vuforia.TrackableBehaviour.Status.EXTENDED_TRACKED)
        {
            targetDetecte = true;
            consigne.text = "Buste de Jules César - Vercingétorix - 52 av J.-C.";
        }
        else if (status1 == Vuforia.TrackableBehaviour.Status.DETECTED || status1 == Vuforia.TrackableBehaviour.Status.TRACKED || status1 == Vuforia.TrackableBehaviour.Status.EXTENDED_TRACKED)
        {
            targetDetecte = true;
            consigne.text = "Buste de Néfertiti - Thoutmôsis - XIVème siècle av J.-C.";
        }
        else if (status2 == Vuforia.TrackableBehaviour.Status.DETECTED || status2 == Vuforia.TrackableBehaviour.Status.TRACKED || status2 == Vuforia.TrackableBehaviour.Status.EXTENDED_TRACKED)
        {
            targetDetecte = true;
            consigne.text = "Paysage exotique - Douanier Rousseau - 1910";
        }
        else
        {
            targetDetecte = false;
            consigne.text = "Scannez un marqueur pour ajouter une oeuvre à votre collection.";
        }
    }
    /// <summary>
    /// xxxのイベント
    /// </summary>
    public void OnTrackableStateChanged(Vuforia.TrackableBehaviour.Status previousStatus, Vuforia.TrackableBehaviour.Status newStatus)
    {
        Debug.LogError("previousStatus:" + previousStatus + "newStatus" + newStatus);

        if (newStatus.Equals(Vuforia.TrackableBehaviour.Status.TRACKED) && newStatus.Equals(Vuforia.TrackableBehaviour.Status.NOT_FOUND))
        {
            StartCoroutine(Fade(false));
        }
    }
Пример #5
0
 public void OnTrackableStateChanged(Vuforia.TrackableBehaviour.Status previousStatus, Vuforia.TrackableBehaviour.Status newStatus)
 {
     if (newStatus == Vuforia.TrackableBehaviour.Status.DETECTED ||
         newStatus == Vuforia.TrackableBehaviour.Status.TRACKED ||
         newStatus == Vuforia.TrackableBehaviour.Status.EXTENDED_TRACKED)
     {
         OnTrackingFound();
     }
     else
     {
         OnTrackingLost();
     }
 }
Пример #6
0
    void OnDevicePoseStatusChanged(Vuforia.TrackableBehaviour.Status status, Vuforia.TrackableBehaviour.StatusInfo statusInfo)
    {
        Debug.Log("OnDevicePoseStatusChanged(" + status + ", " + statusInfo + ")");

        switch (statusInfo)
        {
        case Vuforia.TrackableBehaviour.StatusInfo.INITIALIZING:
            //Debug.Log("Tracker Initializing");
            break;

        case Vuforia.TrackableBehaviour.StatusInfo.EXCESSIVE_MOTION:
            //Debug.Log("Excessive Motion");
            break;

        case Vuforia.TrackableBehaviour.StatusInfo.INSUFFICIENT_FEATURES:
            //Debug.Log("Insufficient Features");
            break;

        default:
            break;
        }
    }
 void TrackableStateChange(Vuforia.TrackableBehaviour.Status new_status)
 {
     m_status = new_status;
 }