コード例 #1
0
 public void KillSpawner()
 {
     if (_kudanTracker.ArbiTrackIsTracking())
     {
         _kudanTracker.ArbiTrackStop();
         //debugText.text += "killed spawner ";
         // buttonText.text = spawnersKilled.ToString();
     }
 }
コード例 #2
0
 public void SetTrackingMode(ARTrackingMode flag)
 {
     if (flag == ARTrackingMode.Placement)
     {
         if (DataUtility.TrackingMode == ARTrackingMode.Marker)
         {
             MoveChildrenTo(markerTransform, markerlessTransform);
         }
         _kudanTracker.ArbiTrackStop();
     }
     else if (flag == ARTrackingMode.Markerless)
     {
         if (DataUtility.TrackingMode == ARTrackingMode.Marker)
         {
             MoveChildrenTo(markerTransform, markerlessTransform);
         }
         _kudanTracker.ChangeTrackingMethod(_markerlessTracking);
         if (DataUtility.TrackingMode == ARTrackingMode.Placement)
         {
             DelayPlaceObject();
         }
         else
         {
             StopTracking();
         }
     }
     else if (flag == ARTrackingMode.Marker)
     {
         if (DataUtility.TrackingMode != ARTrackingMode.Marker)
         {
             MoveChildrenTo(markerlessTransform, markerTransform);
         }
         _kudanTracker.ChangeTrackingMethod(_markerTracking);
     }
     DataUtility.TrackingMode = flag;
 }
コード例 #3
0
        public void MarkerlessStartTapped()
        {
            if (!_kudanTracker.ArbiTrackIsTracking())
            {
                Vector3    floorPosition;
                Quaternion floorOrientation;

                _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation);
                _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation);
            }
            else
            {
                _kudanTracker.ArbiTrackStop();
            }
        }
コード例 #4
0
        public void StartClicked()
        {
            if (!_kudanTracker.ArbiTrackIsTracking())
            {
                // from the floor placer.
                Vector3    floorPosition;                                                 // The current position in 3D space of the floor
                Quaternion floorOrientation;                                              // The current orientation of the floor in 3D space, relative to the device

                _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values
                _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation);            // Starts markerless tracking based upon the given floor position and orientations
            }

            else
            {
                _kudanTracker.ArbiTrackStop();
            }
        }
コード例 #5
0
    public void SetActiveArbiTrack(bool b)
    {
        if (_kudanTracker.kudanIsActive)
        {
            if (b)
            {
                // from the floor placer.
                Vector3    floorPosition;                                                 // The current position in 3D space of the floor
                Quaternion floorOrientation;                                              // The current orientation of the floor in 3D space, relative to the device

                _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values
                _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation);            // Starts markerless tracking based upon the given floor position and orientations
                _eggSearcher.StartSearching();
            }
            else
            {
                _kudanTracker.ArbiTrackStop();
                _eggSearcher.StopSearching();
            }
        }
    }
コード例 #6
0
        public void MarkerlessStartTapped()
        {
            if (!_kudanTracker.ArbiTrackIsTracking())
            {
                Vector3    floorPosition;
                Quaternion floorOrientation;

                _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation);
                _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation);
                markerlessStartButton.image.color = Color.red;
                markerlessStartText.text          = "stop";
                selectButton.interactable         = false;
            }
            else
            {
                _kudanTracker.ArbiTrackStop();
                markerlessStartButton.image.color = Color.white;
                markerlessStartText.text          = "start";
                selectButton.interactable         = true;
            }
        }