# DpVolumeSize

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


```
class DpVolumeSize
```

<br />

*** ** * ** ***

Represents the size of a volume in density-independent pixels (`https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`).

This class provides a convenient way to store and manipulate the `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#width()`, `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#height()`, and `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#depth()` of a 3D volume in Dp. It also provides methods to convert to and from in meters.

## Summary

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#Zero()` A `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize` with all dimensions set to 0.dp. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#DpVolumeSize(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)(width: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, height: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, depth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#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/compose/unit/DpVolumeSize#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#depth()` the size of the volume along the z dimension, in Dp. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#height()` the size of the volume along the y dimension, in Dp. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize#width()` the size of the volume along the x dimension, in Dp. |

## Public companion properties

### Zero

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

```
val Zero: DpVolumeSize
```

A `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize` with all dimensions set to 0.dp.

## Public constructors

### DpVolumeSize

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

```
DpVolumeSize(width: Dp, height: Dp, depth: Dp)
```

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### depth

```
val depth: Dp
```

the size of the volume along the z dimension, in Dp. Panels have 0 depth and cannot be set to non-zero depth.

### height

```
val height: Dp
```

the size of the volume along the y dimension, in Dp.

### width

```
val width: Dp
```

the size of the volume along the x dimension, in Dp.