Exemple #1
0
        /// <summary>
        ///     For bounding box selection and some tools.
        /// </summary>
        /// <returns>True if the entire selection cancelled, false otherwise.</returns>
        public bool CancelSelection(bool cancelAll = false, XRInteractableTerrainActivity nextMode = XRInteractableTerrainActivity.Default)
        {
            switch (CurrentActivity)
            {
            case XRInteractableTerrainActivity.BBoxSelection:
                if (BBoxSelectionController.CancelSelection(cancelAll))
                {
                    CurrentActivity = nextMode;
                    BBoxSelectionController.SetEnabled(false);
                    return(true);
                }
                break;

            case XRInteractableTerrainActivity.Distance:
            case XRInteractableTerrainActivity.HeightProfile:
                if (!HeightProfileController.SelectionInputEnabled)
                {
                    cancelAll = true;
                }
                if (HeightProfileController.CancelSelection(cancelAll))
                {
                    CurrentActivity = nextMode;
                    HeightProfileController.SetEnabled(false);
                    return(true);
                }
                break;

            case XRInteractableTerrainActivity.SunAngle:
                break;
            }
            return(false);
        }