HolographicCamera HolographicCamera HolographicCamera HolographicCamera 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.]
Provides rendering state for a display to which a holographic view must render each frame from that frame's pose.

public : sealed class HolographicCamera : IHolographicCamera, IHolographicCamera2public sealed class HolographicCamera : IHolographicCamera, IHolographicCamera2Public NotInheritable Class HolographicCamera Implements IHolographicCamera, IHolographicCamera2// You can use this class in JavaScript.
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

An app must render to each HolographicCamera before presenting each HolographicFrame.

Properties

Display Display Display Display

Gets metadata about the display represented by this HolographicCamera.

public : HolographicDisplay Display { get; }public HolographicDisplay Display { get; }Public ReadOnly Property Display As HolographicDisplay// You can use this property in JavaScript.
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Id Id Id Id

Gets the unique identifier for the HolographicCamera.

public : unsigned int Id { get; }public uint Id { get; }Public ReadOnly Property Id As uint// You can use this property in JavaScript.
Value
unsigned int uint uint uint

The unique identifier.

IsPrimaryLayerEnabled IsPrimaryLayerEnabled IsPrimaryLayerEnabled IsPrimaryLayerEnabled

Prerelease. Gets or sets whether this camera should display the primary back buffer filled by the app.

public : PlatForm::Boolean IsPrimaryLayerEnabled { get; set; }public bool IsPrimaryLayerEnabled { get; set; }Public ReadWrite Property IsPrimaryLayerEnabled As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True, if the primary layer should be displayed; otherwise, false.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

The primary layer displays the pixels that an app renders into the back buffer returned by HolographicCameraRenderingParameters. The primary layer appears behind any quad layers. If an app only intends to render quad layers, for example during a loading screen, it may disable the primary layer. When the primary layer is disabled, any pixels not covered by quad layers will remain black.

IsStereo IsStereo IsStereo IsStereo

Gets whether the current display is stereo rather than mono.

public : PlatForm::Boolean IsStereo { get; }public bool IsStereo { get; }Public ReadOnly Property IsStereo As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True, if the current display is stereo; otherwise, false.

LeftViewportParameters LeftViewportParameters LeftViewportParameters LeftViewportParameters

Gets rendering parameters related to display's left-eye viewport.

public : HolographicCameraViewportParameters LeftViewportParameters { get; }public HolographicCameraViewportParameters LeftViewportParameters { get; }Public ReadOnly Property LeftViewportParameters As HolographicCameraViewportParameters// You can use this property in JavaScript.
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

MaxQuadLayerCount MaxQuadLayerCount MaxQuadLayerCount MaxQuadLayerCount

Prerelease. Gets the maximum number of quad layers supported by the current system.

public : unsigned int MaxQuadLayerCount { get; }public uint MaxQuadLayerCount { get; }Public ReadOnly Property MaxQuadLayerCount As uint// You can use this property in JavaScript.
Value
unsigned int uint uint uint

The max quad layer count.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

MaxQuadLayerCount will be 0 on HoloLens, which does not support quad layers.

QuadLayers QuadLayers QuadLayers QuadLayers

Prerelease. Gets the mutable list of quad layers to display on top of this camera's primary back buffer.

public : IVector<HolographicQuadLayer> QuadLayers { get; }public IList<HolographicQuadLayer> QuadLayers { get; }Public ReadOnly Property QuadLayers As IList<HolographicQuadLayer>// You can use this property in JavaScript.
Value
IVector<HolographicQuadLayer> IList<HolographicQuadLayer> IList<HolographicQuadLayer> IList<HolographicQuadLayer>

The quad layer list.

Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16257.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Quad layers are rendered in the specified order using the painter’s algorithm, entirely on top of the primary layer. No depth-testing is done while rendering. An app that moves one quad in front of another may reorder the quads in this list without having to refill the texture buffers. An app that only wishes to render quad layers, for example during loading scenes, can disable the primary layer entirely by setting IsPrimaryLayerEnabled to false.

If an app no longer needs a quad layer, it may disable that layer by removing it from the camera, which allows the system to reclaim the content buffers allocated for it. If the app knows it is permanently done with a layer, it may close it entirely.

RenderTargetSize RenderTargetSize RenderTargetSize RenderTargetSize

Gets the dimensions of the render target.

public : Size RenderTargetSize { get; }public Size RenderTargetSize { get; }Public ReadOnly Property RenderTargetSize As Size// You can use this property in JavaScript.
Value
Size Size Size Size

The size

RightViewportParameters RightViewportParameters RightViewportParameters RightViewportParameters

Gets rendering parameters related to display's right-eye viewport.

public : HolographicCameraViewportParameters RightViewportParameters { get; }public HolographicCameraViewportParameters RightViewportParameters { get; }Public ReadOnly Property RightViewportParameters As HolographicCameraViewportParameters// You can use this property in JavaScript.
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

ViewportScaleFactor ViewportScaleFactor ViewportScaleFactor ViewportScaleFactor

Gets or sets the scale factor to apply to the default viewport size.

public : double ViewportScaleFactor { get; set; }public double ViewportScaleFactor { get; set; }Public ReadWrite Property ViewportScaleFactor As double// You can use this property in JavaScript.
Value
double double double double

The viewport scale factor.

Remarks

Each frame, the system decides the size of the viewport within the render target that the app must render that frame. Sometimes the system may lower this to free up system resources, for example when video capture is occurring. Regardless of the viewport size, the rendered image is always scaled up to the full size of the displays. An app looking to lower its rendering cost for other reasons can request a smaller viewport.

You can specify a scale factor between 0.0 and 1.0, which is multiplied by the default viewport size. In future frames, the system will specify that you render to the nearest valid viewport size to this requested size.

Methods

SetFarPlaneDistance(Double) SetFarPlaneDistance(Double) SetFarPlaneDistance(Double) SetFarPlaneDistance(Double)

Sets the distance, along the z-axis, from the origin of view space to the far plane of the view frustum.

public : void SetFarPlaneDistance(double value)public void SetFarPlaneDistance(Double value)Public Function SetFarPlaneDistance(value As Double) As void// You can use this method in JavaScript.
Parameters
value
double Double Double Double

The far plane distance, in meters. By default, this is set to 20 meters.

SetNearPlaneDistance(Double) SetNearPlaneDistance(Double) SetNearPlaneDistance(Double) SetNearPlaneDistance(Double)

Sets the distance, along the z-axis, from the origin of view space to the near plane of the view frustum.

public : void SetNearPlaneDistance(double value)public void SetNearPlaneDistance(Double value)Public Function SetNearPlaneDistance(value As Double) As void// You can use this method in JavaScript.
Parameters
value
double Double Double Double

The near plane distance, in meters. By default, this is set to 0.1 meters.