SpatialMoveEvent

class SpatialMoveEvent


An event representing a change in pose, scale, and size.

Summary

Public constructors

SpatialMoveEvent(
    type: SpatialMoveEventType,
    pose: Pose,
    previousPose: Pose,
    scale: Float,
    previousScale: Float,
    size: IntVolumeSize
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Pose

The new pose of the composable in the subspace, relative to its parent, with its translation being expressed in pixels.

Pose

The pose of the composable from the previous event.

Float

The scale of the composable from the previous event.

Float

The scale of the composable as a result of its motion.

IntVolumeSize

The unscaled initial IntVolumeSize value that includes the width, height and depth of the composable.

SpatialMoveEventType

The current type of the drag event.

Public constructors

SpatialMoveEvent

Added in 1.0.0-beta01
SpatialMoveEvent(
    type: SpatialMoveEventType,
    pose: Pose,
    previousPose: Pose,
    scale: Float,
    previousScale: Float,
    size: IntVolumeSize
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

pose

Added in 1.0.0-beta01
val pose: Pose

The new pose of the composable in the subspace, relative to its parent, with its translation being expressed in pixels.

previousPose

Added in 1.0.0-beta01
val previousPose: Pose

The pose of the composable from the previous event. When type is SpatialMoveEventType.Start, this should be equal to pose.

previousScale

Added in 1.0.0-beta01
val previousScale: Float

The scale of the composable from the previous event. When type is SpatialMoveEventType.Start, this should be equal to scale.

scale

Added in 1.0.0-beta01
val scale: Float

The scale of the composable as a result of its motion. This value will change with the composable's depth when scaleWithDistance is true on the modifier.

size

Added in 1.0.0-beta01
val size: IntVolumeSize

The unscaled initial IntVolumeSize value that includes the width, height and depth of the composable. To get the current perceived (scaled) size, multiply this value by scale.

type

val type: SpatialMoveEventType

The current type of the drag event.