# MeshSubset

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

*** ** * ** ***


```
class MeshSubset
```

<br />

*** ** * ** ***

Defines a subset of the mesh to draw.

A subset defines a contiguous range of indices within the `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshBuffer`'s index buffer that should be rendered together using a specific topology and a single `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/Material`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#indexOffset()` or `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#indexCount()` is negative. |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#MeshSubset(androidx.xr.scenecore.MeshSubsetTopology,kotlin.Int,kotlin.Int)( topology: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubsetTopology, indexOffset: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, indexCount: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#toString()()` |

| ### Public properties |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#indexCount()` The number of indices to draw. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#indexOffset()` The offset (in number of indices, not bytes) to the first index in the index buffer. |
| `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubsetTopology` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubset#topology()` The `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubsetTopology` of the primitives to draw. |

## Public constructors

### MeshSubset

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

```
MeshSubset(
    topology: MeshSubsetTopology,
    indexOffset: @IntRange(from = 0) Int,
    indexCount: @IntRange(from = 0) Int
)
```

| Parameters |
|---|---|
| `topology: https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubsetTopology` | The `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubsetTopology` of the primitives to draw. |
| `indexOffset: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The offset (in number of indices, not bytes) to the first index in the index buffer. |
| `indexCount: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of indices to draw. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### indexCount

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

```
val indexCount: @IntRange(from = 0) Int
```

The number of indices to draw.

### indexOffset

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

```
val indexOffset: @IntRange(from = 0) Int
```

The offset (in number of indices, not bytes) to the first index in the index buffer.

### topology

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

```
val topology: MeshSubsetTopology
```

The `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/MeshSubsetTopology` of the primitives to draw.