Example #1
0
        void StartInstruction()
        {
            Dispatcher.Dispatch(ShowModelAction.From(true));
            Dispatcher.Dispatch(SetInstructionUIStateAction.From(SetInstructionUIStateAction.InstructionUIState.Init));
            Dispatcher.Dispatch(SetARInstructionUIAction.From(new { currentARInstructionUI = this }));

            Dispatcher.Dispatch(SetAREnabledAction.From(false));
            Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.ARModelAlignSidebar));
            Dispatcher.Dispatch(SetInstructionMode.From(true));
            Dispatcher.Dispatch(SetModelScaleAction.From(SetModelScaleAction.ArchitectureScale.OneToOne));

            Dispatcher.Dispatch(EnableBimFilterAction.From(true));
            Dispatcher.Dispatch(EnableSceneSettingsAction.From(true));
            Dispatcher.Dispatch(EnableSunStudyAction.From(false));
            Dispatcher.Dispatch(EnableMarkerSettingsAction.From(false));
            Dispatcher.Dispatch(ToggleMeasureToolAction.From(ToggleMeasureToolAction.ToggleMeasureToolData.defaultData));

            var toolState = SetARToolStateAction.SetARToolStateData.defaultData;

            toolState.selectionEnabled   = true;
            toolState.measureToolEnabled = true;
            toolState.scaleEnabled       = true;
            toolState.cancelEnabled      = true;
            Dispatcher.Dispatch(SetARToolStateAction.From(toolState));
            Next();
        }
Example #2
0
        // Initializing state
        void StartInstruction()
        {
            // Set initial state, hide model so it doesn't occlude any markers in the user's view.
            Dispatcher.Dispatch(ShowModelAction.From(false));
            Dispatcher.Dispatch(SetInstructionUIStateAction.From(SetInstructionUIStateAction.InstructionUIState.Init));
            Dispatcher.Dispatch(SetAREnabledAction.From(false));

            Dispatcher.Dispatch(SetARInstructionUIAction.From(new { currentARInstructionUI = this }));
            Dispatcher.Dispatch(SetInstructionMode.From(true));
            Dispatcher.Dispatch(ClearStatusAction.From(false));
            Next();
        }
        void StartInstruction()
        {
            Dispatcher.Dispatch(ShowModelAction.From(true));
            Dispatcher.Dispatch(SetInstructionUIStateAction.From(SetInstructionUIStateAction.InstructionUIState.Init));
            Dispatcher.Dispatch(SetARInstructionUIAction.From(new { currentARInstructionUI = this }));
            Dispatcher.Dispatch(SetAREnabledAction.From(false));
            Dispatcher.Dispatch(SetInstructionMode.From(true));
            m_Raycaster.Reset();
            Dispatcher.Dispatch(SetModelScaleAction.From(SetModelScaleAction.ArchitectureScale.OneToOne));
            Dispatcher.Dispatch(ToggleMeasureToolAction.From(ToggleMeasureToolAction.ToggleMeasureToolData.defaultData));


            Next();
        }
        void OnBoardingCompleteNext()
        {
            m_Raycaster.SetViewBasedPlaceMode(false);

            var toolState = SetARToolStateAction.SetARToolStateData.defaultData;

            toolState.previousStepEnabled = true;
            toolState.selectionEnabled    = true;
            toolState.measureToolEnabled  = true;
            Dispatcher.Dispatch(SetARToolStateAction.From(toolState));
            Dispatcher.Dispatch(SetInstructionMode.From(false));
            Dispatcher.Dispatch(ClearStatusAction.From(true));
            Dispatcher.Dispatch(ClearStatusAction.From(false));
            Dispatcher.Dispatch(ShowModelAction.From(true));
            Dispatcher.Dispatch(ShowBoundingBoxModelAction.From(false));
            Dispatcher.Dispatch(SetInstructionUIStateAction.From(SetInstructionUIStateAction.InstructionUIState.Completed));
            Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.ARSidebar));
            Dispatcher.Dispatch(EnableBimFilterAction.From(true));
            Dispatcher.Dispatch(EnableSceneSettingsAction.From(true));
            Dispatcher.Dispatch(EnableSunStudyAction.From(false));
            Dispatcher.Dispatch(EnableMarkerSettingsAction.From(true));
        }
Example #5
0
        // Finalization State
        void OnBoardingComplete()
        {
            m_MarkerController.ImageTracker.OnTrackedFound          -= HandleTrackableFound;
            m_MarkerController.ImageTracker.OnTrackedPositionUpdate -= HandleTrackableUpdate;
            // Stop image tracker
            m_MarkerController.ImageTracker.Stop();
            Dispatcher.Dispatch(SetInstructionMode.From(false));
            Dispatcher.Dispatch(ClearStatusAction.From(true));
            Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.ARSidebar));

            Dispatcher.Dispatch(ShowModelAction.From(true));
            Dispatcher.Dispatch(ShowBoundingBoxModelAction.From(false));
            Dispatcher.Dispatch(SetInstructionUIStateAction.From(SetInstructionUIStateAction.InstructionUIState.Completed));

            var toolState = SetARToolStateAction.SetARToolStateData.defaultData;

            toolState.okEnabled               = true;
            toolState.okButtonValidator       = null;
            toolState.previousStepEnabled     = true;
            toolState.cancelEnabled           = true;
            toolState.scaleEnabled            = true;
            toolState.rotateEnabled           = false;
            toolState.selectionEnabled        = true;
            toolState.measureToolEnabled      = true;
            toolState.navigationEnabled       = false;
            toolState.arWallIndicatorsEnabled = false;
            toolState.arAnchorPointsEnabled   = false;
            Dispatcher.Dispatch(SetARToolStateAction.From(toolState));

            Dispatcher.Dispatch(EnableBimFilterAction.From(true));
            Dispatcher.Dispatch(EnableSceneSettingsAction.From(true));
            Dispatcher.Dispatch(EnableSunStudyAction.From(false));
            Dispatcher.Dispatch(EnableMarkerSettingsAction.From(true));

            // Finally set the model's transform to the marker
            m_ARModeUIController.StartCoroutine(VisualizeWhenLoaded());
        }
        void StartInstruction()
        {
            Dispatcher.Dispatch(ShowModelAction.From(false));
            Dispatcher.Dispatch(SetInstructionUIStateAction.From(SetInstructionUIStateAction.InstructionUIState.Init));
            Dispatcher.Dispatch(SetARInstructionUIAction.From(new { currentARInstructionUI = this }));
            Dispatcher.Dispatch(SetAREnabledAction.From(true));

            m_Raycaster.Reset();
            m_ARModeUIController.ActivePlacementRules(SetModelFloorAction.PlacementRule.TableTopPlacementRule);
            Dispatcher.Dispatch(SetARPlacementRuleAction.From(SetModelFloorAction.PlacementRule.TableTopPlacementRule));

            Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.ARInstructionSidebar));

            // default scale 1:100
            Dispatcher.Dispatch(SetModelScaleAction.From(SetModelScaleAction.ArchitectureScale.OneToOneHundred));

            Dispatcher.Dispatch(EnableAllNavigationAction.From(false));
            Dispatcher.Dispatch(SetShowScaleReferenceAction.From(true));
            Dispatcher.Dispatch(SetInstructionMode.From(true));

            Dispatcher.Dispatch(EnableBimFilterAction.From(false));
            Dispatcher.Dispatch(EnableSceneSettingsAction.From(true));
            Dispatcher.Dispatch(EnableSunStudyAction.From(false));
            Dispatcher.Dispatch(EnableMarkerSettingsAction.From(false));
            Dispatcher.Dispatch(
                ToggleMeasureToolAction.From(ToggleMeasureToolAction.ToggleMeasureToolData.defaultData));

            var toolState = SetARToolStateAction.SetARToolStateData.defaultData;

            toolState.selectionEnabled   = true;
            toolState.measureToolEnabled = true;
            toolState.scaleEnabled       = true;
            toolState.cancelEnabled      = true;
            Dispatcher.Dispatch(SetARToolStateAction.From(toolState));

            Next();
        }
        IEnumerator StartInstructionAR()
        {
            yield return(new WaitForSeconds(0));

            Dispatcher.Dispatch(SetInstructionUIStateAction.From(SetInstructionUIStateAction.InstructionUIState.Started));
        }