Transform class provides a set of translation and rotation.

Constructor

new ()

Creates a new identical transform.

Methods

inline clone ():Transform

Returns a clone of the transformation.

inline copyFrom (transform:Transform):Transform

Sets the transformation to transform and returns this.

inline getOrientation ():Quat

Returns the rotation as a quaternion.

inline getOrientationTo (orientation:Quat):Void

Sets orientation to the quaternion representing the rotation.

This does not create a new instance of Quat.

inline getPosition ():Vec3

Returns the position of the transformation.

inline getPositionTo (position:Vec3):Void

Sets position to the position of the transformation.

This does not create a new instance of Vec3.

inline getRotation ():Mat3

Returns the rotation matrix.

inline getRotationTo (out:Mat3):Void

Sets out to the rotation matrix.

-

This does not create a new instance of Mat3.

inline identity ():Transform

Sets the transformation to identity and returns this.

inline rotate (rotation:Mat3):Void

Applies rotation by the rotation matrix rotation.

inline setOrientation (quaternion:Quat):Transform

Sets the rotation from a quaternion quaternion and returns this.

inline setPosition (position:Vec3):Transform

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

inline setRotation (rotation:Mat3):Transform

Sets the rotation matrix to rotation and returns this.

inline translate (translation:Vec3):Void

Translates the position by translation.