HolographicSpace HolographicSpace HolographicSpace Class

Definition

Represents a holographic scene, with one or more holographic cameras rendering its content.

public sealed class HolographicSpace : IHolographicSpacepublic sealed class HolographicSpace : IHolographicSpacePublic NotInheritable Class HolographicSpace Implements IHolographicSpace
Attributes
Windows 10 requirements
Device family
Windows Holographic Extension SDK Preview (introduced v10.0.10240.0) Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Preview.Holographic.HolographicContract (introduced v1) Windows.Foundation.UniversalApiContract (introduced v2)

Properties

IsAvailable IsAvailable IsAvailable

Gets whether a Mixed Reality headset is ready for holographic rendering.

public static bool IsAvailable { get; }public static bool IsAvailable { get; }Public Static ReadOnly Property IsAvailable As bool
Value
bool bool bool

Whether a headset is ready.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

On Desktop PCs, this tells an app whether a Mixed Reality headset is attached to the PC, has been set up by the user, and is ready for holographic rendering. When the headset is detached, this will become false.

On HoloLens, this is always true.

IsSupported IsSupported IsSupported

Gets whether the current system supports Mixed Reality headsets.

public static bool IsSupported { get; }public static bool IsSupported { get; }Public Static ReadOnly Property IsSupported As bool
Value
bool bool bool

Whether headsets are supported.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

On Desktop PCs running 64-bit Windows, this is always true. If IsAvailable is false because the user has not yet set up their holographic headset, calling CreateForCoreWindow anyway will guide them through the setup flow.

On HoloLens, this is always true.

On any other system, including Desktop PCs running 32-bit Windows, this is false, as Mixed Reality headsets are not supported on those systems.

PrimaryAdapterId PrimaryAdapterId PrimaryAdapterId

Gets the identifier of the graphics adapter to be used when displaying holographic content to the default HolographicDisplay.

public HolographicAdapterId PrimaryAdapterId { get; }public HolographicAdapterId PrimaryAdapterId { get; }Public ReadOnly Property PrimaryAdapterId As HolographicAdapterId
Attributes
Additional features and 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)

Methods

CreateForCoreWindow(CoreWindow) CreateForCoreWindow(CoreWindow) CreateForCoreWindow(CoreWindow)

Creates a HolographicSpace that corresponds with the specified window's CoreApplicationView.

public static HolographicSpace CreateForCoreWindow(CoreWindow window)public static HolographicSpace CreateForCoreWindow(CoreWindow window)Public Static Function CreateForCoreWindow(window As CoreWindow) As HolographicSpace
Parameters
window
CoreWindow CoreWindow CoreWindow

The window to create a HolographicSpace for.

Returns
Attributes
Additional features and 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

Calling this method permanently assigns the CoreApplicationView to be holographic. You may no longer call IDXGIFactory2::CreateSwapChainForCoreWindow after calling this method, or vice versa.

CreateNextFrame() CreateNextFrame() CreateNextFrame()

Creates a HolographicFrame for the next frame to display.

public HolographicFrame CreateNextFrame()public HolographicFrame CreateNextFrame()Public Function CreateNextFrame() As HolographicFrame
Returns
Attributes

Remarks

Apps use the HolographicFrame returned here to find out the predicted positions of each HolographicCamera at the time of frame display, render their views based on that prediction, and then call the PresentUsingCurrentPrediction method to send them to the displays.

The system tracks end-to-end latency from the CreateNextFrame call until the frame is presented. This determines the number of frames the system will look forward for the next frame's prediction.

SetDirect3D11Device(IDirect3DDevice) SetDirect3D11Device(IDirect3DDevice) SetDirect3D11Device(IDirect3DDevice)

Assigns the IDirect3DDevice that will display holographic content. An error will occur if the app creates an inappropriate device.

public void SetDirect3D11Device(IDirect3DDevice value)public void SetDirect3D11Device(IDirect3DDevice value)Public Function SetDirect3D11Device(value As IDirect3DDevice) As void
Parameters
value
IDirect3DDevice IDirect3DDevice IDirect3DDevice

The Direct3D device.

Attributes
Additional features and 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)

Events

CameraAdded CameraAdded CameraAdded

Occurs when a HolographicCamera is added to the current HolographicSpace.

public event TypedEventHandler CameraAddedpublic event TypedEventHandler CameraAddedPublic Event CameraAdded
Attributes
Additional features and 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

Apps can use this event to set up any per-camera resources they may need.

Unless the deferral is taken, once all event handlers are complete, the system will include this camera in the list of cameras that the app must render to each frame.

CameraRemoved CameraRemoved CameraRemoved

Occurs when a HolographicCamera is removed from the current HolographicSpace.

public event TypedEventHandler CameraRemovedpublic event TypedEventHandler CameraRemovedPublic Event CameraRemoved
Attributes
Additional features and 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

Apps can use this event to tear down any per-camera resources they may have set up during CameraAdded.

The system will no longer require that the app render to this camera, starting in the next frame after this event.

IsAvailableChanged IsAvailableChanged IsAvailableChanged

Occurs when a configured and ready Mixed Reality headset is attached or detached from the system.

public static event EventHandler IsAvailableChangedpublic static event EventHandler IsAvailableChangedPublic Static Event IsAvailableChanged
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

On Desktop PCs, this tells an app when a Mixed Reality headset that is configured and ready is either attached to the PC or detached from the PC. Inspect the IsAvailable property to determine the current state of the system.

On HoloLens, this event will never occur, as holographic rendering is always available.