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
Fields
Identity
Returns the identity matrix. It doesn't move the points at all.
public static readonly Matrix32 Identity
Field Value
T
[YuzuMember("2")]
public Vector2 T
Field Value
TX
public float TX
Field Value
TY
public float TY
Field Value
U
[YuzuMember("0")]
public Vector2 U
Field Value
UX
public float UX
Field Value
UY
public float UY
Field Value
V
[YuzuMember("1")]
public Vector2 V
Field Value
VX
public float VX
Field Value
VY
public float VY
Field Value
Methods
CalcDeterminant()
public float CalcDeterminant()
Returns
CalcInversed()
public Matrix32 CalcInversed()
Returns
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
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
- 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
floatWeighting value(between 0.0 and 1.0).
value1
Matrix32The first matrix.
value2
Matrix32The second matrix.
Returns
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
Rotation(float)
Returns rotation matrix.
public static Matrix32 Rotation(float radians)
Parameters
radians
float
Returns
RotationRough(float)
Returns rough rotation matrix.
public static Matrix32 RotationRough(float radians)
Parameters
radians
float
Returns
Scaling(Vector2)
Returns scaling matrix.
public static Matrix32 Scaling(Vector2 scaling)
Parameters
scaling
Vector2
Returns
Scaling(float, float)
Returns scaling matrix.
public static Matrix32 Scaling(float x, float y)
Parameters
Returns
SkewX(float)
Returns skew x matrix.
public static Matrix32 SkewX(float radians)
Parameters
radians
float
Returns
SkewY(float)
Returns skew y matrix.
public static Matrix32 SkewY(float radians)
Parameters
radians
float
Returns
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
TransformRectangle(ref readonly Rectangle)
public readonly Rectangle TransformRectangle(ref readonly Rectangle r)
Parameters
Returns
TransformVector(Vector2)
public Vector2 TransformVector(Vector2 a)
Parameters
a
Vector2
Returns
TransformVector(float, float)
public Vector2 TransformVector(float x, float y)
Parameters
Returns
Transformation(Vector2, Vector2, float, Vector2)
Returns the transformation matrix.
public static Matrix32 Transformation(Vector2 center, Vector2 scaling, float rotation, Vector2 translation)
Parameters
center
Vector2Center of rotation and scaling.
scaling
Vector2rotation
floatRotation (in radians).
translation
Vector2
Returns
TransformationRough(Vector2, Vector2, float, Vector2)
Returns the rough transformation matrix.
public static Matrix32 TransformationRough(Vector2 center, Vector2 scaling, float rotation, Vector2 translation)
Parameters
center
Vector2Center of rotation and scaling.
scaling
Vector2rotation
floatRotation (in radians).
translation
Vector2
Returns
Translation(Vector2)
Returns translation matrix.
public static Matrix32 Translation(Vector2 translation)
Parameters
translation
Vector2
Returns
Translation(float, float)
Returns translation matrix.
public static Matrix32 Translation(float x, float y)
Parameters
Returns
Operators
explicit operator Matrix44(Matrix32)
public static explicit operator Matrix44(Matrix32 m)
Parameters
m
Matrix32
Returns
operator *(Matrix32, Matrix32)
Multiplication of matrices. Combines transformations in result (this operation is non-communicative).
public static Matrix32 operator *(Matrix32 a, Matrix32 b)
Parameters
Returns
operator *(Matrix32, Vector2)
Multiplication of 3x2 matrix with 2x1 matrix (represented by a vector).
public static Vector2 operator *(Matrix32 a, Vector2 b)
Parameters
Returns
operator *(Vector2, Matrix32)
public static Vector2 operator *(Vector2 a, Matrix32 b)