# PerceptionSpaceTester

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/PerceptionSpaceTester.kt+class:androidx.xr.scenecore.testing.PerceptionSpaceTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
public final class PerceptionSpaceTester
```

<br />

*** ** * ** ***

A test-only data accessor for perception space that enables direct manipulation and inspection of its internal state.

## Summary

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/PerceptionSpaceTester#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final https://developer.android.com/reference/androidx/xr/scenecore/HitTestResult` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/PerceptionSpaceTester#getHitTestResult()()` The `https://developer.android.com/reference/androidx/xr/scenecore/HitTestResult` to be returned by subsequent calls to `https://developer.android.com/reference/androidx/xr/scenecore/BaseScenePose#hitTest(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Int)`. |
| `int` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/PerceptionSpaceTester#hashCode()()` |
| `final void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/PerceptionSpaceTester#setHitTestResult(androidx.xr.scenecore.HitTestResult)(https://developer.android.com/reference/androidx/xr/scenecore/HitTestResult value)` The `https://developer.android.com/reference/androidx/xr/scenecore/HitTestResult` to be returned by subsequent calls to `https://developer.android.com/reference/androidx/xr/scenecore/BaseScenePose#hitTest(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Int)`. |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getHitTestResult

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final HitTestResult getHitTestResult()
```

The `https://developer.android.com/reference/androidx/xr/scenecore/HitTestResult` to be returned by subsequent calls to `https://developer.android.com/reference/androidx/xr/scenecore/BaseScenePose#hitTest(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Int)`.

This property is typically used for testing or simulation purposes, allowing you to define the outcome of hit tests performed within the `https://developer.android.com/reference/androidx/xr/scenecore/PerceptionSpace`.

Setting a non-null value describes the location and normal of the closest object hit, relative to the origin of the hit test ray. Set to `null` to simulate the hit test not intersecting with any objects.

### hashCode

```
public int hashCode()
```

### setHitTestResult

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final void setHitTestResult(HitTestResult value)
```

The `https://developer.android.com/reference/androidx/xr/scenecore/HitTestResult` to be returned by subsequent calls to `https://developer.android.com/reference/androidx/xr/scenecore/BaseScenePose#hitTest(androidx.xr.runtime.math.Vector3,androidx.xr.runtime.math.Vector3,kotlin.Int)`.

This property is typically used for testing or simulation purposes, allowing you to define the outcome of hit tests performed within the `https://developer.android.com/reference/androidx/xr/scenecore/PerceptionSpace`.

Setting a non-null value describes the location and normal of the closest object hit, relative to the origin of the hit test ray. Set to `null` to simulate the hit test not intersecting with any objects.