Matrix3x2 结构

定义

表示 3x2 矩阵。Represents a 3x2 matrix.

public value class Matrix3x2 : IEquatable<System::Numerics::Matrix3x2>
public struct Matrix3x2 : IEquatable<System.Numerics.Matrix3x2>
type Matrix3x2 = struct
Public Structure Matrix3x2
Implements IEquatable(Of Matrix3x2)
继承
Matrix3x2
实现

注解

对于矩阵转换,Vector2Vector3Vector4 实例表示为行:矩阵 M 使用 vM 乘法转换矢量 v。For matrix transformations, the Vector2, Vector3, and Vector4 instances are represented as rows: a vector v is transformed by a matrix M with vM multiplication.

构造函数

Matrix3x2(Single, Single, Single, Single, Single, Single)

从指定分量创建 3x2 矩阵。Creates a 3x2 matrix from the specified components.

字段

M11

第一行的第一个元素。The first element of the first row.

M12

第一行的第二个元素。The second element of the first row.

M21

第二行的第一个元素。The first element of the second row.

M22

第二行的第二个元素。The second element of the second row.

M31

第三行的第一个元素。The first element of the third row.

M32

第三行的第二个元素。The second element of the third row.

属性

Identity

获取乘法单位矩阵。Gets the multiplicative identity matrix.

IsIdentity

指示当前矩阵是否为单位矩阵。Indicates whether the current matrix is the identity matrix.

Translation

获取或设置此矩阵的平移分量。Gets or sets the translation component of this matrix.

方法

Add(Matrix3x2, Matrix3x2)

将一个矩阵中的每个元素与第二个矩阵中的对应元素相加。Adds each element in one matrix with its corresponding element in a second matrix.

CreateRotation(Single)

使用给定的旋转(以弧度表示)创建旋转矩阵。Creates a rotation matrix using the given rotation in radians.

CreateRotation(Single, Vector2)

使用指定旋转(以弧度表示)和中心点创建旋转矩阵。Creates a rotation matrix using the specified rotation in radians and a center point.

CreateScale(Single)

创建使用给定比例统一缩放的缩放矩阵。Creates a scaling matrix that scales uniformly with the given scale.

CreateScale(Single, Single)

从指定 X 和 Y 分量创建缩放矩阵。Creates a scaling matrix from the specified X and Y components.

CreateScale(Single, Single, Vector2)

创建按给定中心点偏移的缩放矩阵。Creates a scaling matrix that is offset by a given center point.

CreateScale(Single, Vector2)

使用相对于指定中心的偏移量,创建通过指定比例统一缩放的缩放矩阵。Creates a scaling matrix that scales uniformly with the specified scale with an offset from the specified center.

CreateScale(Vector2)

从指定向量比例创建缩放矩阵。Creates a scaling matrix from the specified vector scale.

CreateScale(Vector2, Vector2)

使用相对于指定中心点的偏移量从指定向量比例创建缩放矩阵。Creates a scaling matrix from the specified vector scale with an offset from the specified center point.

CreateSkew(Single, Single)

从指定角度(以弧度表示)创建斜矩阵。Creates a skew matrix from the specified angles in radians.

CreateSkew(Single, Single, Vector2)

从指定角度(以弧度表示)和中心点创建斜矩阵。Creates a skew matrix from the specified angles in radians and a center point.

CreateTranslation(Single, Single)

从指定 X 和 Y 分量创建平移矩阵。Creates a translation matrix from the specified X and Y components.

CreateTranslation(Vector2)

从指定二维向量创建平移矩阵。Creates a translation matrix from the specified 2-dimensional vector.

Equals(Matrix3x2)

返回一个值,该值指示此实例是否与另一个 3x2 矩阵相等。Returns a value that indicates whether this instance and another 3x2 matrix are equal.

Equals(Object)

返回一个值,该值指示此实例是否与指定对象相等。Returns a value that indicates whether this instance and a specified object are equal.

GetDeterminant()

计算此矩阵的行列式。Calculates the determinant for this matrix.

GetHashCode()

返回此实例的哈希代码。Returns the hash code for this instance.

Invert(Matrix3x2, Matrix3x2)

对指定矩阵求逆。Inverts the specified matrix. 返回值指示操作是否成功。The return value indicates whether the operation succeeded.

Lerp(Matrix3x2, Matrix3x2, Single)

基于指定第二个矩阵的权重的值,从一个矩阵向第二个矩阵执行线性内插。Performs a linear interpolation from one matrix to a second matrix based on a value that specifies the weighting of the second matrix.

Multiply(Matrix3x2, Matrix3x2)

返回将两个矩阵相乘得到的矩阵。Returns the matrix that results from multiplying two matrices together.

Multiply(Matrix3x2, Single)

返回按标量系数缩放指定矩阵的所有元素后得到的矩阵。Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor.

Negate(Matrix3x2)

通过将其所有值乘以 -1,对指定矩阵求反。Negates the specified matrix by multiplying all its values by -1.

Subtract(Matrix3x2, Matrix3x2)

从第一个矩阵中的每个元素中减去第二个矩阵中的对应元素。Subtracts each element in a second matrix from its corresponding element in a first matrix.

ToString()

返回表示此矩阵的字符串。Returns a string that represents this matrix.

运算符

Addition(Matrix3x2, Matrix3x2)

将一个矩阵中的每个元素与第二个矩阵中的对应元素相加。Adds each element in one matrix with its corresponding element in a second matrix.

Equality(Matrix3x2, Matrix3x2)

返回一个值,该值指示指定矩阵是否相等。Returns a value that indicates whether the specified matrices are equal.

Inequality(Matrix3x2, Matrix3x2)

返回一个值,该值指示指定矩阵是否不相等。Returns a value that indicates whether the specified matrices are not equal.

Multiply(Matrix3x2, Matrix3x2)

返回将两个矩阵相乘得到的矩阵。Returns the matrix that results from multiplying two matrices together.

Multiply(Matrix3x2, Single)

返回按标量系数缩放指定矩阵的所有元素后得到的矩阵。Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor.

Subtraction(Matrix3x2, Matrix3x2)

从第一个矩阵中的每个元素中减去第二个矩阵中的对应元素。Subtracts each element in a second matrix from its corresponding element in a first matrix.

UnaryNegation(Matrix3x2)

通过将其所有值乘以 -1,对指定矩阵求反。Negates the specified matrix by multiplying all its values by -1.

适用于