Sdílet prostřednictvím


Class CameraSettings

Camera settings.

class Microsoft::Azure::RemoteRendering::CameraSettings final

Methods

SetNearAndFarPlane

Sets the near and far plane of the camera.

For best quality, keep the ratio of farPlane/nearPlane low. For Augmented Reality use cases the far plane doesn't need to be very far away, 20 to 100 meters should be sufficient. A Result.InvalidParam error occurs, if nearPlane is greater than or equal to farPlane.

auto SetNearAndFarPlane(float nearPlane, float farPlane) noexcept -> Microsoft::Azure::RemoteRendering::Status;

Parameters

Name Type Description
nearPlane float The distance to the near plane. Must be larger than zero.
farPlane float The distance to the far plane. Must be larger than zero.

Properties

EnableDepth

Enables depth composition with locally rendered content.

This is needed, if you want locally rendered content to intersect properly with remotely rendered content. On the other hand, if you render only UI elements locally that don't need to be occluded by remote content, turn this off to save performance and bandwidth.

auto GetEnableDepth() const noexcept -> bool;
auto SetEnableDepth(bool value) noexcept -> Microsoft::Azure::RemoteRendering::Status;

FarPlane

The far plane distance.

auto GetFarPlane() const noexcept -> float;

InverseDepth

Set this to true if you are using the inverse depth range of 1 (closest to the camera) to zero (farthest from the camera) instead of the standard [0;1] for your local depth buffer.

The default setting is false, i.e. a standard depth buffer floating-point range of [0;1] is assumed. Setting this is only necessary in case CameraSettings.EnableDepth is set to true, otherwise this option can be ignored.

auto GetInverseDepth() const noexcept -> bool;
auto SetInverseDepth(bool value) noexcept -> Microsoft::Azure::RemoteRendering::Status;

NearPlane

The near plane distance.

auto GetNearPlane() const noexcept -> float;

Valid

Whether this object is still valid.

An object is invalid if it has been destroyed or if the connection has been lost. It is an error to call any other function on an invalid object.

auto GetValid() const noexcept -> bool;

See also