Surface Observer Class
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides methods for observing surfaces in the user's surroundings.
public ref class SpatialSurfaceObserver sealed
/// [Windows.Foundation.Metadata.Activatable(131072, "Windows.Foundation.UniversalApiContract")] /// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)] /// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] /// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] class SpatialSurfaceObserver final
[Windows.Foundation.Metadata.Activatable(131072, "Windows.Foundation.UniversalApiContract")] [Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)] [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] public sealed class SpatialSurfaceObserver
Public NotInheritable Class SpatialSurfaceObserver
Object Platform::Object IInspectable SpatialSurfaceObserver
Windows 10 (introduced in 10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
Windows.Foundation.UniversalApiContract (introduced in v2.0)
Spatial mapping lets your app understand the shape and location of the surfaces in the user's surroundings.
Through the sensors on a device like HoloLens, Windows generates 3D triangle meshes of surfaces in large cube-shaped volumes. Over time, as Windows improves its understanding of your surroundings, new surface volumes are generated and existing volumes are updated with new mesh. Sometimes, surface volumes can be destroyed as well, when the system is running low on storage.
You access these surfaces by expressing interest in a volume of space, either a bounding box, bounding frustum, or bounding sphere. Windows updates you to let you know when the set of surfaces in that observed volume has changed, with each surface volume identified by an id and the time of its last update. By reasoning about changes to this set of observed surface metadata, you can detect new mesh, updated mesh, and removed mesh over time.
|Windows version||SDK version||Value added|
Initializes a new instance of the SpatialSurfaceObserver class.
Gets metadata for the set of surfaces observed within the bounding volume at the moment.
Gets whether spatial mapping is supported on the current system.
Requests access for an app to use spatial mapping. This requires the spatialPerception capability.
Sets the single bounding volume that this observer will track for new, updated or removed surfaces.
Sets the list of bounding volumes that this observer will track for new, updated or removed surfaces.
Occurs when the set of surface metadata observed within the bounding volume has changed.