Function

rotate

Rotate a subspace element (i.e., Panel) in space with regard to the center of the element.

rotate

Source set: Android
public fun SubspaceModifier.rotate(
    pitch: Float = 0.0f,
    yaw: Float = 0.0f,
    roll: Float = 0.0f,
): SubspaceModifier

Rotate a subspace element (i.e., Panel) in space with regard to the center of the element. Parameter rotation angles are specified in degrees. The rotations are applied in the order pitch, then yaw, then roll. If no values are provided, no rotation is applied. Rotation does not alter a Composable's measured size in its parent.

Parameters

pitch Rotation around the x-axis. Defaults to 0.0f. The x-axis is the axis along which width is measured.
yaw Rotation around the y-axis. Defaults to 0.0f. The y-axis is the axis along which height is measured.
roll Rotation around the z-axis. Defaults to 0.0f. The z-axis is the axis along which depth is measured.

rotate

Source set: Android
@Deprecated(
    "SubspaceModifier.rotate() with no arguments does nothing. " +
        "Please provide at least one rotation angle (pitch, yaw, or roll).",
    level = DeprecationLevel.ERROR,
)
public fun SubspaceModifier.rotate(): SubspaceModifier

This overload is provided to prevent rotate from being called with no arguments.

rotate

Source set: Android
public fun SubspaceModifier.rotate(axisAngle: Vector3, rotation: Float): SubspaceModifier

Rotate a subspace element (i.e., Panel) in space with regard to the center of the element. The rotation is defined by a Vector3 and a rotation angle in degrees. The axis angle will be normalized during construction. The rotation will be applied to the unit vector representing the axisAngle. Rotation does not alter a Composable's measured size in its parent.

Parameters

axisAngle Vector representing the axis of rotation.
rotation Degrees of rotation.

rotate

Source set: Android
public fun SubspaceModifier.rotate(quaternion: Quaternion): SubspaceModifier

Rotate a subspace element (i.e., Panel) in space with regard to the center of the element. The rotation is directly specified by the provided Quaternion. The Quaternion values are specified as x, y, z, w, where w is the rotation of the unit vector, in radians. Rotation does not alter a Composable's measured size in its parent.

Parameters

quaternion Quaternion describing the rotation.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: