Transform

class Transform

Represents a transform.

Constructors

Link copied to clipboard
constructor()

Creates a Transform instance with position, rotation (as EulerAngles), and scale. This is the default Transform constructor.

constructor(position: Vector3, rotation: EulerAngles, scale: Vector3)

Creates a Transform instance with specified position, rotation (as EulerAngles), and scale.

constructor(position: Vector3, rotation: Quat, scale: Vector3)

Creates a Transform instance with specified position, rotation (as Quat), and scale.

Properties

Link copied to clipboard

The position vector of the transform.

Link copied to clipboard

The rotation represented as a quaternion.

Link copied to clipboard

The rotation represented as an EulerAngles.

Link copied to clipboard

The scale vector of the transform.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun rotate(rotation: Quat): Transform

Applies an additional rotation to this transform's current orientation and returns a new Transform with the combined rotation.

Link copied to clipboard
fun scale(scale: Vector3): Transform

Applies an additional scaling to this transform's current scale and returns a new Transform with the combined scale.

Link copied to clipboard
fun toFloatArray(): FloatArray

Converts the Transform instance to a float array.

Link copied to clipboard

Reconstructs a 4x4 transformation matrix from this Transform's position, quaternion, and scale components.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun translate(translation: Vector3): Transform

Applies an additional translation to this transform's current position and returns a new Transform with the combined position.