/// <summary> /// Constructor. /// </summary> /// <param name="cameraSystem">The instance of the camera system which is managing this provider.</param> /// <param name="name">Friendly name of the provider.</param> /// <param name="priority">Provider priority. Used to determine order of instantiation.</param> /// <param name="profile">The provider's configuration profile.</param> public GenericXRSDKCameraSettings( IMixedRealityCameraSystem cameraSystem, string name = null, uint priority = DefaultPriority, BaseCameraSettingsProfile profile = null) : base(cameraSystem, name, priority, profile) { }
/// <summary> /// Constructor. /// </summary> /// <param name="cameraSystem">The instance of the camera system which is managing this provider.</param> /// <param name="name">Friendly name of the provider.</param> /// <param name="priority">Provider priority. Used to determine order of instantiation.</param> /// <param name="profile">The provider's configuration profile.</param> protected BaseWindowsMixedRealityCameraSettings( IMixedRealityCameraSystem cameraSystem, string name = null, uint priority = DefaultPriority, BaseCameraSettingsProfile profile = null) : base(cameraSystem, name, priority, profile) { }
/// <summary> /// Constructor. /// </summary> /// <param name="cameraSystem">The instance of the camera system which is managing this provider.</param> /// <param name="name">Friendly name of the provider.</param> /// <param name="priority">Provider priority. Used to determine order of instantiation.</param> /// <param name="profile">The provider's configuration profile.</param> public UnityARCameraSettings( IMixedRealityCameraSystem cameraSystem, string name = null, uint priority = DefaultPriority, BaseCameraSettingsProfile profile = null) : base(cameraSystem, name, priority, profile) { ReadProfile(); }
/// <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; }
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 ProjectNameCameraDataProvider(string name, uint priority, BaseMixedRealityCameraDataProviderProfile profile, IMixedRealityCameraSystem parentService) : base(name, priority, profile, parentService) { }
/// <inheritdoc /> public BaseCameraDataProvider(string name, uint priority, BaseMixedRealityCameraDataProviderProfile profile, IMixedRealityCameraSystem parentService) : base(name, priority, profile, parentService) { cameraSystem = MixedRealityToolkit.CameraSystem; if (profile.IsNull()) { profile = MixedRealityToolkit.Instance.ActiveProfile.CameraSystemProfile.GlobalCameraProfile; } if (profile.CameraRigType?.Type == null) { throw new Exception($"{nameof(profile.CameraRigType)} cannot be null!"); } isCameraPersistent = profile.IsCameraPersistent; cameraRigType = profile.CameraRigType.Type; DefaultHeadHeight = profile.DefaultHeadHeight; nearClipPlaneOpaqueDisplay = profile.NearClipPlaneOpaqueDisplay; cameraClearFlagsOpaqueDisplay = profile.CameraClearFlagsOpaqueDisplay; backgroundColorOpaqueDisplay = profile.BackgroundColorOpaqueDisplay; opaqueQualityLevel = profile.OpaqueQualityLevel; nearClipPlaneTransparentDisplay = profile.NearClipPlaneTransparentDisplay; cameraClearFlagsTransparentDisplay = profile.CameraClearFlagsTransparentDisplay; backgroundColorTransparentDisplay = profile.BackgroundColorTransparentDisplay; transparentQualityLevel = profile.TransparentQualityLevel; bodyAdjustmentAngle = profile.BodyAdjustmentAngle; bodyAdjustmentSpeed = profile.BodyAdjustmentSpeed; }