# UAndroidXRDepthTextureBlueprintFunctionLibrary

`#include <AndroidXRDepthTextureBlueprintFunctionLibrary.h>`

<br />

## Summary

### Inheritance

Inherits from: `UBlueprintFunctionLibrary`

| ### Public attributes ||
|---|---|
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#swapchain` | `bool https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchain#struct_f_android_x_r_depth_swapchain &` |

| ### Public static functions ||
|---|---|
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#acquiredepthswapchainimages(const https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchain#struct_f_android_x_r_depth_swapchain & Swapchain, https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthAcquireResult#struct_f_android_x_r_depth_acquire_result & AcquireResult)` | `bool` Acquires a swapchain image. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#createdepthswapchain(https://developer.android.com/develop/xr/unreal/reference/other/AndroidXRTypes.h#eandroidxrdepthcameraresolution Resolution) int32 CreateFlags` | `bool` Creates a depth swapchain. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#createdepthswapchaintexture(https://developer.android.com/develop/xr/unreal/reference/other/AndroidXRTypes.h#eandroidxrdepthcameraresolution Resolution, https://developer.android.com/develop/xr/unreal/reference/other/AndroidXRTypes.h#eandroidxrdepthswapchaincreateflag ImageSource)` | `UTexture2D *` Creates a texture to contain a swapchain image. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#destroydepthswapchain(https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchain#struct_f_android_x_r_depth_swapchain & Swapchain)` | `bool` Destroys a depth swapchain. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#enumeratedepthresolutions(TArray< https://developer.android.com/develop/xr/unreal/reference/other/AndroidXRTypes.h#eandroidxrdepthcameraresolution > & SupportedResolutions)` | `bool` Enumerates the supported depth swapchain resolutions. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#enumeratedepthswapchainimages(const https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchain#struct_f_android_x_r_depth_swapchain & Swapchain, TArray< https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchainImage#struct_f_android_x_r_depth_swapchain_image > & SwapchainImages)` | `bool` Enumerates the images contained by the swapchain. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#getdepthswapchainsupported()` | `bool` Determines whether or not depth swapchain is supported. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#isvaliddepthswapchain(const https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchain#struct_f_android_x_r_depth_swapchain & Swapchain)` | `bool` Determines whether or not an [FAndroidXRDepthSwapchain](https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchain#struct_f_android_x_r_depth_swapchain) is valid. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRDepthTextureBlueprintFunctionLibrary#updatetexturefromdepthswapchainimage(const https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchainImage#struct_f_android_x_r_depth_swapchain_image & SwapchainImage, https://developer.android.com/develop/xr/unreal/reference/other/AndroidXRTypes.h#eandroidxrdepthswapchaincreateflag ImageSource, UTexture2D *Texture)` | `bool` Updates a texture from a swapchain image. |

## Public attributes

### Swapchain

```
bool FAndroidXRDepthSwapchain & Swapchain
```

## Public static functions

### AcquireDepthSwapchainImages

```
bool AcquireDepthSwapchainImages(
  const FAndroidXRDepthSwapchain & Swapchain,
  FAndroidXRDepthAcquireResult & AcquireResult
)
```
Acquires a swapchain image.

Should be called exactly once (per swapchain) between xrBeginFrame and xrEndFrame.
Details Parameters `Swapchain` The swapchain to be considered. `AcquireResult` The result of the acquisition. **Returns** True if the underlying API call was successful.

### CreateDepthSwapchain

```
bool CreateDepthSwapchain(
  EAndroidXRDepthCameraResolution Resolution
) int32 CreateFlags
```
Creates a depth swapchain.

<br />

Details Parameters `Resolution` The desired resolution. `CreateFlags` The desired flags. `Swapchain` The created depth swapchain. **Returns** True if the underlying API call was successful.

### CreateDepthSwapchainTexture

```
UTexture2D * CreateDepthSwapchainTexture(
  EAndroidXRDepthCameraResolution Resolution,
  EAndroidXRDepthSwapchainCreateFlag ImageSource
)
```
Creates a texture to contain a swapchain image.

The texture will be Resolution x Resolution\*2, with the two views arranged in order in memory (they will appear vertically if rendered).
Details Parameters `Resolution` The swapchain resolution. `ImageSource` Flag defining desired image type (depth or confidence). **Returns** A valid UTexture2D if successful.

### DestroyDepthSwapchain

```
bool DestroyDepthSwapchain(
  FAndroidXRDepthSwapchain & Swapchain
)
```
Destroys a depth swapchain.

<br />

Details Parameters `Swapchain` The swapchain to be destroyed. **Returns** True if the underlying API call was successful.

### EnumerateDepthResolutions

```
bool EnumerateDepthResolutions(
  TArray< EAndroidXRDepthCameraResolution > & SupportedResolutions
)
```
Enumerates the supported depth swapchain resolutions.

<br />

Details Parameters `SupportedResolutions` The supported depth swapchain resolutions. **Returns** True if the underlying API call was successful.

### EnumerateDepthSwapchainImages

```
bool EnumerateDepthSwapchainImages(
  const FAndroidXRDepthSwapchain & Swapchain,
  TArray< FAndroidXRDepthSwapchainImage > & SwapchainImages
)
```
Enumerates the images contained by the swapchain.

<br />

Details Parameters `Swapchain` The swapchain to be considered. `SwapchainImages` Array of images in the swapchain. **Returns** True if the underlying API call was successful.

### GetDepthSwapchainSupported

```
bool GetDepthSwapchainSupported()
```
Determines whether or not depth swapchain is supported.

<br />

| Details ||
|---|---|
| **Returns** | True if depth swapchain is supported. |

### IsValidDepthSwapchain

```
bool IsValidDepthSwapchain(
  const FAndroidXRDepthSwapchain & Swapchain
)
```
Determines whether or not an [FAndroidXRDepthSwapchain](https://developer.android.com/develop/xr/unreal/reference/struct/FAndroidXRDepthSwapchain#struct_f_android_x_r_depth_swapchain) is valid.

<br />

Details Parameters `Swapchain` Swapchain to be verified. **Returns** True if the swapchain is valid.

### UpdateTextureFromDepthSwapchainImage

```
bool UpdateTextureFromDepthSwapchainImage(
  const FAndroidXRDepthSwapchainImage & SwapchainImage,
  EAndroidXRDepthSwapchainCreateFlag ImageSource,
  UTexture2D *Texture
)
```
Updates a texture from a swapchain image.

<br />

Details Parameters `SwapchainImage` The swapchain image to use as the source. `ImageSource` Flag defining desired image type. `Texture` The texture to be updated. **Returns** True if successful.