# XRCameraFrameExtensions

Extensions to AR Subsystem's XRCameraFrame struct.

## Summary

| ### Public static functions ||
|---|---|
| `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/XRCameraFrameExtensions#getimagedisplaymatrix(this https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.XRCameraFrame.html frame)` | `https://docs.unity3d.com/ScriptReference/Matrix4x4.html` Get the 4x4 image display matrix for the camera frame. |
| `https://developers.google.com/ar/reference/unity-arf/class/Google/XR/ARCoreExtensions/XRCameraFrameExtensions#trygetframetimestamp(this https://docs.unity3d.com/Packages/com.unity.xr.arsubsystems@4.2/api/UnityEngine.XR.ARSubsystems.XRCameraFrame.html frame, out long frameTimestamp)` | `bool` Get the timestamp of the camera frame. |

## Public static functions

### GetImageDisplayMatrix

```c#
Matrix4x4 GetImageDisplayMatrix(
  this XRCameraFrame frame
)
```
Get the 4x4 image display matrix for the camera frame.

This is used by the texture populated based on CPU images to calculate the display coordinates.


Details Parameters `frame` The XRCameraFrame instance. **Returns** The 4x4 image display matrix.

### TryGetFrameTimestamp

```c#
bool TryGetFrameTimestamp(
  this XRCameraFrame frame,
  out long frameTimestamp
)
```
Get the timestamp of the camera frame.


Details Parameters `frame` The XRCameraFrame instance. `frameTimestamp` The timestamp of the camera frame. **Returns** True if the timestamp is available, false otherwise.