Start native apps faster with the Composables CLI ->
Class

VolumeConstraints

Defines constraints for a 3D volume, specifying minimum and maximum values for width, height, and depth.

Source set: Android
public class VolumeConstraints(
    @IntRange(from = 0) public val minWidth: Int = 0,
    @IntRange(from = 0) public val maxWidth: Int = INFINITY,
    @IntRange(from = 0) public val minHeight: Int = 0,
    @IntRange(from = 0) public val maxHeight: Int = INFINITY,
    @IntRange(from = 0) public val minDepth: Int = 0,
    @IntRange(from = 0) public val maxDepth: Int = INFINITY,
)

Defines constraints for a 3D volume, specifying minimum and maximum values for width, height, and depth.

This class is similar in concept to androidx.compose.ui.unit.Constraints, but adapted for 3D volumes.

Properties

hasBoundedWidth

Source set: Android
public val hasBoundedWidth: Boolean

Indicates whether the width is bounded (has a maximum value other than INFINITY).

hasBoundedHeight

Source set: Android
public val hasBoundedHeight: Boolean

Indicates whether the height is bounded (has a maximum value other than INFINITY).

hasBoundedDepth

Source set: Android
public val hasBoundedDepth: Boolean

Indicates whether the depth is bounded (has a maximum value other than INFINITY).

Functions

toString

Source set: Android
override fun toString(): String

Returns a string representation of the VolumeConstraints.

equals

Source set: Android
override fun equals(other: Any?): Boolean

Checks if this VolumeConstraints object is equal to other object.

hashCode

Source set: Android
override fun hashCode(): Int

Calculates a hash code for this VolumeConstraints object.

copy

Source set: Android
public fun copy(
        minWidth: Int = this.minWidth,
        maxWidth: Int = this.maxWidth,
        minHeight: Int = this.minHeight,
        maxHeight: Int = this.maxHeight,
        minDepth: Int = this.minDepth,
        maxDepth: Int = this.maxDepth,
    ): VolumeConstraints

Creates a copy of this VolumeConstraints object with modifications to its properties.

Parameters

minWidth the minimum allowed width in the new constraints.
maxWidth the maximum allowed width in the new constraints.
minHeight the minimum allowed height in the new constraints.
maxHeight the maximum allowed height in the new constraints.
minDepth the minimum allowed depth in the new constraints.
maxDepth the maximum allowed depth in the new constraints.

Return

a new VolumeConstraints object with the specified modifications.

Members

Companion

Source set: Android
public companion object

Properties

INFINITY

Source set: Android
public const val INFINITY: Int = Int.MAX_VALUE

Represents an unbounded (infinite) constraint value.