예제 #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="priority"></param>
 /// <param name="profile"></param>
 protected BaseMixedRealitySurfaceObserver(string name, uint priority, BaseMixedRealitySurfaceObserverProfile profile)
     : base(name, priority, profile)
 {
     SurfacePhysicsLayerOverride = profile.SurfacePhysicsLayerOverride;
     SurfaceFindingMinimumArea   = profile.SurfaceFindingMinimumArea;
     DisplayFloorSurfaces        = profile.DisplayFloorSurfaces;
     FloorSurfaceMaterial        = profile.FloorSurfaceMaterial;
     DisplayCeilingSurfaces      = profile.DisplayCeilingSurface;
     CeilingSurfaceMaterial      = profile.CeilingSurfaceMaterial;
     DisplayWallSurfaces         = profile.DisplayWallSurface;
     WallSurfaceMaterial         = profile.WallSurfaceMaterial;
     DisplayPlatformSurfaces     = profile.DisplayPlatformSurfaces;
     PlatformSurfaceMaterial     = profile.PlatformSurfaceMaterial;
 }
예제 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="priority"></param>
        /// <param name="profile"></param>
        protected BaseMixedRealitySurfaceObserver(string name, uint priority, BaseMixedRealitySurfaceObserverProfile profile) : base(name, priority, profile)
        {
            if (profile == null)
            {
                throw new Exception($"Missing profile for {name}");
            }

            SurfacePhysicsLayerOverride = profile.SurfacePhysicsLayerOverride;
            SurfaceFindingMinimumArea   = profile.SurfaceFindingMinimumArea;
            DisplayFloorSurfaces        = profile.DisplayFloorSurfaces;
            FloorSurfaceMaterial        = profile.FloorSurfaceMaterial;
            DisplayCeilingSurfaces      = profile.DisplayCeilingSurface;
            CeilingSurfaceMaterial      = profile.CeilingSurfaceMaterial;
            DisplayWallSurfaces         = profile.DisplayWallSurface;
            WallSurfaceMaterial         = profile.WallSurfaceMaterial;
            DisplayPlatformSurfaces     = profile.DisplayPlatformSurfaces;
            PlatformSurfaceMaterial     = profile.PlatformSurfaceMaterial;
        }
        /// <inheritdoc />
        protected BaseMixedRealitySpatialSurfaceObserver(string name, uint priority, BaseMixedRealitySurfaceObserverProfile profile, IMixedRealitySpatialAwarenessSystem parentService)
            : base(name, priority, profile, parentService)
        {
            if (profile.IsNull())
            {
                profile = MixedRealityToolkit.Instance.ActiveProfile.SpatialAwarenessProfile.GlobalSurfaceObserverProfile;
            }

            if (profile.IsNull())
            {
                throw new ArgumentNullException($"Missing a {profile.GetType().Name} profile for {name}");
            }

            SurfaceFindingMinimumArea = profile.SurfaceFindingMinimumArea;
            DisplayFloorSurfaces      = profile.DisplayFloorSurfaces;
            FloorSurfaceMaterial      = profile.FloorSurfaceMaterial;
            DisplayCeilingSurfaces    = profile.DisplayCeilingSurface;
            CeilingSurfaceMaterial    = profile.CeilingSurfaceMaterial;
            DisplayWallSurfaces       = profile.DisplayWallSurface;
            WallSurfaceMaterial       = profile.WallSurfaceMaterial;
            DisplayPlatformSurfaces   = profile.DisplayPlatformSurfaces;
            PlatformSurfaceMaterial   = profile.PlatformSurfaceMaterial;
        }