Table of Contents

Struct Matrix32

Namespace
Lime
Assembly
Lime.dll

Representation of 3x2 transformation matrix.

public struct Matrix32 : IEquatable<Matrix32>
Implements
Inherited Members

Constructors

Matrix32(Vector2, Vector2, Vector2)

public Matrix32(Vector2 u, Vector2 v, Vector2 t)

Parameters

u Vector2
v Vector2
t Vector2

Fields

Identity

Returns the identity matrix. It doesn't move the points at all.

public static readonly Matrix32 Identity

Field Value

Matrix32

T

[YuzuMember("2")]
public Vector2 T

Field Value

Vector2

TX

public float TX

Field Value

float

TY

public float TY

Field Value

float

U

[YuzuMember("0")]
public Vector2 U

Field Value

Vector2

UX

public float UX

Field Value

float

UY

public float UY

Field Value

float

V

[YuzuMember("1")]
public Vector2 V

Field Value

Vector2

VX

public float VX

Field Value

float

VY

public float VY

Field Value

float

Methods

CalcDeterminant()

public float CalcDeterminant()

Returns

float

CalcInversed()

public Matrix32 CalcInversed()

Returns

Matrix32

Equals(Matrix32)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Matrix32 rhs)

Parameters

rhs Matrix32

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

IsIdentity()

Checks if this matrix is identity matrix.

public bool IsIdentity()

Returns

bool
See Also

Lerp(float, Matrix32, Matrix32)

Creates a new Matrix32 that contains linear interpolation of the specified matrices.

public static Matrix32 Lerp(float amount, Matrix32 value1, Matrix32 value2)

Parameters

amount float

Weighting value(between 0.0 and 1.0).

value1 Matrix32

The first matrix.

value2 Matrix32

The second matrix.

Returns

Matrix32

Multiply(ref Matrix32, ref Matrix32, out Matrix32)

Multiplication of matrices. Combines transformations in result (this operation is non-communicative).

public static void Multiply(ref Matrix32 a, ref Matrix32 b, out Matrix32 result)

Parameters

a Matrix32
b Matrix32
result Matrix32

Rotation(float)

Returns rotation matrix.

public static Matrix32 Rotation(float radians)

Parameters

radians float

Returns

Matrix32

RotationRough(float)

Returns rough rotation matrix.

public static Matrix32 RotationRough(float radians)

Parameters

radians float

Returns

Matrix32

Scaling(Vector2)

Returns scaling matrix.

public static Matrix32 Scaling(Vector2 scaling)

Parameters

scaling Vector2

Returns

Matrix32

Scaling(float, float)

Returns scaling matrix.

public static Matrix32 Scaling(float x, float y)

Parameters

x float
y float

Returns

Matrix32

SkewX(float)

Returns skew x matrix.

public static Matrix32 SkewX(float radians)

Parameters

radians float

Returns

Matrix32

SkewY(float)

Returns skew y matrix.

public static Matrix32 SkewY(float radians)

Parameters

radians float

Returns

Matrix32

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

ToTransform2()

public Transform2 ToTransform2()

Returns

Transform2

TransformRectangle(ref readonly Rectangle)

public readonly Rectangle TransformRectangle(ref readonly Rectangle r)

Parameters

r Rectangle

Returns

Rectangle

TransformVector(Vector2)

public Vector2 TransformVector(Vector2 a)

Parameters

a Vector2

Returns

Vector2

TransformVector(float, float)

public Vector2 TransformVector(float x, float y)

Parameters

x float
y float

Returns

Vector2

Transformation(Vector2, Vector2, float, Vector2)

Returns the transformation matrix.

public static Matrix32 Transformation(Vector2 center, Vector2 scaling, float rotation, Vector2 translation)

Parameters

center Vector2

Center of rotation and scaling.

scaling Vector2
rotation float

Rotation (in radians).

translation Vector2

Returns

Matrix32

TransformationRough(Vector2, Vector2, float, Vector2)

Returns the rough transformation matrix.

public static Matrix32 TransformationRough(Vector2 center, Vector2 scaling, float rotation, Vector2 translation)

Parameters

center Vector2

Center of rotation and scaling.

scaling Vector2
rotation float

Rotation (in radians).

translation Vector2

Returns

Matrix32

Translation(Vector2)

Returns translation matrix.

public static Matrix32 Translation(Vector2 translation)

Parameters

translation Vector2

Returns

Matrix32

Translation(float, float)

Returns translation matrix.

public static Matrix32 Translation(float x, float y)

Parameters

x float
y float

Returns

Matrix32

Operators

explicit operator Matrix44(Matrix32)

public static explicit operator Matrix44(Matrix32 m)

Parameters

m Matrix32

Returns

Matrix44

operator *(Matrix32, Matrix32)

Multiplication of matrices. Combines transformations in result (this operation is non-communicative).

public static Matrix32 operator *(Matrix32 a, Matrix32 b)

Parameters

a Matrix32
b Matrix32

Returns

Matrix32

operator *(Matrix32, Vector2)

Multiplication of 3x2 matrix with 2x1 matrix (represented by a vector).

public static Vector2 operator *(Matrix32 a, Vector2 b)

Parameters

a Matrix32
b Vector2

Returns

Vector2

operator *(Vector2, Matrix32)

public static Vector2 operator *(Vector2 a, Matrix32 b)

Parameters

a Vector2
b Matrix32

Returns

Vector2