Function

rotate

Rotate a subspace element (i.e.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

rotate

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 in regard to the center of the element. Parameter rotation angles are specified in degrees. The rotations are applied with the order pitch, then yaw, then roll. If no values are provided, no rotation is applied.

Parameters

pitch Rotation around the x-axis. Defaults to 0.0f. The x-axis is the axis width is measured on.
yaw Rotation around the y-axis. Defaults to 0.0f. The y-axis is the axis height is measured on.
roll Rotation around the z-axis. Defaults to 0.0f. The z-axis is the axis depth is measured on.
Android
Deprecated SubspaceModifier.rotate() with no arguments does nothing. Please provide at least one rotation angle (pitch, yaw, or roll).

rotate

public fun SubspaceModifier.rotate(): SubspaceModifier

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


rotate

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

Rotate a subspace element (i.e. Panel) in space in 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.

Parameters

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

rotate

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

Rotate a subspace element (i.e. Panel) in space in 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.

Parameters

quaternion Quaternion describing the rotation.