Ejemplo n.º 1
0
 /// <summary>
 /// Handle in charge of clearing all planes if map gets lost.
 /// </summary>
 /// <param name="mapEvents"> Map Events that happened. </param>
 private void OnHeadTrackingMapEvent(MLHeadTrackingMapEvent mapEvents)
 {
     if (mapEvents.IsLost())
     {
         // TODO may need to do something if we lose headpose but not yet
     }
 }
 /// <summary>
 /// Handle in charge of clearing all planes if map gets lost.
 /// </summary>
 /// <param name="mapEvents"> Map Events that happened. </param>
 private void OnHeadTrackingMapEvent(MLHeadTrackingMapEvent mapEvents)
 {
     if (mapEvents.IsLost())
     {
         _numberOfPlanesText.text = string.Format("Number of Planes: 0/{0}", _planesComponent.MaxPlaneCount);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handle in charge of refreshing all meshes if map gets lost.
 /// </summary>
 /// <param name="mapEvents"> Map Events that happened. </param>
 private void OnHeadTrackingMapEvent(MLHeadTrackingMapEvent mapEvents)
 {
     if (mapEvents.IsLost())
     {
         _mlSpatialMapper.DestroyAllMeshes();
         _mlSpatialMapper.RefreshAllMeshes();
     }
 }
 /// <summary>
 /// Handle in charge of clearing all planes/boundaries if map gets lost.
 /// </summary>
 /// <param name="mapEvents"> Map Events that happened. </param>
 private void HandleOnHeadTrackingMapEvent(MLHeadTrackingMapEvent mapEvents)
 {
     if (mapEvents.IsLost())
     {
         DestroyPlanes();
         DestroyBoundaries();
     }
 }
Ejemplo n.º 5
0
 private void OnHeadTrackingMapEvent(MLHeadTrackingMapEvent mapEvents)
 {
     if (mapEvents.IsLost())
     {
         // Destroy(cursorObject);
         for (int i = 0; i < POINT_COUNT; i++)
         {
             Destroy(spawnedObject);
         }
         idx = 0;
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Handle in charge of resetting counters upon a new headpose session
 /// </summary>
 /// <param name="mapEvents"> Map Events that happened. </param>
 private void HandleHeadTrackingMapEvent(MLHeadTrackingMapEvent mapEvents)
 {
     if (mapEvents.IsNewSession())
     {
         _countCreatedBad   = 0;
         _countCreatedGood  = 0;
         _countRestoredBad  = 0;
         _countRestoredGood = 0;
         UpdateCreatedCountText();
         UpdateRestoredCountText();
     }
 }
 public static bool IsNewSession(this MLHeadTrackingMapEvent events)
 {
     return((int)(events & MLHeadTrackingMapEvent.NewSession) != 0);
 }
 public static bool IsRecoveryFailed(this MLHeadTrackingMapEvent events)
 {
     return((int)(events & MLHeadTrackingMapEvent.RecoveryFailed) != 0);
 }
 public static bool IsLost(this MLHeadTrackingMapEvent events)
 {
     return((int)(events & MLHeadTrackingMapEvent.Lost) != 0);
 }