コード例 #1
0
ファイル: MarkerEvents.cs プロジェクト: Basking70/WireLoop
 /// <summary>
 /// Checks if the marker has been lost in this frame.
 /// </summary>
 /// <param name="markerStruct">Marker struct.</param>
 public void checkLost(markerStruct markerStruct)
 {
     // If the marker is no longer active but was active last frame, it must have been lost this frame
     if (!markerStruct.isActive && markerStruct.wasActive)
     {
         Debug.LogWarning("Lost Marker: " + markerStruct.name);
     }
 }
コード例 #2
0
ファイル: MarkerEvents.cs プロジェクト: Basking70/WireLoop
 /// <summary>
 /// Checks if the marker was found in this frame.
 /// </summary>
 /// <param name="markerStruct">Marker struct.</param>
 public void checkFound(markerStruct markerStruct)
 {
     // If the marker is active this frame, but was not active last frame, then it must have been found this frame
     if (markerStruct.isActive && !markerStruct.wasActive)
     {
         //name = marker.name;
         Debug.LogWarning("Found Marker: " + markerStruct.name);
     }
 }
コード例 #3
0
ファイル: MarkerEvents.cs プロジェクト: Basking70/WireLoop
 /// <summary>
 /// Checks if the marker has been tracked in this frame.
 /// </summary>
 /// <param name="markerStruct">Marker struct.</param>
 public void checkTrack(markerStruct markerStruct)
 {
     // If the marker is currently active, it is being tracked
     if (markerStruct.marker.activeInHierarchy)
     {
         Debug.LogWarning("Tracking Marker: " + markerStruct.name);
     }
     // If the marker is no longer active, it must have been lost, so set the marker to null, allowing the marker lost event to fire
     else
     {
         markerStruct.marker = null;
     }
 }