XRCameraConfigurationExtensions

Extensions to AR Subsystem's XRCameraConfiguration struct.

Summary

Public static functions

GetDepthSensorUsage(this XRCameraConfiguration cameraConfig)
Gets the hardware depth sensor, such as a time-of-flight sensor (or ToF sensor), usage for this camera config.
GetFPSRange(this XRCameraConfiguration cameraConfig)
Gets the target camera capture frame rate range for this camera config.
GetFacingDirection(this XRCameraConfiguration cameraConfig)
Gets the camera facing direction for this camera config.
GetStereoCameraUsage(this XRCameraConfiguration cameraConfig)
Gets the stereo camera usage for this camera config.
GetTextureDimensions(this XRCameraConfiguration cameraConfig)
Gets the dimensions of the GPU-accessible external texture for this camera config.

Public static functions

GetDepthSensorUsage

CameraConfigDepthSensorUsage GetDepthSensorUsage(
  this XRCameraConfiguration cameraConfig
)

Gets the hardware depth sensor, such as a time-of-flight sensor (or ToF sensor), usage for this camera config.

Details
Parameters
cameraConfig
An XRCameraConfiguration instance.
Returns
Returns the hardware depth sensor, such as a time-of-flight sensor (or ToF sensor), usage type.

GetFPSRange

Vector2Int GetFPSRange(
  this XRCameraConfiguration cameraConfig
)

Gets the target camera capture frame rate range for this camera config.

Details
Parameters
cameraConfig
An XRCameraConfiguration instance.
Returns
Returns the range from minimal target FPS to maximal target FPS.

GetFacingDirection

CameraConfigFacingDirection GetFacingDirection(
  this XRCameraConfiguration cameraConfig
)

Gets the camera facing direction for this camera config.

Details
Parameters
cameraConfig
An XRCameraConfiguration instance.
Returns
Returns the camera facing direction.

GetStereoCameraUsage

CameraConfigStereoCameraUsage GetStereoCameraUsage(
  this XRCameraConfiguration cameraConfig
)

Gets the stereo camera usage for this camera config.

Details
Parameters
cameraConfig
An XRCameraConfiguration instance.
Returns
Returns the stereo camera usage type.

GetTextureDimensions

Vector2Int GetTextureDimensions(
  this XRCameraConfiguration cameraConfig
)

Gets the dimensions of the GPU-accessible external texture for this camera config.

Details
Parameters
cameraConfig
An XRCameraConfiguration instance.
Returns
Returns the GPU texture dimensions.