void FindTheARFloor() { m_ARModeUIController.ActivePlacementRules(SetModelFloorAction.PlacementRule.FloorPlacementRule); Dispatcher.Dispatch(ShowModelAction.From(false)); Dispatcher.Dispatch(SetARPlacementRuleAction.From(SetModelFloorAction.PlacementRule.FloorPlacementRule)); Dispatcher.Dispatch(ClearStatusAction.From(true)); Dispatcher.Dispatch(ClearStatusAction.From(false)); Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.ARInstructionSidebar)); var toolState = SetARToolStateAction.SetARToolStateData.defaultData; toolState.okEnabled = false; toolState.navigationEnabled = false; toolState.okButtonValidator = this; toolState.previousStepEnabled = true; Dispatcher.Dispatch(SetARToolStateAction.From(toolState)); Dispatcher.Dispatch(SetStatusMessageWithType.From( new StatusMessageData() { text = m_InstructionFindTheFloor, type = StatusMessageType.Instruction })); Dispatcher.Dispatch(EnableBimFilterAction.From(false)); Dispatcher.Dispatch(EnableSceneSettingsAction.From(true)); Dispatcher.Dispatch(EnableSunStudyAction.From(false)); Dispatcher.Dispatch(EnableMarkerSettingsAction.From(false)); }
void ConfirmAnchorPointBack() { var arToolStateData = SetARToolStateAction.SetARToolStateData.defaultData; arToolStateData.navigationEnabled = true; arToolStateData.previousStepEnabled = true; arToolStateData.okButtonValidator = this; arToolStateData.wallIndicatorsEnabled = true; arToolStateData.anchorPointsEnabled = true; Dispatcher.Dispatch(SetARToolStateAction.From(arToolStateData)); Dispatcher.Dispatch(SetActiveToolAction.From(SetActiveToolAction.ToolType.None)); m_Raycaster.Reset(); m_Raycaster.ActiveScanning = false; Dispatcher.Dispatch(SetAREnabledAction.From(false)); m_ARModeUIController.ActivePlacementRules(SetModelFloorAction.PlacementRule.None); Dispatcher.Dispatch(SetARPlacementRuleAction.From(SetModelFloorAction.PlacementRule.None)); Dispatcher.Dispatch(EnableAllNavigationAction.From(true)); Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.ARModelAlignSidebar)); ConfirmAnchorPoint(); Dispatcher.Dispatch(EnableBimFilterAction.From(true)); Dispatcher.Dispatch(EnableSceneSettingsAction.From(true)); Dispatcher.Dispatch(EnableSunStudyAction.From(false)); Dispatcher.Dispatch(EnableMarkerSettingsAction.From(false)); }
void FindTheFloorNext() { m_Raycaster.SetViewBaseARMode(Camera.main.transform); Dispatcher.Dispatch(SetAREnabledAction.From(true)); m_ARModeUIController.ActivePlacementRules(SetModelFloorAction.PlacementRule.FloorPlacementRule); Dispatcher.Dispatch(SetARPlacementRuleAction.From(SetModelFloorAction.PlacementRule.FloorPlacementRule)); FindTheFloor(); }
void FindSecondARWall() { m_Raycaster.Reset(); m_Raycaster.ActiveScanning = true; m_ARModeUIController.ActivePlacementRules(SetModelFloorAction.PlacementRule.WallPlacementRule); Dispatcher.Dispatch(SetARPlacementRuleAction.From(SetModelFloorAction.PlacementRule.WallPlacementRule)); var toolState = SetARToolStateAction.SetARToolStateData.defaultData; toolState.navigationEnabled = false; toolState.okButtonValidator = this; toolState.previousStepEnabled = true; toolState.arWallIndicatorsEnabled = true; Dispatcher.Dispatch(SetARToolStateAction.From(toolState)); Dispatcher.Dispatch(SetStatusMessageWithType.From( new StatusMessageData() { text = m_InstructionFindSecondARWall, type = StatusMessageType.Instruction })); }
void AnchoringView() { var instruction = $"Locate anchor for {m_MarkerController.ActiveMarker.Name}, then press Ok."; Dispatcher.Dispatch(SetStatusMessageWithType.From(new StatusMessageData { text = instruction, type = StatusMessageType.Instruction })); var toolState = SetARToolStateAction.SetARToolStateData.defaultData; toolState.okButtonValidator = null; toolState.okEnabled = false; toolState.scaleEnabled = false; toolState.rotateEnabled = false; toolState.previousStepEnabled = true; Dispatcher.Dispatch(SetARToolStateAction.From(toolState)); Dispatcher.Dispatch(SetActiveToolBarAction.From(SetActiveToolBarAction.ToolbarType.ARInstructionSidebar)); Dispatcher.Dispatch(ShowModelAction.From(false)); Dispatcher.Dispatch(EnableBimFilterAction.From(false)); Dispatcher.Dispatch(EnableSceneSettingsAction.From(false)); Dispatcher.Dispatch(EnableSunStudyAction.From(false)); Dispatcher.Dispatch(EnableMarkerSettingsAction.From(false)); Dispatcher.Dispatch(SetAREnabledAction.From(true)); Dispatcher.Dispatch(SetARPlacementRuleAction.From(SetModelFloorAction.PlacementRule.MarkerPlacementRule)); // Run image tracking, watch for a target // Show accept button when a target is available. m_MarkerController.ImageTracker.OnTrackedFound += HandleTrackableFound; m_MarkerController.ImageTracker.OnTrackedPositionUpdate += HandleTrackableUpdate; m_PlacementRuleGameObjectSelector.GetValue().SetActive(false); m_MarkerController.ImageTracker.Run(); }
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(); }