# UAndroidXRSpatialDiscoveryRaycastSubsystem

`#include <AndroidXRSpatialDiscoveryRaycastSubsystem.h>`

The spatial discovery raycast subsystem.

<br />

## Summary

### Inheritance

Inherits from: [`UAndroidXRTrackingSubsystem`](https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRTrackingSubsystem)

| ### Public functions ||
|---|---|
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRSpatialDiscoveryRaycastSubsystem#israycastdiscoverysupported(https://developer.android.com/develop/xr/unreal/reference/other/AndroidXRSpatialEntitiesTypes.h#espatialcapability Capability) const ` | `bool` Returns whether discovery raycast is supported for the capability. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRSpatialDiscoveryRaycastSubsystem#raycastforentities(const https://developer.android.com/develop/xr/unreal/reference/struct/FSpatialContext#struct_f_spatial_context & SpatialContext, const https://developer.android.com/develop/xr/unreal/reference/struct/FSpatialRaycastConfig#struct_f_spatial_raycast_config & RaycastConfig, TArray< https://developer.android.com/develop/xr/unreal/reference/struct/FSpatialRaycastEntityResult#struct_f_spatial_raycast_entity_result > & FoundEntities)` | `bool` Raycasts for entities tracked by a spatial context. |
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRSpatialDiscoveryRaycastSubsystem#raycastforplanes(const https://developer.android.com/develop/xr/unreal/reference/struct/FSpatialRaycastConfig#struct_f_spatial_raycast_config & RaycastConfig, TArray< https://developer.android.com/develop/xr/unreal/reference/struct/FSpatialRaycastPlaneResult#struct_f_spatial_raycast_plane_result > & FoundPlanes)` | `bool` Raycasts for planes. |

| ### Protected functions ||
|---|---|
| `https://developer.android.com/develop/xr/unreal/reference/class/UAndroidXRSpatialDiscoveryRaycastSubsystem#getrequiredpermissions(TArray< FString > & Permissions) override` | `virtual void` |

## Public functions

### IsRaycastDiscoverySupported

```
bool IsRaycastDiscoverySupported(
  ESpatialCapability Capability
) const 
```
Returns whether discovery raycast is supported for the capability.

<br />

| Details ||
|---|---|
| **Returns** | True if discovery raycast is supported for the capability |

### RaycastForEntities

```
bool RaycastForEntities(
  const FSpatialContext & SpatialContext,
  const FSpatialRaycastConfig & RaycastConfig,
  TArray< FSpatialRaycastEntityResult > & FoundEntities
)
```
Raycasts for entities tracked by a spatial context.

<br />

Details Parameters `The` spatial context to raycast against `The` ray configuration to perfrom the raycast with `An` array of found entities by the raycast **Returns** True if the underlying API call was successful

### RaycastForPlanes

```
bool RaycastForPlanes(
  const FSpatialRaycastConfig & RaycastConfig,
  TArray< FSpatialRaycastPlaneResult > & FoundPlanes
)
```
Raycasts for planes.

<br />

Details Parameters `The` ray configuration to perform the discovery raycast `The` planes found by the raycast

## Protected functions

### GetRequiredPermissions

```
virtual void GetRequiredPermissions(
  TArray< FString > & Permissions
) override
```