Transform class provides a set of translation and rotation.

Constructor

new()

Creates a new identical transform.

Methods

inlineclone():Transform

Returns a clone of the transformation.

inlinecopyFrom(transform:Transform):Transform

Sets the transformation to transform and returns this.

inlinegetOrientation():Quat

Returns the rotation as a quaternion.

inlinegetOrientationTo(orientation:Quat):Void

Sets orientation to the quaternion representing the rotation.

This does not create a new instance of Quat.

inlinegetPosition():Vec3

Returns the position of the transformation.

inlinegetPositionTo(position:Vec3):Void

Sets position to the position of the transformation.

This does not create a new instance of Vec3.

inlinegetRotation():Mat3

Returns the rotation matrix.

inlinegetRotationTo(out:Mat3):Void

Sets out to the rotation matrix.

This does not create a new instance of Mat3.

inlineidentity():Transform

Sets the transformation to identity and returns this.

inlinerotate(rotation:Mat3):Void

Applies rotation by the rotation matrix rotation.

inlinerotateXyz(eulerAngles:Vec3):Void

Applies the rotation by Euler angles eulerAngles in radians.

inlinesetOrientation(quaternion:Quat):Transform

Sets the rotation from a quaternion quaternion and returns this.

inlinesetPosition(position:Vec3):Transform

Sets the position of the transformation to position and returns this.

inlinesetRotation(rotation:Mat3):Transform

Sets the rotation matrix to rotation and returns this.

inlinesetRotationXyz(eulerAngles:Vec3):Void

Sets the rotation by Euler angles eulerAngles in radians.

inlinetranslate(translation:Vec3):Void

Translates the position by translation.