# TestGltfAnimation

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

*** ** * ** ***


```
public final class TestGltfAnimation
```

<br />

*** ** * ** ***

A test-only data class that mirrors the properties of a `https://developer.android.com/reference/androidx/xr/scenecore/GltfAnimation`.

This is used to define the characteristics of an animation to be added to a `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelEntityTester` for testing purposes.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation.Builder` Builder for `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final float` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#getAnimationDuration()()` The duration of the animation in seconds. |
| `final int` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#getAnimationIndex()()` The index of the animation in the glTF model file. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#getAnimationName()()` The optional name of the animation. |
| `final float` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#getSeekStartTime()()` Retrieves the seek start time (in seconds) for the animation. |
| `final float` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#getSpeed()()` Retrieves the current playback speed of the animation. |
| `int` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#hashCode()()` |
| `final boolean` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/TestGltfAnimation#shouldLoop()()` Checks whether the animation is currently configured to loop. |

## Public methods

### equals

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

### getAnimationDuration

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

```
public final float getAnimationDuration()
```

The duration of the animation in seconds.

### getAnimationIndex

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

```
public final int getAnimationIndex()
```

The index of the animation in the glTF model file.

### getAnimationName

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

```
public final String getAnimationName()
```

The optional name of the animation.

### getSeekStartTime

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

```
public final float getSeekStartTime()
```

Retrieves the seek start time (in seconds) for the animation.

This reflects the underlying runtime state typically configured when starting the animation via `https://developer.android.com/reference/androidx/xr/scenecore/GltfAnimation#start()`.

| Returns |
|---|---|
| `float` | The seek start time of the animation in seconds. |

### getSpeed

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

```
public final float getSpeed()
```

Retrieves the current playback speed of the animation.

This reflects the underlying runtime state typically modified by `https://developer.android.com/reference/androidx/xr/scenecore/GltfAnimation#start()` or `https://developer.android.com/reference/androidx/xr/scenecore/GltfAnimation#speed()`.

| Returns |
|---|---|
| `float` | The playback speed multiplier of the animation. |

### hashCode

```
public int hashCode()
```

### shouldLoop

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

```
public final boolean shouldLoop()
```

Checks whether the animation is currently configured to loop.

This reflects the underlying runtime state typically modified by `https://developer.android.com/reference/androidx/xr/scenecore/GltfAnimation#start()`.

| Returns |
|---|---|
| `boolean` | `true` if the animation is set to loop, `false` otherwise. |