NRSDKApiForUnity
Classes
XRXREALXREALCaptureBehaviour
Unity.XR.XREAL.XREALCaptureBehaviour
Inheritance diagram for Unity.XR.XREAL.XREALCaptureBehaviour:
Unity.XR.XREAL.CaptureBehaviourBase

Public Member Functions

bool Do (int width, int height, PhotoCaptureFileOutputFormat format, string outpath)
 
bool Do (int width, int height, PhotoCaptureFileOutputFormat format, ref byte[] data)
 
void DoAsyn (XREALPhotoCapture.OnCapturedToMemoryCallback oncapturedcallback)
 
void Do (string filename, PhotoCaptureFileOutputFormat fileOutputFormat)
 
- Public Member Functions inherited from Unity.XR.XREAL.CaptureBehaviourBase
FrameCaptureContext GetContext ()
 
virtual void Init (FrameCaptureContext context)
 
virtual void OnFrame (UniversalTextureFrame frame)
 

Additional Inherited Members

- Public Attributes inherited from Unity.XR.XREAL.CaptureBehaviourBase
Camera CaptureCamera
 
- Protected Member Functions inherited from Unity.XR.XREAL.CaptureBehaviourBase
virtual void Update ()
 

Detailed Description

Capture a image from the MR world. You can capture a RGB only,Virtual only or Blended image through this class.

Member Function Documentation

◆ Do() [1/3]

bool Unity.XR.XREAL.XREALCaptureBehaviour.Do ( int width,
int height,
PhotoCaptureFileOutputFormat format,
ref byte[] data )

Does the given file.

Parameters
widthThe width.
heightThe height.
formatDescribes the format to use.
data[in,out] The data.
Returns
True if it succeeds, false if it fails.

◆ Do() [2/3]

bool Unity.XR.XREAL.XREALCaptureBehaviour.Do ( int width,
int height,
PhotoCaptureFileOutputFormat format,
string outpath )

Does the given file.

Parameters
widthThe width.
heightThe height.
formatDescribes the format to use.
outpathThe outpath.
Returns
True if it succeeds, false if it fails.

◆ Do() [3/3]

void Unity.XR.XREAL.XREALCaptureBehaviour.Do ( string filename,
PhotoCaptureFileOutputFormat fileOutputFormat )

Does the given file.

Parameters
filenameFilename of the file.
fileOutputFormatThe file output format.

◆ DoAsyn()

void Unity.XR.XREAL.XREALCaptureBehaviour.DoAsyn ( XREALPhotoCapture.OnCapturedToMemoryCallback oncapturedcallback)

Capture a image Asyn. if system supports AsyncGPUReadback, using AsyncGPUReadback to get the captured image, else getting the image by synchronization way.

Parameters
oncapturedcallbackThe oncapturedcallback.