// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Microsoft.MixedReality.Toolkit.Utilities; using System; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.SpatialAwareness { /// /// Abstract class that provides base profile information for Spatial Awareness Observers and their configuration /// [Serializable] public abstract class BaseSpatialAwarenessObserverProfile : BaseMixedRealityProfile { [SerializeField] [Tooltip("How should the observer behave at startup?")] private AutoStartBehavior startupBehavior = AutoStartBehavior.AutoStart; /// /// Indicates if the observer is to start immediately or wait for manual startup. /// public AutoStartBehavior StartupBehavior => startupBehavior; [SerializeField] [Tooltip("Should the spatial observer remain in a fixed location?")] private bool isStationaryObserver = false; /// /// Indicates whether or not the spatial observer is to remain in a fixed location. /// public bool IsStationaryObserver => isStationaryObserver; [SerializeField] [Tooltip("The dimensions of the spatial observer volume, in meters.")] private Vector3 observationExtents = Vector3.one * 3; /// /// The size of the volume, in meters per axis, from which individual observations will be made. /// public Vector3 ObservationExtents => observationExtents; [SerializeField] [Tooltip("The shape of observation volume")] private VolumeType observerVolumeType = VolumeType.AxisAlignedCube; /// /// The shape (ex: axis aligned cube) of the observation volume. /// public VolumeType ObserverVolumeType => observerVolumeType; [SerializeField] [Tooltip("How often, in seconds, should the spatial observer update?")] private float updateInterval = 3.5f; /// /// The frequency, in seconds, at which the spatial observer updates. /// public float UpdateInterval => updateInterval; } }