@Deprecated(
message =
"FollowingSubspace has been deprecated. Migrate to Subspace using " +
"androidx.xr.compose.subspace.animation.follow.TrackedDimensions instead."
)
public class TrackedDimensions(
public val isTranslationXTracked: Boolean = false,
public val isTranslationYTracked: Boolean = false,
public val isTranslationZTracked: Boolean = false,
public val isRotationXTracked: Boolean = false,
public val isRotationYTracked: Boolean = false,
public val isRotationZTracked: Boolean = false,
)
A set of boolean flags which determine the dimensions of movement that are tracked.
This is intended to be used with a FollowBehavior. These dimensions can be used to control how one entity is follows another. For example, if a dev wants to place a marker on the floor showing a user's position in a room, they might want to track only translationX and translationZ. Possible values are: isTranslationXTracked, isTranslationYTracked, isTranslationZTracked, isRotationXTracked, isRotationYTracked, isRotationZTracked or TrackedDimensions.All.
Functions
copy
public fun copy(
isTranslationXTracked: Boolean = this.isTranslationXTracked,
isTranslationYTracked: Boolean = this.isTranslationYTracked,
isTranslationZTracked: Boolean = this.isTranslationZTracked,
isRotationXTracked: Boolean = this.isRotationXTracked,
isRotationYTracked: Boolean = this.isRotationYTracked,
isRotationZTracked: Boolean = this.isRotationZTracked,
): TrackedDimensions
returns a copy of this object with the given values updated.
Parameters
| isTranslationXTracked | Whether to track translation along the X axis. |
| isTranslationYTracked | Whether to track translation along the Y axis. |
| isTranslationZTracked | Whether to track translation along the Z axis. |
| isRotationXTracked | Whether to track rotation around the X axis. |
| isRotationYTracked | Whether to track rotation around the Y axis. |
| isRotationZTracked | Whether to track rotation around the Z axis. |
equals
override fun equals(other: Any?): Boolean
hashCode
override fun hashCode(): Int
toString
override fun toString(): String
Members
Companion
public companion object
Properties
All
@Deprecated(
message =
"FollowingSubspace has been deprecated. Use " +
"androidx.xr.compose.subspace.animation.follow.TrackedDimensions.All instead."
)
public val All: TrackedDimensions =
TrackedDimensions(
isTranslationXTracked = true,
isTranslationYTracked = true,
isTranslationZTracked = true,
isRotationXTracked = true,
isRotationYTracked = true,
isRotationZTracked = true,
)
TrackedDimensions.ALL is provided as a convenient way to specify all 6 dimensions of a pose.
public class TrackedDimensions(
public val isXTracked: Boolean = false,
public val isYTracked: Boolean = false,
public val isZTracked: Boolean = false,
public val isPitchTracked: Boolean = false,
public val isYawTracked: Boolean = false,
public val isRollTracked: Boolean = false,
)
Functions
copy
public fun copy(
isXTracked: Boolean = this.isXTracked,
isYTracked: Boolean = this.isYTracked,
isZTracked: Boolean = this.isZTracked,
isPitchTracked: Boolean = this.isPitchTracked,
isYawTracked: Boolean = this.isYawTracked,
isRollTracked: Boolean = this.isRollTracked,
): TrackedDimensions
Returns a copy of this object with the given values updated.
Parameters
| isXTracked | Whether to track translation along the X axis. |
| isYTracked | Whether to track translation along the Y axis. |
| isZTracked | Whether to track translation along the Z axis. |
| isPitchTracked | Whether to track rotation around the X axis. |
| isYawTracked | Whether to track rotation around the Y axis. |
| isRollTracked | Whether to track rotation around the Z axis. |
equals
override fun equals(other: Any?): Boolean
hashCode
override fun hashCode(): Int
toString
override fun toString(): String
Members
Companion
public companion object
Properties
All
public val All: TrackedDimensions =
TrackedDimensions(
isXTracked = true,
isYTracked = true,
isZTracked = true,
isPitchTracked = true,
isYawTracked = true,
isRollTracked = true,
)
TrackedDimensions.All is provided as a convenient way to specify all 6 dimensions of a pose.
RotationOnly
public val RotationOnly: TrackedDimensions =
TrackedDimensions(
isXTracked = false,
isYTracked = false,
isZTracked = false,
isPitchTracked = true,
isYawTracked = true,
isRollTracked = true,
)
TrackedDimensions.RotationOnly is provided as a convenient way to specify tracking only rotation dimensions (pitch, yaw, roll).