Beispiel #1
0
        public void SelectARMode(SetARModeAction.ARMode arMode)
        {
            if (arMode == SetARModeAction.ARMode.None)
            {
                return;
            }

            Dispatcher.Dispatch(SetWalkEnableAction.From(false));

            var currentNavigationMode = m_NavigationModeSelector.GetValue() == SetNavigationModeAction.NavigationMode.Walk
                ? SetNavigationModeAction.NavigationMode.Orbit
                : m_NavigationModeSelector.GetValue();

            if (currentNavigationMode != SetNavigationModeAction.NavigationMode.AR)
            {
                Dispatcher.Dispatch(UnloadSceneActions <Project> .From(UIStateManager.current.GetSceneDictionary()[currentNavigationMode]));
                Dispatcher.Dispatch(LoadSceneActions <Project> .From(UIStateManager.current.GetSceneDictionary()[SetNavigationModeAction.NavigationMode.AR]));
            }

            Dispatcher.Dispatch(OpenDialogAction.From(OpenDialogAction.DialogType.None));
            Dispatcher.Dispatch(ClearStatusAction.From(true));
            Dispatcher.Dispatch(ClearStatusAction.From(false));
            Dispatcher.Dispatch(SetInstructionMode.From(false));
            Dispatcher.Dispatch(CloseAllDialogsAction.From(null));
            Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.AR));
            Dispatcher.Dispatch(SetARModeAction.From(arMode));
        }
        private void OnCarouselValueChanged(int carouselIndex)
        {
            // NOTE: this assumes carouselIndex is in the exact order as NavigationMode enum!
            Dispatcher.Dispatch(SetNavigationModeAction.From((SetNavigationModeAction.NavigationMode)carouselIndex));

            // NOTE: this assumes carouselIndex is in the exact order as ToolbarType enum!
            Dispatcher.Dispatch(SetActiveToolBarAction.From((SetActiveToolBarAction.ToolbarType)carouselIndex));
        }
        IEnumerator DisableDepthCulling()
        {
            yield return(new WaitForEndOfFrame());

            Dispatcher.Dispatch(EnableAllNavigationAction.From(true));
            Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.VR));
            Dispatcher.Dispatch(SetShowScaleReferenceAction.From(false));
        }
Beispiel #4
0
        void OnFlyButtonClicked()
        {
            Dispatcher.Dispatch(CloseAllDialogsAction.From(null));

            var currentNavigationMode = m_NavigationModeSelector.GetValue();

            if (currentNavigationMode == SetNavigationModeAction.NavigationMode.Orbit ||
                currentNavigationMode == SetNavigationModeAction.NavigationMode.Fly)
            {
                return;
            }

            m_WalkButton.button.interactable = true;

            CheckDeviceCapability(m_DeviceCapabilitySelector.GetValue());

            Dispatcher.Dispatch(ShowModelAction.From(true));

            Dispatcher.Dispatch(SetAREnabledAction.From(false));

            Dispatcher.Dispatch(SetVREnableAction.From(false));

            Dispatcher.Dispatch(ClearStatusAction.From(true));
            Dispatcher.Dispatch(ClearStatusAction.From(false));
            Dispatcher.Dispatch(SetInstructionMode.From(false));

            if (currentNavigationMode != SetNavigationModeAction.NavigationMode.Walk)
            {
                Dispatcher.Dispatch(UnloadSceneActions <Project> .From(m_SceneDictionary[currentNavigationMode]));
                Dispatcher.Dispatch(SetCameraViewTypeAction.From(SetCameraViewTypeAction.CameraViewType.Default));
            }

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

            Dispatcher.Dispatch(SetThemeAction.From(ThemeController.k_Default));

            Dispatcher.Dispatch(SetWalkEnableAction.From(false));

            Dispatcher.Dispatch(EnableAllNavigationAction.From(true));
            Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.Orbit));
            Dispatcher.Dispatch(SetShowScaleReferenceAction.From(false));

            Dispatcher.Dispatch(LoadSceneActions <Project> .From(m_SceneDictionary[SetNavigationModeAction.NavigationMode.Orbit]));

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

            var arToolStateData = SetARToolStateAction.SetARToolStateData.defaultData;

            arToolStateData.selectionEnabled   = true;
            arToolStateData.measureToolEnabled = true;
            Dispatcher.Dispatch(SetARToolStateAction.From(arToolStateData));
        }
Beispiel #5
0
        void OnWalkButtonClicked()
        {
            if (m_NavigationModeSelector.GetValue() == SetNavigationModeAction.NavigationMode.AR)
            {
                OnFlyButtonClicked();
            }

            Dispatcher.Dispatch(CloseAllDialogsAction.From(null));
            Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.Walk));
            Dispatcher.Dispatch(SetWalkEnableAction.From(true));

            m_WalkInstructionSelector.GetValue().Next();
        }
Beispiel #6
0
        void ActivateVRmode()
        {
            m_WalkButton.button.interactable = false;
            m_VRButton.button.interactable   = false;
            var currentNavigationMode = m_NavigationModeSelector.GetValue();

            Dispatcher.Dispatch(SetAREnabledAction.From(false));

            Dispatcher.Dispatch(ClearStatusAction.From(true));
            Dispatcher.Dispatch(ClearStatusAction.From(false));

            Dispatcher.Dispatch(SetInstructionMode.From(false));

            if (currentNavigationMode != SetNavigationModeAction.NavigationMode.Walk)
            {
                Dispatcher.Dispatch(UnloadSceneActions <Project> .From(m_SceneDictionary[currentNavigationMode]));
            }

            Dispatcher.Dispatch(CloseAllDialogsAction.From(null));

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

            Dispatcher.Dispatch(SetThemeAction.From(ThemeController.k_VROpaque));

            Dispatcher.Dispatch(SetWalkEnableAction.From(false));

            Dispatcher.Dispatch(SetVREnableAction.From(true));

            Dispatcher.Dispatch(EnableAllNavigationAction.From(true));
            Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.VR));
            Dispatcher.Dispatch(SetShowScaleReferenceAction.From(false));

            Dispatcher.Dispatch(LoadSceneActions <Project> .From(m_SceneDictionary[SetNavigationModeAction.NavigationMode.VR]));

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

            Dispatcher.Dispatch(ToggleMeasureToolAction.From(ToggleMeasureToolAction.ToggleMeasureToolData.defaultData));
        }
 protected static void GivenViewerIsInOrbitMode()
 {
     Dispatcher.Dispatch(SetNavigationModeAction.From(SetNavigationModeAction.NavigationMode.Orbit));
 }
Beispiel #8
0
 void SetNavigationState(SetNavigationModeAction.NavigationMode mode)
 {
     Dispatcher.Dispatch(SetNavigationModeAction.From(mode));
 }