void FindTheFloor()
        {
            var navigationState = UIStateManager.current.stateData.navigationState;

            navigationState.EnableAllNavigation(false);
            navigationState.showScaleReference = true;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetNavigationState, navigationState));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARInstructionSidebar));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithLevel,
                                                                                   new StatusMessageData()
            {
                text = m_InstructionFindAPlaneText, level = StatusMessageLevel.Instruction
            }));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowBoundingBoxModel, false));

            UIStateManager.current.m_PlacementRules.SetActive(true);
            m_Raycaster.ActiveScanning = true;
            m_Raycaster.SetViewBasedPlaceMode(false);

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.okButtonValidator   = this;
            toolState.previousStepEnabled = true;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = false;
            settingsToolState.sceneOptionEnabled = false;
            settingsToolState.sunStudyEnabled    = false;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void ConfirmARAnchorPoint()
        {
            UIStateManager.current.m_PlacementRules.SetActive(false);
            m_Raycaster.ActiveScanning = false;
            m_Raycaster.DisableCursor();

            // calculate AR anchor point
            ARPlacementStateData placementStateData = UIStateManager.current.arStateData.placementStateData;

            PlanePlaneIntersection(out var unusedPoint, out var lineVec, placementStateData.firstARSelectedPlane.transform.up,
                                   placementStateData.firstARSelectedPlane.transform.position,
                                   placementStateData.secondARSelectedPlane.transform.up, placementStateData.secondARSelectedPlane.transform.position);
            // calculate intersect with bottom floor for now
            LinePlaneIntersection(out var anchorPoint, unusedPoint, lineVec, placementStateData.arFloor.transform.up, placementStateData.arFloor.transform.position);
            placementStateData.arPlacementLocation = anchorPoint;
            // calculate beam height
            placementStateData.beamHeight = Math.Max(placementStateData.firstARSelectedPlane.GetComponent <Renderer>().bounds.size.y,
                                                     placementStateData.secondARSelectedPlane.GetComponent <Renderer>().bounds.size.y);

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetPlacementState, placementStateData));
            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled       = false;
            toolState.okEnabled               = true;
            toolState.previousStepEnabled     = true;
            toolState.arWallIndicatorsEnabled = true;
            toolState.arAnchorPointsEnabled   = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithType,
                                                            new StatusMessageData()
            {
                text = m_InstructionConfirmARAnchorPoint, type = StatusMessageType.Instruction
            }));
        }
        void ConfirmPlacement()
        {
            UIStateManager.current.m_PlacementRules.SetActive(false);

            m_Raycaster.ActiveScanning = false;
            m_Raycaster.SetViewBasedPlaceMode(true);

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.okEnabled           = true;
            toolState.previousStepEnabled = true;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARInstructionSidebar));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowBoundingBoxModel, true));
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowModel, false));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithLevel,
                                                                                   new StatusMessageData()
            {
                text = m_InstructionAimToPlaceText, level = StatusMessageLevel.Instruction
            }));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = false;
            settingsToolState.sceneOptionEnabled = false;
            settingsToolState.sunStudyEnabled    = false;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void FindTheARFloor()
        {
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetPlacementRules, PlacementRule.FloorPlacementRule));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ClearStatus, null));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar,
                                                            ToolbarType.ARInstructionSidebar));

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled   = false;
            toolState.okButtonValidator   = this;
            toolState.previousStepEnabled = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithType,
                                                            new StatusMessageData()
            {
                text = m_InstructionFindTheFloor, type = StatusMessageType.Instruction
            }));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = false;
            settingsToolState.sceneOptionEnabled = false;
            settingsToolState.sunStudyEnabled    = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void ConfirmPlacement()
        {
            UIStateManager.current.m_PlacementRules.SetActive(false);
            m_Raycaster.ActiveScanning = false;

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowBoundingBoxModel, true));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowModel, false));

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARInstructionSidebar));

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithType,
                                                            new StatusMessageData()
            {
                text = m_InstructionConfirmPlacementText, type = StatusMessageType.Instruction
            }));

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.okButtonValidator   = null;
            toolState.okEnabled           = true;
            toolState.previousStepEnabled = true;
            toolState.cancelEnabled       = true;
            toolState.scaleEnabled        = true;
            toolState.rotateEnabled       = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = false;
            settingsToolState.sceneOptionEnabled = false;
            settingsToolState.sunStudyEnabled    = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void OnBoardingCompleteNext()
        {
            m_Raycaster.SetViewBasedPlaceMode(false);

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.previousStepEnabled = true;
            toolState.selectionEnabled    = true;
            toolState.scaleEnabled        = false;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusLevel, StatusMessageLevel.Info));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ClearStatus, null));

            m_Raycaster.SwapModel(UIStateManager.current.m_BoundingBoxRootNode, UIStateManager.current.m_RootNode);

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARSidebar));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = true;
            settingsToolState.sceneOptionEnabled = true;
            settingsToolState.sunStudyEnabled    = false;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void AlignModelView()
        {
            m_Raycaster.Reset();
            m_Raycaster.ActiveScanning = false;
            m_Raycaster.DisableCursor();

            ToolState toolState = UIStateManager.current.stateData.toolState;

            toolState.activeTool = ToolType.OrbitTool;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetToolState, toolState));
            ARToolStateData arToolStateData = ARToolStateData.defaultData;

            arToolStateData.navigationEnabled = true;
            arToolStateData.okEnabled         = true;
            arToolStateData.okButtonValidator = this;
            arToolStateData.scaleEnabled      = false;
            arToolStateData.rotateEnabled     = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, arToolStateData));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithType,
                                                            new StatusMessageData()
            {
                text = m_InstructionAlignModelView, type = StatusMessageType.Instruction
            }));

            var navigationState = UIStateManager.current.stateData.navigationState;

            navigationState.EnableAllNavigation(true);
            navigationState.showScaleReference = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetNavigationState, navigationState));
        }
        void OnBoardingCompleteNext()
        {
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusInstructionMode, false));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ClearStatus, null));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARSidebar));

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowModel, true));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowBoundingBoxModel, false));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetInstructionUIState, InstructionUIState.Completed));

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.okEnabled           = true;
            toolState.previousStepEnabled = true;
            toolState.cancelEnabled       = true;
            toolState.scaleEnabled        = true;
            toolState.rotateEnabled       = false;
            toolState.selectionEnabled    = true;
            toolState.measureToolEnabled  = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = true;
            settingsToolState.sceneOptionEnabled = true;
            settingsToolState.sunStudyEnabled    = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void FindModelFloor()
        {
            m_PlaneSelector.Orientation = MarsPlaneAlignment.HorizontalUp;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetObjectPicker, m_PlaneSelector));
            ARToolStateData arToolState = ARToolStateData.defaultData;

            arToolState.navigationEnabled   = false;
            arToolState.selectionEnabled    = true;
            arToolState.previousStepEnabled = true;
            arToolState.okButtonValidator   = this;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, arToolState));
            var toolState = UIStateManager.current.stateData.toolState;

            toolState.activeTool = ToolType.SelectTool;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetToolState, toolState));
            var navigationState = UIStateManager.current.stateData.navigationState;

            navigationState.selectionUsageCount++;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetNavigationState, navigationState));
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithLevel,
                                                                                   new StatusMessageData()
            {
                text = m_InstructionFindModelFloor, level = StatusMessageLevel.Instruction
            }));
        }
        void OnBoardingCompleteNext()
        {
            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.selectionEnabled        = true;
            toolState.navigationEnabled       = false;
            toolState.okEnabled               = true;
            toolState.previousStepEnabled     = true;
            toolState.arWallIndicatorsEnabled = false;
            toolState.arAnchorPointsEnabled   = false;
            toolState.measureToolEnabled      = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            var modelPlaneContext = UIStateManager.current.arStateData.placementStateData.firstSelectedPlane.GetComponent <PlaneSelectionContext>().SelectionContextList[0];

            m_Raycaster.AlignModelWithAnchor(UIStateManager.current.m_RootNode, modelPlaneContext.SelectedPlane.normal,
                                             UIStateManager.current.arStateData.placementStateData.arPlacementAlignment, UIStateManager.current.arStateData.placementStateData.modelPlacementLocation,
                                             UIStateManager.current.arStateData.placementStateData.arPlacementLocation);

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowModel, true));
            // only clear the messages if not debugging ARAxis
            if (!UIStateManager.current.debugStateData.debugOptionsData.ARAxisTrackingEnabled)
            {
                Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusInstructionMode, false));
                Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ClearStatus, null));
            }
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARSidebar));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = true;
            settingsToolState.sceneOptionEnabled = true;
            settingsToolState.sunStudyEnabled    = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void ConfirmPlacementNext()
        {
            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled       = false;
            toolState.okEnabled               = true;
            toolState.previousStepEnabled     = true;
            toolState.arWallIndicatorsEnabled = false;
            toolState.arAnchorPointsEnabled   = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));
            ConfirmPlacement();
        }
Beispiel #12
0
 public UIARStateData(bool arEnabled, InstructionUIState instructionUIState, IInstructionUI currentInstructionUI, int numProxyInstances,
                      int instructionUIStep, bool placementGesturesEnabled, ARToolStateData arToolStateData, ARPlacementStateData placementStateData, ARMode arMode)
 {
     this.arEnabled            = arEnabled;
     this.instructionUIState   = instructionUIState;
     this.currentInstructionUI = currentInstructionUI;
     this.numProxyInstances    = numProxyInstances;
     this.instructionUIStep    = instructionUIStep;
     this.arToolStateData      = arToolStateData;
     this.placementStateData   = placementStateData;
     this.arMode = arMode;
 }
        void FindFirstWallBack()
        {
            ARPlacementStateData placementStateData = UIStateManager.current.arStateData.placementStateData;
            ARToolStateData      toolState          = ARToolStateData.defaultData;

            toolState.navigationEnabled     = false;
            toolState.previousStepEnabled   = true;
            toolState.okButtonValidator     = this;
            toolState.wallIndicatorsEnabled = true;
            toolState.anchorPointsEnabled   = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));
            DestroyImmediate(placementStateData.firstSelectedPlane);
            FindFirstWall();
        }
        void ConfirmAnchorPoint()
        {
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SelectObjects, new  ObjectSelectionInfo()));
            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled     = false;
            toolState.previousStepEnabled   = true;
            toolState.okButtonValidator     = this;
            toolState.wallIndicatorsEnabled = true;
            toolState.anchorPointsEnabled   = true;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithLevel,
                                                                                   new StatusMessageData()
            {
                text = m_InstructionConfirmAnchorPoint, level = StatusMessageLevel.Instruction
            }));
        }
        void FindSecondARWall()
        {
            m_Raycaster.Reset();
            m_Raycaster.ActiveScanning = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetPlacementRules, PlacementRule.WallPlacementRule));
            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled       = false;
            toolState.okButtonValidator       = this;
            toolState.previousStepEnabled     = true;
            toolState.arWallIndicatorsEnabled = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithType,
                                                            new StatusMessageData()
            {
                text = m_InstructionFindSecondARWall, type = StatusMessageType.Instruction
            }));
        }
        void FindTheFloor()
        {
            UIStateManager.current.m_PlacementRules.SetActive(true);

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.EnablePlacement, false));
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithLevel,
                                                                                   new StatusMessageData()
            {
                text = m_InstructionFindAPlaneText, level = StatusMessageLevel.Instruction
            }));

            m_Raycaster.ActiveScanning = true;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.ShowBoundingBoxModel, false));
            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.okButtonValidator = this;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));
        }
        void FindSecondWallBack()
        {
            ARPlacementStateData placementStateData = UIStateManager.current.arStateData.placementStateData;

            placementStateData.modelPlacementLocation = Vector3.zero;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetPlacementState, placementStateData));
            var navigationState = UIStateManager.current.stateData.navigationState;

            navigationState.selectionUsageCount++;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetNavigationState, navigationState));
            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled     = false;
            toolState.previousStepEnabled   = true;
            toolState.okButtonValidator     = this;
            toolState.wallIndicatorsEnabled = true;
            toolState.anchorPointsEnabled   = false;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));
            DestroyImmediate(placementStateData.secondSelectedPlane);
            FindSecondWall();
        }
        void FindSecondWall()
        {
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SelectObjects, new ObjectSelectionInfo()));
            ARToolStateData arToolState = ARToolStateData.defaultData;

            arToolState.navigationEnabled     = false;
            arToolState.selectionEnabled      = true;
            arToolState.previousStepEnabled   = true;
            arToolState.okButtonValidator     = this;
            arToolState.wallIndicatorsEnabled = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, arToolState));
            var toolState = UIStateManager.current.stateData.toolState;

            toolState.activeTool = ToolType.SelectTool;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetToolState, toolState));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithType,
                                                            new StatusMessageData()
            {
                text = m_InstructionFindSecondWall, type = StatusMessageType.Instruction
            }));
        }
Beispiel #19
0
        void AlignModelView()
        {
            m_Raycaster.Reset();

            if (UIStateManager.current.m_PlacementRules != null)
            {
                UIStateManager.current.m_PlacementRules.SetActive(false);
            }
            m_Raycaster.ActiveScanning = false;
            m_Raycaster.DisableCursor();

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithType,
                                                            new StatusMessageData()
            {
                text = m_InstructionAlignModelView, type = StatusMessageType.Instruction
            }));

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARModelAlignSidebar));

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled = true;
            toolState.okEnabled         = true;
            toolState.scaleEnabled      = false;
            toolState.rotateEnabled     = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            var navigationState = UIStateManager.current.stateData.navigationState;

            navigationState.EnableAllNavigation(true);
            navigationState.showScaleReference = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetNavigationState, navigationState));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = true;
            settingsToolState.sceneOptionEnabled = true;
            settingsToolState.sunStudyEnabled    = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void FindFirstWall()
        {
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SelectObjects, new  ObjectSelectionInfo()));
            m_PlaneSelector.Orientation = MarsPlaneAlignment.Vertical;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetObjectPicker, m_PlaneSelector));
            ARToolStateData arToolState = ARToolStateData.defaultData;

            arToolState.navigationEnabled     = false;
            arToolState.selectionEnabled      = true;
            arToolState.previousStepEnabled   = true;
            arToolState.wallIndicatorsEnabled = true;
            arToolState.okButtonValidator     = this;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, arToolState));
            var toolState = UIStateManager.current.stateData.toolState;

            toolState.activeTool = ToolType.SelectTool;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetToolState, toolState));
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithLevel,
                                                                                   new StatusMessageData()
            {
                text = m_InstructionFindFirstWall, level = StatusMessageLevel.Instruction
            }));
        }
        void AlignModelView()
        {
            m_Raycaster.Reset();
            UIStateManager.current.m_RootNode.transform.localPosition = Vector3.zero;
            UIStateManager.current.m_RootNode.transform.localRotation = Quaternion.identity;

            UIStateManager.current.m_PlacementRules.SetActive(false);
            m_Raycaster.ActiveScanning = false;
            m_Raycaster.DisableCursor();

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetStatusWithLevel,
                                                                                   new StatusMessageData()
            {
                text = m_InstructionAlignModelView, level = StatusMessageLevel.Instruction
            }));

            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar, ToolbarType.ARModelAlignSidebar));

            ARToolStateData toolState = ARToolStateData.defaultData;

            toolState.navigationEnabled = true;
            toolState.okEnabled         = true;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, toolState));

            var navigationState = UIStateManager.current.stateData.navigationState;

            navigationState.EnableAllNavigation(true);
            navigationState.showScaleReference = false;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetNavigationState, navigationState));

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = true;
            settingsToolState.sceneOptionEnabled = true;
            settingsToolState.sunStudyEnabled    = false;
            UIStateManager.current.Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }
        void ConfirmAnchorPointBack()
        {
            ARToolStateData arToolStateData = ARToolStateData.defaultData;

            arToolStateData.navigationEnabled     = true;
            arToolStateData.previousStepEnabled   = true;
            arToolStateData.okButtonValidator     = this;
            arToolStateData.wallIndicatorsEnabled = true;
            arToolStateData.anchorPointsEnabled   = true;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetARToolState, arToolStateData));
            ToolState toolState = UIStateManager.current.stateData.toolState;

            toolState.activeTool = ToolType.OrbitTool;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetToolState, toolState));

            m_Raycaster.Reset();
            m_Raycaster.ActiveScanning = false;

            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.EnableAR, false));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetPlacementRules, PlacementRule.None));
            var navigationState = UIStateManager.current.stateData.navigationState;

            navigationState.EnableAllNavigation(true);
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetNavigationState, navigationState));
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetActiveToolbar,
                                                            ToolbarType.ARModelAlignSidebar));

            ConfirmAnchorPoint();

            SettingsToolStateData settingsToolState = SettingsToolStateData.defaultData;

            settingsToolState.bimFilterEnabled   = true;
            settingsToolState.sceneOptionEnabled = true;
            settingsToolState.sunStudyEnabled    = false;
            Dispatcher.Dispatch(Payload <ActionTypes> .From(ActionTypes.SetSettingsToolState, settingsToolState));
        }