/// <summary> /// Resets all cached system references to null /// </summary> public static void ResetCacheReferences() { serviceCache.Clear(); boundarySystem = null; cameraSystem = null; diagnosticsSystem = null; focusProvider = null; inputSystem = null; raycastProvider = null; sceneSystem = null; spatialAwarenessSystem = null; teleportSystem = null; }
public void Initialize( IMixedRealityBoundarySystem boundarySystem, bool isFloorVisualized, bool isPlayAreaVisualized, bool isTrackedAreaVisualized, bool areBoundaryWallsVisualized, bool isCeilingVisualized) { base.BaseInitialize(boundarySystem); IsFloorVisualized = isFloorVisualized; IsPlayAreaVisualized = isPlayAreaVisualized; IsTrackedAreaVisualized = isTrackedAreaVisualized; AreBoundaryWallsVisualized = areBoundaryWallsVisualized; IsCeilingVisualized = isCeilingVisualized; }
public IEnumerator VerifyServiceState() { MixedRealityToolkitConfigurationProfile profile1 = TestUtilities.GetDefaultMixedRealityProfile <MixedRealityToolkitConfigurationProfile>(); yield return(null); // Initialize the test case with profile 1 InitializeTest(profile1); // Cache the interesting settings read from the initial boundary system instance IMixedRealityBoundarySystem boundarySystem1 = CoreServices.BoundarySystem; yield return(null); float height1 = boundarySystem1.BoundaryHeight; int floorPhysics1 = boundarySystem1.FloorPhysicsLayer; bool showTracked1 = boundarySystem1.ShowTrackedArea; bool showCeiling1 = boundarySystem1.ShowBoundaryCeiling; MixedRealityToolkitConfigurationProfile profile2 = LoadTestProfile(BoundaryOnlyProfilePath); // Switch to profile 2 ChangeProfile(profile2); yield return(null); // The custom boundary profile has been configured to match the default with the following fields being different // * Boundary height // * Floor plane physics layer // * Show tracked area // * Show boundary ceiling IMixedRealityBoundarySystem boundarySystem2 = CoreServices.BoundarySystem; yield return(null); // Check service settings to ensure it has properly reset Assert.IsTrue(height1 != boundarySystem2.BoundaryHeight); Assert.IsTrue(floorPhysics1 != boundarySystem2.FloorPhysicsLayer); Assert.IsTrue(showTracked1 != boundarySystem2.ShowTrackedArea); Assert.IsTrue(showCeiling1 != boundarySystem2.ShowBoundaryCeiling); }
private static void ResetCacheReferenceFromType(Type serviceType) { if (typeof(IMixedRealityBoundarySystem).IsAssignableFrom(serviceType)) { boundarySystem = null; } else if (typeof(IMixedRealityCameraSystem).IsAssignableFrom(serviceType)) { cameraSystem = null; } else if (typeof(IMixedRealityDiagnosticsSystem).IsAssignableFrom(serviceType)) { diagnosticsSystem = null; } else if (typeof(IMixedRealityFocusProvider).IsAssignableFrom(serviceType)) { focusProvider = null; } else if (typeof(IMixedRealityInputSystem).IsAssignableFrom(serviceType)) { inputSystem = null; } else if (typeof(IMixedRealityRaycastProvider).IsAssignableFrom(serviceType)) { raycastProvider = null; } else if (typeof(IMixedRealitySceneSystem).IsAssignableFrom(serviceType)) { sceneSystem = null; } else if (typeof(IMixedRealitySpatialAwarenessSystem).IsAssignableFrom(serviceType)) { sceneSystem = null; } else if (typeof(IMixedRealityTeleportSystem).IsAssignableFrom(serviceType)) { teleportSystem = null; } }
/// <inheritdoc /> public WindowsMixedRealityBoundaryDataProvider(string name, uint priority, BaseMixedRealityProfile profile, IMixedRealityBoundarySystem parentService) : base(name, priority, profile, parentService) { boundarySystem = parentService; }