SpatialSurfaceInfo
SpatialSurfaceInfo
SpatialSurfaceInfo
SpatialSurfaceInfo
SpatialSurfaceInfo
Class
Definition
Represents a snapshot of metadata for a surface observed in the user's surroundings.
public : sealed class SpatialSurfaceInfo
struct winrt::Windows::Perception::Spatial::Surfaces::SpatialSurfaceInfo
public sealed class SpatialSurfaceInfo
Public NotInheritable Class SpatialSurfaceInfo
// This class does not provide a public constructor.
- Attributes
Windows 10 requirements
Device family |
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Remarks
Mesh objects contain large vertex and index buffers, and so they're heavy to hold onto if you don't have good reason. For efficient use in rendering or physics, an app is expected to cache the mesh and buffer objects it's interested in, and to throw out mesh for areas where the user is no longer operating.
You can use the set of SpatialSurfaceInfo instances given to you by SpatialSurfaceObserver, representing what mesh is present in the targeted bounding volume, in order to manage your cache.
Correlating the Id and UpdateTime properties across multiple observations lets you identify new mesh, updated mesh and removed mesh:
- If you see a SpatialSurfaceInfo with an Id you haven't seen before, treat it as new mesh.
- If you see a SpatialSurfaceInfo with a known Id, but with a new UpdateTime, treat it as updated mesh.
- If you no longer see a SpatialSurfaceInfo with a known Id, treat it as removed mesh.
Because this is a snapshot, the UpdateTime property will not change over time. To see if this surface's mesh has updated, or whether a surface has been removed or moved out of the bounding volume, return to the SpatialSurfaceObserver and either call GetObservedSurfaces each frame or handle the ObservedSurfacesChanged event.
Properties
Id Id Id Id Id |
Gets the persistent identifier for this surface. |
UpdateTime UpdateTime UpdateTime UpdateTime UpdateTime |
Gets the last update time represented by this surface metadata snapshot. |
Methods
See also
Feedback
Loading feedback...