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
LocalMatrix
public Matrix3x2 LocalMatrix { get; }
Property Value
LocalPosition
public Vector2 LocalPosition { get; set; }
Property Value
LocalRotation
public float LocalRotation { get; set; }
Property Value
LocalScale
public Vector2 LocalScale { get; set; }
Property Value
LossyScale
public Vector2 LossyScale { get; }
Property Value
Parent
public Transform? Parent { get; set; }
Property Value
Position
public Vector2 Position { get; }
Property Value
Right
public Vector2 Right { get; }
Property Value
Rotation
public float Rotation { get; }
Property Value
Up
public Vector2 Up { get; }
Property Value
WorldMatrix
public Matrix3x2 WorldMatrix { get; }
Property Value
Methods
InverseTransformPoint(Vector2)
public Vector2 InverseTransformPoint(Vector2 worldPoint)
Parameters
worldPointVector2
Returns
LookAt(Vector2)
public void LookAt(Vector2 worldTarget)
Parameters
worldTargetVector2
Rotate(float)
public void Rotate(float radians)
Parameters
radiansfloat
SetParent(Transform?, bool)
public void SetParent(Transform? newParent, bool worldPositionStays = true)
Parameters
TransformPoint(Vector2)
public Vector2 TransformPoint(Vector2 localPoint)
Parameters
localPointVector2
Returns
Translate(Vector2, bool)
public void Translate(Vector2 amount, bool localSpace = false)