Transform2D

gdext.builtin.Transform2D
See theTransform2D companion object
final case class Transform2D(xx: Float, xy: Float, yx: Float, yy: Float, ox: Float, oy: Float)

Godot's Transform2D: columns x = (xx, xy), y = (yx, yy) and origin = (ox, oy), stored flat (6 floats) so one value is one object.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def *(v: Vector2): Vector2

Composition: t first, then this.

Composition: t first, then this.

Attributes

def *(s: Float): Transform2D
def *(rect: Rect2): Rect2
def /(s: Float): Transform2D
def determinant: Float
def getRotation: Float
def getSkew: Float
def interpolateWith(xform: Transform2D, weight: Float): Transform2D

The inverse of an orthonormal transform.

The inverse of an orthonormal transform.

Attributes

def isConformal: Boolean
def isEqualApprox(xform: Transform2D): Boolean
def isFinite: Boolean
def lookingAt(target: Vector2 = ...): Transform2D
def rotated(angle: Float): Transform2D

Rotate in parent space (left-multiplies).

Rotate in parent space (left-multiplies).

Attributes

def rotatedLocal(angle: Float): Transform2D

Rotate in local space (right-multiplies).

Rotate in local space (right-multiplies).

Attributes

def scaled(scale: Vector2): Transform2D
def withRotation(rotation: Float): Transform2D

This transform with its rotation replaced, keeping its scale.

This transform with its rotation replaced, keeping its scale.

Attributes

def x: Vector2
def xform(v: Vector2): Vector2
def xformInv(rect: Rect2): Rect2
def y: Vector2

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product