# GltfModelEntityTester

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/GltfModelEntityTester.kt+class:androidx.xr.scenecore.testing.GltfModelEntityTester) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
public final class GltfModelEntityTester
```

<br />

*** ** * ** ***

`https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester` is a testing accessor used to inspect the internal state of a `https://developer.android.com/reference/androidx/xr/scenecore/GltfModelEntity` within a test environment.

It utilizes reflection to bridge the `https://developer.android.com/reference/androidx/xr/scenecore/GltfModelEntity` with the fake runtime, allowing tests to verify nodes, animations, and bounding box data that are otherwise encapsulated or tied to the underlying runtime implementation.

## Summary

| ### Public methods |
|---|---|
| `final void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester#addAnimation(androidx.xr.scenecore.testing.TestGltfAnimation)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation animation)` Creates and adds a `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation` to the entity using the properties of the given `https://developer.android.com/reference/androidx/xr/scenecore/GltfModelEntity`. |
| `final void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester#addNode(androidx.xr.scenecore.testing.TestGltfModelNode)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfModelNode node)` Creates and adds a `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfModelNode` to the entity using the properties of the given `https://developer.android.com/reference/androidx/xr/scenecore/GltfModelEntity`. |
| `boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/BoundingBox` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester#getGltfModelBoundingBox()()` Configures the axis-aligned bounding box (AABB) of the glTF model in meters, relative to the model's local coordinate space. |
| `int` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester#hashCode()()` |
| `final void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester#setGltfModelBoundingBox(androidx.xr.runtime.math.BoundingBox)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/math/BoundingBox value)` Configures the axis-aligned bounding box (AABB) of the glTF model in meters, relative to the model's local coordinate space. |

## Public methods

### addAnimation

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

```
public final void addAnimation(@NonNull TestGltfAnimation animation)
```

Creates and adds a `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation` to the entity using the properties of the given `https://developer.android.com/reference/androidx/xr/scenecore/GltfModelEntity`.

This simulates the addition of a new animation to the underlying runtime entity.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation animation` | The test animation feature containing the properties for the new `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation`. |

### addNode

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

```
public final void addNode(@NonNull TestGltfModelNode node)
```

Creates and adds a `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfModelNode` to the entity using the properties of the given `https://developer.android.com/reference/androidx/xr/scenecore/GltfModelEntity`.

This simulates the attachment of a new node to the underlying runtime entity.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfModelNode node` | The test node feature containing the properties for the new `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfModelNode`. |

### equals

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

### getGltfModelBoundingBox

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

```
public final @NonNull BoundingBox getGltfModelBoundingBox()
```

Configures the axis-aligned bounding box (AABB) of the glTF model in meters, relative to the model's local coordinate space.

### hashCode

```
public int hashCode()
```

### setGltfModelBoundingBox

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

```
public final void setGltfModelBoundingBox(@NonNull BoundingBox value)
```

Configures the axis-aligned bounding box (AABB) of the glTF model in meters, relative to the model's local coordinate space.