HolographicSpace
HolographicSpace
HolographicSpace
HolographicSpace
Class
Definition
Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prerelease APIs are identified by a Prerelease label.
[Contains prerelease APIs.]
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// You can use this class in JavaScript.
- Attributes
| 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 IsAvailable
Gets whether a Mixed Reality headset is ready for holographic rendering.
public : static PlatForm::Boolean IsAvailable { get; }public static bool IsAvailable { get; }Public Static ReadOnly Property IsAvailable As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
Whether a headset is ready.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
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.
IsConfigured IsConfigured IsConfigured IsConfigured
Prerelease. Gets whether the current system has been configured by the user for Mixed Reality headsets.
public : static PlatForm::Boolean IsConfigured { get; }public static bool IsConfigured { get; }Public Static ReadOnly Property IsConfigured As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
Whether headsets are configured by the user.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Remarks
On Desktop PCs running 64-bit Windows, this is initially false. Once the user has set up Mixed Reality through the Mixed Reality Portal, this becomes true. If this is false, but IsSupported is true, calling CreateForCoreWindow anyway will guide the user 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.
IsSupported IsSupported IsSupported IsSupported
Gets whether the current system supports Mixed Reality headsets.
public : static PlatForm::Boolean IsSupported { get; }public static bool IsSupported { get; }Public Static ReadOnly Property IsSupported As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
Whether headsets are supported.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
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 Mixed Reality 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 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// You can use this property in JavaScript.
The identifier.
| 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) 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// You can use this method in JavaScript.
- window
- CoreWindow CoreWindow CoreWindow CoreWindow
The window to create a HolographicSpace for.
The HolographicSpace.
| 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() CreateNextFrame()
Creates a HolographicFrame for the next frame to display.
public : HolographicFrame CreateNextFrame()public HolographicFrame CreateNextFrame()Public Function CreateNextFrame() As HolographicFrame// You can use this method in JavaScript.
The next frame.
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.
This method will make use of the Direct3D device you provided to the HolographicSpace. If you've specified the D3D11_CREATE_DEVICE_SINGLETHREADED flag on your device, be sure to call this method from your single Direct3D thread to avoid undefined behavior.
SetDirect3D11Device(IDirect3DDevice) 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// You can use this method in JavaScript.
The Direct3D device.
| 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
This method will make use of the Direct3D device you provide to set up holographic rendering. If you've specified the D3D11_CREATE_DEVICE_SINGLETHREADED flag on your device, be sure to call this method from your single Direct3D thread to avoid undefined behavior.
Events
CameraAdded CameraAdded CameraAdded CameraAdded
Occurs when a HolographicCamera is added to the current HolographicSpace.
public : event TypedEventHandler CameraAdded<HolographicSpace, HolographicSpaceCameraAddedEventArgs>public event TypedEventHandler CameraAdded<HolographicSpace, HolographicSpaceCameraAddedEventArgs>Public Event CameraAdded<HolographicSpace, HolographicSpaceCameraAddedEventArgs>// You can use this event in JavaScript.
| 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.
If you take a deferral and you've specified the D3D11_CREATE_DEVICE_SINGLETHREADED flag on your device, be sure to explicitly continue any work you spin off on your single Direct3D thread to avoid undefined behavior.
CameraRemoved CameraRemoved CameraRemoved CameraRemoved
Occurs when a HolographicCamera is removed from the current HolographicSpace.
public : event TypedEventHandler CameraRemoved<HolographicSpace, HolographicSpaceCameraRemovedEventArgs>public event TypedEventHandler CameraRemoved<HolographicSpace, HolographicSpaceCameraRemovedEventArgs>Public Event CameraRemoved<HolographicSpace, HolographicSpaceCameraRemovedEventArgs>// You can use this event in JavaScript.
| 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.
If you take a deferral and you've specified the D3D11_CREATE_DEVICE_SINGLETHREADED flag on your device, be sure to explicitly continue any work you spin off on your single Direct3D thread to avoid undefined behavior.
IsAvailableChanged IsAvailableChanged IsAvailableChanged IsAvailableChanged
Occurs when a configured and ready Mixed Reality headset is attached or detached from the system.
public : static event EventHandler IsAvailableChanged<object>public static event EventHandler IsAvailableChanged<object>Public Static Event IsAvailableChanged<object>// You can use this event in JavaScript.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
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.