コード例 #1
0
 /// <summary>
 /// Update tracking information, called by ARUWPController.cs. [internal use]
 /// </summary>
 public void UpdateTrackingInfo()
 {
     if (id != -1)
     {
         if (ARUWP.aruwpQueryMarkerTransformation(id, __info.trans))
         {
             if (type != MarkerType.multi)
             {
                 __info.confidence = ARUWP.aruwpGetMarkerOptionFloat(id, ARUWP.ARUWP_MARKER_OPTION_SQUARE_CONFIDENCE);
             }
             __info.visible = true;
         }
         else
         {
             __info.visible    = false;
             __info.confidence = 0.0f;
         }
         Interlocked.Exchange(ref _info, __info);
         signalTrackingUpdated = true;
     }
     else
     {
         Debug.Log(TAG + ": Transformation not valid for id -1");
     }
 }
コード例 #2
0
 // return true if visible
 // return false if error or invisible
 public bool updateMarkerTracking()
 {
     if (id != -1)
     {
         if (ARUWP.aruwpQueryMarkerTransformation(id, trans))
         {
             transMatrix = ARUWPUtils.ConvertARUWPFloatArrayToMatrix4x4(trans);
             if (performMagicFunction)
             {
                 MagicFunction();
             }
             if (type != MarkerType.multi)
             {
                 confidence = ARUWP.aruwpGetMarkerOptionFloat(id, ARUWP.ARUWP_MARKER_OPTION_SQUARE_CONFIDENCE);
             }
             visible = true;
             return(true);
         }
         else
         {
             visible    = false;
             confidence = 0.0f;
             return(false);
         }
     }
     else
     {
         Debug.Log(TAG + ": Transformation not valid for id -1");
         visible = false;
         return(false);
     }
 }