Table of Contents

Class Transform

Namespace
Axolotl2D.GameObjects
Assembly
Axolotl2D.dll

A hierarchical 2D position, rotation, and scale.

public sealed class Transform
Inheritance
Transform
Inherited Members

Properties

Children

public IReadOnlyList<Transform> Children { get; }

Property Value

IReadOnlyList<Transform>

LocalMatrix

public Matrix3x2 LocalMatrix { get; }

Property Value

Matrix3x2

LocalPosition

public Vector2 LocalPosition { get; set; }

Property Value

Vector2

LocalRotation

public float LocalRotation { get; set; }

Property Value

float

LocalScale

public Vector2 LocalScale { get; set; }

Property Value

Vector2

LossyScale

public Vector2 LossyScale { get; }

Property Value

Vector2

Parent

public Transform? Parent { get; set; }

Property Value

Transform

Position

public Vector2 Position { get; }

Property Value

Vector2

Right

public Vector2 Right { get; }

Property Value

Vector2

Rotation

public float Rotation { get; }

Property Value

float

Up

public Vector2 Up { get; }

Property Value

Vector2

WorldMatrix

public Matrix3x2 WorldMatrix { get; }

Property Value

Matrix3x2

Methods

InverseTransformPoint(Vector2)

public Vector2 InverseTransformPoint(Vector2 worldPoint)

Parameters

worldPoint Vector2

Returns

Vector2

LookAt(Vector2)

public void LookAt(Vector2 worldTarget)

Parameters

worldTarget Vector2

Rotate(float)

public void Rotate(float radians)

Parameters

radians float

SetParent(Transform?, bool)

public void SetParent(Transform? newParent, bool worldPositionStays = true)

Parameters

newParent Transform
worldPositionStays bool

TransformPoint(Vector2)

public Vector2 TransformPoint(Vector2 localPoint)

Parameters

localPoint Vector2

Returns

Vector2

Translate(Vector2, bool)

public void Translate(Vector2 amount, bool localSpace = false)

Parameters

amount Vector2
localSpace bool