NRSDKApiForUnity
Classes
XRXREALXREALPhotoCapture

Classes

struct  PhotoCaptureResult
 

Public Types

enum  CaptureResultType { Success = 0 , UnknownError = 1 , TimeOutError = 2 }
 

Public Member Functions

void Dispose ()
 
IntPtr GetUnsafePointerToVideoDeviceController ()
 
void StartPhotoModeAsync (CameraParameters setupParams, OnPhotoModeStartedCallback onPhotoModeStartedCallback, bool autoAdaptBlendMode=false)
 
void StopPhotoModeAsync (OnPhotoModeStoppedCallback onPhotoModeStoppedCallback)
 
void TakePhotoAsync (string filename, PhotoCaptureFileOutputFormat fileOutputFormat, OnCapturedToDiskCallback onCapturedPhotoToDiskCallback)
 
void TakePhotoAsync (OnCapturedToMemoryCallback onCapturedPhotoToMemoryCallback)
 
delegate void OnCaptureResourceCreatedCallback (XREALPhotoCapture captureObject)
 
delegate void OnPhotoModeStartedCallback (PhotoCaptureResult result)
 
delegate void OnPhotoModeStoppedCallback (PhotoCaptureResult result)
 
delegate void OnCapturedToDiskCallback (PhotoCaptureResult result)
 
delegate void OnCapturedToMemoryCallback (PhotoCaptureResult result, PhotoCaptureFrame photoCaptureFrame)
 

Static Public Member Functions

static void CreateAsync (bool showHolograms, OnCaptureResourceCreatedCallback onCreatedCallback)
 

Properties

static IEnumerable< Resolution > SupportedResolutions [get]
 
Texture PreviewTexture [get]
 

Detailed Description

A nr photo capture.

Member Enumeration Documentation

◆ CaptureResultType

Contains the result of the capture request.

Enumerator
Success 

Specifies that the desired operation was successful.

UnknownError 

Specifies that an unknown error occurred.

TimeOutError 

Get rgb camera data timeout.

Member Function Documentation

◆ CreateAsync()

static void Unity.XR.XREAL.XREALPhotoCapture.CreateAsync ( bool showHolograms,
OnCaptureResourceCreatedCallback onCreatedCallback )
static

Creates an asynchronous.

Parameters
showHologramsTrue to show, false to hide the holograms.
onCreatedCallbackThe on created callback.

◆ GetUnsafePointerToVideoDeviceController()

IntPtr Unity.XR.XREAL.XREALPhotoCapture.GetUnsafePointerToVideoDeviceController ( )

Provides a COM pointer to the native IVideoDeviceController. A native COM pointer to the IVideoDeviceController.

Returns
The unsafe pointer to video device controller.

◆ OnCapturedToDiskCallback()

delegate void Unity.XR.XREAL.XREALPhotoCapture.OnCapturedToDiskCallback ( PhotoCaptureResult result)

Called when a photo has been saved to the file system.

Parameters
resultIndicates whether or not the photo was successfully saved to the file system.

◆ OnCapturedToMemoryCallback()

delegate void Unity.XR.XREAL.XREALPhotoCapture.OnCapturedToMemoryCallback ( PhotoCaptureResult result,
PhotoCaptureFrame photoCaptureFrame )

Called when a photo has been captured to memory.

Parameters
resultIndicates whether or not the photo was successfully captured to memory.
photoCaptureFrameContains the target texture.If available, the spatial information will be accessible through this structure as well.

◆ OnCaptureResourceCreatedCallback()

delegate void Unity.XR.XREAL.XREALPhotoCapture.OnCaptureResourceCreatedCallback ( XREALPhotoCapture captureObject)

Called when a PhotoCapture resource has been created.

Parameters
captureObjectThe PhotoCapture instance.

◆ OnPhotoModeStartedCallback()

delegate void Unity.XR.XREAL.XREALPhotoCapture.OnPhotoModeStartedCallback ( PhotoCaptureResult result)

Called when photo mode has been started.

Parameters
resultIndicates whether or not photo mode was successfully activated.

◆ OnPhotoModeStoppedCallback()

delegate void Unity.XR.XREAL.XREALPhotoCapture.OnPhotoModeStoppedCallback ( PhotoCaptureResult result)

Called when photo mode has been stopped.

Parameters
resultIndicates whether or not photo mode was successfully deactivated.

◆ StartPhotoModeAsync()

void Unity.XR.XREAL.XREALPhotoCapture.StartPhotoModeAsync ( CameraParameters setupParams,
OnPhotoModeStartedCallback onPhotoModeStartedCallback,
bool autoAdaptBlendMode = false )

Starts photo mode asynchronous.

Parameters
setupParamsOptions for controlling the setup.
onPhotoModeStartedCallbackThe on photo mode started callback.
autoAdaptBlendModeAuto adaption for BlendMode based on supported feature on current device.

◆ StopPhotoModeAsync()

void Unity.XR.XREAL.XREALPhotoCapture.StopPhotoModeAsync ( OnPhotoModeStoppedCallback onPhotoModeStoppedCallback)

Stops photo mode asynchronous.

Parameters
onPhotoModeStoppedCallbackThe on photo mode stopped callback.

◆ TakePhotoAsync() [1/2]

void Unity.XR.XREAL.XREALPhotoCapture.TakePhotoAsync ( OnCapturedToMemoryCallback onCapturedPhotoToMemoryCallback)

Take photo asynchronous.

Parameters
onCapturedPhotoToMemoryCallbackThe on captured photo memory callback.

◆ TakePhotoAsync() [2/2]

void Unity.XR.XREAL.XREALPhotoCapture.TakePhotoAsync ( string filename,
PhotoCaptureFileOutputFormat fileOutputFormat,
OnCapturedToDiskCallback onCapturedPhotoToDiskCallback )

Take photo asynchronous.

Parameters
filenameFilename of the file.
fileOutputFormatThe file output format.
onCapturedPhotoToDiskCallbackThe on captured photo disk callback.

Property Documentation

◆ PreviewTexture

Texture Unity.XR.XREAL.XREALPhotoCapture.PreviewTexture
get

Gets the preview texture.

The preview texture.

◆ SupportedResolutions

IEnumerable<Resolution> Unity.XR.XREAL.XREALPhotoCapture.SupportedResolutions
staticget

A list of all the supported device resolutions for taking pictures.

The supported resolutions.