Unity.XR.XREAL.PhotoCaptureFramesealed
Public Member Functions | |
PhotoCaptureFrame (CapturePixelFormat format, byte[] data) | |
void | CopyRawImageDataIntoBuffer (List< byte > byteBuffer) |
void | Dispose () |
IntPtr | GetUnsafePointerToBuffer () |
bool | TryGetCameraToWorldMatrix (out Matrix4x4 cameraToWorldMatrix) |
bool | TryGetProjectionMatrix (out Matrix4x4 projectionMatrix) |
bool | TryGetProjectionMatrix (float nearClipPlane, float farClipPlane, out Matrix4x4 projectionMatrix) |
void | UploadImageDataToTexture (Texture2D targetTexture) |
Properties | |
int | dataLength [get] |
bool | hasLocationData [get] |
CapturePixelFormat | pixelFormat [get] |
byte[] | TextureData [get] |
Detailed Description
Contains information captured from the web camera.
Constructor & Destructor Documentation
◆ PhotoCaptureFrame()
Unity.XR.XREAL.PhotoCaptureFrame.PhotoCaptureFrame | ( | CapturePixelFormat | format, |
byte[] | data ) |
Constructor.
- Parameters
-
format Describes the format to use. data The data.
Member Function Documentation
◆ CopyRawImageDataIntoBuffer()
void Unity.XR.XREAL.PhotoCaptureFrame.CopyRawImageDataIntoBuffer | ( | List< byte > | byteBuffer | ) |
Copies the raw image data into buffer described by byteBuffer.
- Parameters
-
byteBuffer Buffer for byte data.
◆ GetUnsafePointerToBuffer()
IntPtr Unity.XR.XREAL.PhotoCaptureFrame.GetUnsafePointerToBuffer | ( | ) |
Provides a COM pointer to the native IMFMediaBuffer that contains the image data.
- Returns
- A native COM pointer to the IMFMediaBuffer which contains the image data.
◆ TryGetCameraToWorldMatrix()
bool Unity.XR.XREAL.PhotoCaptureFrame.TryGetCameraToWorldMatrix | ( | out Matrix4x4 | cameraToWorldMatrix | ) |
Attempts to get camera to world matrix.
- Parameters
-
cameraToWorldMatrix [out] The camera to world matrix.
- Returns
- True if it succeeds, false if it fails.
◆ TryGetProjectionMatrix() [1/2]
bool Unity.XR.XREAL.PhotoCaptureFrame.TryGetProjectionMatrix | ( | float | nearClipPlane, |
float | farClipPlane, | ||
out Matrix4x4 | projectionMatrix ) |
Attempts to get projection matrix.
- Parameters
-
nearClipPlane The near clip plane. farClipPlane The far clip plane. projectionMatrix [out] The projection matrix.
- Returns
- True if it succeeds, false if it fails.
◆ TryGetProjectionMatrix() [2/2]
bool Unity.XR.XREAL.PhotoCaptureFrame.TryGetProjectionMatrix | ( | out Matrix4x4 | projectionMatrix | ) |
Attempts to get projection matrix.
- Parameters
-
projectionMatrix [out] The projection matrix.
- Returns
- True if it succeeds, false if it fails.
◆ UploadImageDataToTexture()
void Unity.XR.XREAL.PhotoCaptureFrame.UploadImageDataToTexture | ( | Texture2D | targetTexture | ) |
This method will copy the captured image data into a user supplied texture for use in Unity.
- Parameters
-
targetTexture The target texture that the captured image data will be copied to.
Property Documentation
◆ dataLength
|
get |
The length of the raw IMFMediaBuffer which contains the image captured.
The length of the data.
◆ hasLocationData
|
get |
Specifies whether or not spatial data was captured.
True if this object has location data, false if not.
◆ pixelFormat
|
get |
The raw image data pixel format.
The pixel format.
◆ TextureData
|
get |
texture data
- Returns