Transform

class Transform : Parcelable

Represents a 3D transformation (position and rotation) for AR applications.

This class provides easy access to the position and rotation components of objects in 3D space. It is commonly used to represent the pose (position and orientation) of LigTag devices in AR applications.

For advanced users who need the raw 4x4 transformation matrix, use the toMatrix() method to get a FloatArray compatible with AR frameworks.

Constructors

Transform
Link copied to clipboard
fun Transform()

Creates an identity transform (no translation or rotation).

Transform
Link copied to clipboard
fun Transform(data: FloatArray)

Creates a transform from a 4x4 transformation matrix.

Transform
Link copied to clipboard
fun Transform(parcel: Parcel)

Types

CREATOR
Link copied to clipboard
object CREATOR : Parcelable.Creator<Transform>

Functions

describeContents
Link copied to clipboard
open override fun describeContents(): Int
toMatrix
Link copied to clipboard
fun toMatrix(): FloatArray

Returns the 4x4 transformation matrix as a FloatArray.

writeToParcel
Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)

Properties

position
Link copied to clipboard
val position: Vector3

The position component of the transform in 3D space.

rotation
Link copied to clipboard
val rotation: Quaternion

The rotation component as a quaternion.

translation
Link copied to clipboard
var translation: Vector3