# Matrix4x4 结构

## 定义

``public value class Matrix4x4 : IEquatable<System::Numerics::Matrix4x4>``
``public struct Matrix4x4 : IEquatable<System.Numerics.Matrix4x4>``
``type Matrix4x4 = struct``
``````Public Structure Matrix4x4
Implements IEquatable(Of Matrix4x4)``````

Matrix4x4

## 构造函数

 从指定的 Matrix3x2 对象创建 Matrix4x4 对象。Creates a Matrix4x4 object from a specified Matrix3x2 object. 从指定分量创建 4x4 矩阵。Creates a 4x4 matrix from the specified components.

## 字段

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

## 属性

 获取乘法单位矩阵。Gets the multiplicative identity matrix. 指示当前矩阵是否为单位矩阵。Indicates whether the current matrix is the identity matrix. 获取或设置此矩阵的平移分量。Gets or sets the translation component of this matrix.

## 方法

 将一个矩阵中的每个元素与第二个矩阵中的对应元素相加。Adds each element in one matrix with its corresponding element in a second matrix. 创建围绕指定对象位置旋转的球状宣传位置。Creates a spherical billboard that rotates around a specified object position. 创建围绕指定轴旋转的圆柱宣传位置。Creates a cylindrical billboard that rotates around a specified axis. 创建围绕任意向量旋转的矩阵。Creates a matrix that rotates around an arbitrary vector. 从指定四元数旋转值创建旋转矩阵。Creates a rotation matrix from the specified Quaternion rotation value. 从指定的绕 Y 轴旋转、绕 X 轴旋转和绕 Z 轴旋转创建旋转矩阵。Creates a rotation matrix from the specified yaw, pitch, and roll. 创建视图矩阵。Creates a view matrix. 从给定视图体维度创建正交透视矩阵。Creates an orthographic perspective matrix from the given view volume dimensions. 创建自定义正交投影矩阵。Creates a customized orthographic projection matrix. 从给定视图体维度创建透视投影矩阵。Creates a perspective projection matrix from the given view volume dimensions. 基于视野、纵横比以及近和远视图平面距离创建透视投影矩阵。Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances. 创建自定义透视投影矩阵。Creates a customized perspective projection matrix. 创建围绕指定平面反射坐标系统的矩阵。Creates a matrix that reflects the coordinate system about a specified plane. 创建用于围绕 X 轴旋转的矩阵。Creates a matrix for rotating points around the X axis. 创建用于从中心点围绕 X 轴旋转的矩阵。Creates a matrix for rotating points around the X axis from a center point. 创建用于围绕 Y 轴旋转的矩阵。Creates a matrix for rotating points around the Y axis. 要从中心点围绕 Y 轴旋转的量（以弧度表示）。The amount, in radians, by which to rotate around the Y axis from a center point. 创建用于围绕 Z 轴旋转的矩阵。Creates a matrix for rotating points around the Z axis. 创建用于从中心点围绕 Z 轴旋转的矩阵。Creates a matrix for rotating points around the Z axis from a center point. 创建在每个轴上均匀缩放的统一缩放矩阵。Creates a uniform scaling matrix that scale equally on each axis. 从指定 X、Y 和 Z 分量创建缩放矩阵。Creates a scaling matrix from the specified X, Y, and Z components. 创建按给定中心点偏移的缩放矩阵。Creates a scaling matrix that is offset by a given center point. 创建具有中心点并且在每个轴上均匀缩放的统一缩放矩阵。Creates a uniform scaling matrix that scales equally on each axis with a center point. 从指定向量比例创建缩放矩阵。Creates a scaling matrix from the specified vector scale. 创建具有中心点的缩放矩阵。Creates a scaling matrix with a center point. 创建将几何图形平展到指定平面中（如同从指定光源进行投影）的矩阵。Creates a matrix that flattens geometry into a specified plane as if casting a shadow from a specified light source. 从指定 X、Y 和 Z 分量创建平移矩阵。Creates a translation matrix from the specified X, Y, and Z components. 从指定三维向量创建平移矩阵。Creates a translation matrix from the specified 3-dimensional vector. 使用指定参数创建世界矩阵。Creates a world matrix with the specified parameters. 尝试从给定缩放、旋转或平移矩阵中提取缩放、平移和旋转分量。Attempts to extract the scale, translation, and rotation components from the given scale, rotation, or translation matrix. 返回值指示操作是否成功。The return value indicates whether the operation succeeded. 返回一个值，该值指示此实例是否与另一个 4x4 矩阵相等。Returns a value that indicates whether this instance and another 4x4 matrix are equal. 返回一个值，该值指示此实例是否与指定对象相等。Returns a value that indicates whether this instance and a specified object are equal. 计算当前 4x4 矩阵的行列式。Calculates the determinant of the current 4x4 matrix. 返回此实例的哈希代码。Returns the hash code for this instance. 对指定矩阵求逆。Inverts the specified matrix. 返回值指示操作是否成功。The return value indicates whether the operation succeeded. 基于指定第二个矩阵的权重的值，从一个矩阵向第二个矩阵执行线性内插。Performs a linear interpolation from one matrix to a second matrix based on a value that specifies the weighting of the second matrix. 返回将两个矩阵相乘得到的矩阵。Returns the matrix that results from multiplying two matrices together. 返回按标量系数缩放指定矩阵的所有元素后得到的矩阵。Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor. 通过将其所有值乘以 -1，对指定矩阵求反。Negates the specified matrix by multiplying all its values by -1. 从第一个矩阵中的每个元素中减去第二个矩阵中的对应元素。Subtracts each element in a second matrix from its corresponding element in a first matrix. 返回表示此矩阵的字符串。Returns a string that represents this matrix. 通过应用指定四元数旋转来转换指定矩阵。Transforms the specified matrix by applying the specified Quaternion rotation. 转置矩阵的行和列。Transposes the rows and columns of a matrix.

## 运算符

 将一个矩阵中的每个元素与第二个矩阵中的对应元素相加。Adds each element in one matrix with its corresponding element in a second matrix. 返回一个值，该值指示指定矩阵是否相等。Returns a value that indicates whether the specified matrices are equal. 返回一个值，该值指示指定矩阵是否不相等。Returns a value that indicates whether the specified matrices are not equal. 返回将两个矩阵相乘得到的矩阵。Returns the matrix that results from multiplying two matrices together. 返回按标量系数缩放指定矩阵的所有元素后得到的矩阵。Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor. 从第一个矩阵中的每个元素中减去第二个矩阵中的对应元素。Subtracts each element in a second matrix from its corresponding element in a first matrix. 通过将其所有值乘以 -1，对指定矩阵求反。Negates the specified matrix by multiplying all its values by -1.