Matrix4x4 Matrix4x4 Matrix4x4 Matrix4x4 Struct

定義

表示一個 4x4 矩陣。Represents a 4x4 matrix.

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)
繼承
實作

備註

針對矩陣轉換,Vector2Vector3Vector4 執行個體會以資料列表示:向量 v 由矩陣 MvM 乘法轉換。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.

建構函式

Matrix4x4(Matrix3x2) Matrix4x4(Matrix3x2) Matrix4x4(Matrix3x2) Matrix4x4(Matrix3x2)

從指定的 Matrix3x2 物件建立 Matrix4x4 物件。Creates a Matrix4x4 object from a specified Matrix3x2 object.

Matrix4x4(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single) Matrix4x4(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single) Matrix4x4(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single) Matrix4x4(Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single, Single)

從指定的元件建立 4x4 矩陣。Creates a 4x4 matrix from the specified components.

欄位

M11 M11 M11 M11

第一列的第一個元素。The first element of the first row.

M12 M12 M12 M12

第一列的第二個元素。The second element of the first row.

M13 M13 M13 M13

第一列的第三個元素。The third element of the first row.

M14 M14 M14 M14

第一列的第四個元素。The fourth element of the first row.

M21 M21 M21 M21

第二列的第一個元素。The first element of the second row.

M22 M22 M22 M22

第二列的第二個元素。The second element of the second row.

M23 M23 M23 M23

第二列的第三個元素。The third element of the second row.

M24 M24 M24 M24

第二列的第四個元素。The fourth element of the second row.

M31 M31 M31 M31

第三列的第一個元素。The first element of the third row.

M32 M32 M32 M32

第三列的第二個元素。The second element of the third row.

M33 M33 M33 M33

第三列的第三個元素。The third element of the third row.

M34 M34 M34 M34

第三列的第四個元素。The fourth element of the third row.

M41 M41 M41 M41

第四列的第一個元素。The first element of the fourth row.

M42 M42 M42 M42

第四列的第二個元素。The second element of the fourth row.

M43 M43 M43 M43

第四列的第三個元素。The third element of the fourth row.

M44 M44 M44 M44

第四列的第四個元素。The fourth element of the fourth row.

屬性

Identity Identity Identity Identity

取得乘法類單位矩陣。Gets the multiplicative identity matrix.

IsIdentity IsIdentity IsIdentity IsIdentity

指出目前的矩陣是否為單位矩陣。Indicates whether the current matrix is the identity matrix.

Translation Translation Translation Translation

取得或設定此矩陣的轉移元件。Gets or sets the translation component of this matrix.

方法

Add(Matrix4x4, Matrix4x4) Add(Matrix4x4, Matrix4x4) Add(Matrix4x4, Matrix4x4) Add(Matrix4x4, Matrix4x4)

將一個矩陣的每個元素和第二個矩陣的相對應元素相加。Adds each element in one matrix with its corresponding element in a second matrix.

CreateBillboard(Vector3, Vector3, Vector3, Vector3) CreateBillboard(Vector3, Vector3, Vector3, Vector3) CreateBillboard(Vector3, Vector3, Vector3, Vector3) CreateBillboard(Vector3, Vector3, Vector3, Vector3)

建立繞著指定物件位置旋轉的球面告示板。Creates a spherical billboard that rotates around a specified object position.

CreateConstrainedBillboard(Vector3, Vector3, Vector3, Vector3, Vector3) CreateConstrainedBillboard(Vector3, Vector3, Vector3, Vector3, Vector3) CreateConstrainedBillboard(Vector3, Vector3, Vector3, Vector3, Vector3) CreateConstrainedBillboard(Vector3, Vector3, Vector3, Vector3, Vector3)

建立繞著指定的軸旋轉的圓柱告示板。Creates a cylindrical billboard that rotates around a specified axis.

CreateFromAxisAngle(Vector3, Single) CreateFromAxisAngle(Vector3, Single) CreateFromAxisAngle(Vector3, Single) CreateFromAxisAngle(Vector3, Single)

建立繞著任意向量旋轉的矩陣。Creates a matrix that rotates around an arbitrary vector.

CreateFromQuaternion(Quaternion) CreateFromQuaternion(Quaternion) CreateFromQuaternion(Quaternion) CreateFromQuaternion(Quaternion)

依據指定的四元數旋轉值建立一個旋轉矩陣。Creates a rotation matrix from the specified Quaternion rotation value.

CreateFromYawPitchRoll(Single, Single, Single) CreateFromYawPitchRoll(Single, Single, Single) CreateFromYawPitchRoll(Single, Single, Single) CreateFromYawPitchRoll(Single, Single, Single)

依據指定的繞 Y 軸旋轉、繞 X 軸旋轉和滾動建立一個旋轉矩陣。Creates a rotation matrix from the specified yaw, pitch, and roll.

CreateLookAt(Vector3, Vector3, Vector3) CreateLookAt(Vector3, Vector3, Vector3) CreateLookAt(Vector3, Vector3, Vector3) CreateLookAt(Vector3, Vector3, Vector3)

建立檢視矩陣。Creates a view matrix.

CreateOrthographic(Single, Single, Single, Single) CreateOrthographic(Single, Single, Single, Single) CreateOrthographic(Single, Single, Single, Single) CreateOrthographic(Single, Single, Single, Single)

依據指定的視圖體維度建立正視透視圖矩陣。Creates an orthographic perspective matrix from the given view volume dimensions.

CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single) CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single) CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single) CreateOrthographicOffCenter(Single, Single, Single, Single, Single, Single)

建立自訂的正視投影矩陣。Creates a customized orthographic projection matrix.

CreatePerspective(Single, Single, Single, Single) CreatePerspective(Single, Single, Single, Single) CreatePerspective(Single, Single, Single, Single) CreatePerspective(Single, Single, Single, Single)

依據指定的視圖體維度建立透視圖投影矩陣。Creates a perspective projection matrix from the given view volume dimensions.

CreatePerspectiveFieldOfView(Single, Single, Single, Single) CreatePerspectiveFieldOfView(Single, Single, Single, Single) CreatePerspectiveFieldOfView(Single, Single, Single, Single) CreatePerspectiveFieldOfView(Single, Single, Single, Single)

根據視野、外觀比例以及附近的和遠離檢視平面距離來建立透視圖投影矩陣。Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances.

CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single) CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single) CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single) CreatePerspectiveOffCenter(Single, Single, Single, Single, Single, Single)

建立自訂的透視圖投影矩陣。Creates a customized perspective projection matrix.

CreateReflection(Plane) CreateReflection(Plane) CreateReflection(Plane) CreateReflection(Plane)

建立反映指定平面之座標系統的矩陣。Creates a matrix that reflects the coordinate system about a specified plane.

CreateRotationX(Single) CreateRotationX(Single) CreateRotationX(Single) CreateRotationX(Single)

建立會讓點繞著 X 軸旋轉的矩陣。Creates a matrix for rotating points around the X axis.

CreateRotationX(Single, Vector3) CreateRotationX(Single, Vector3) CreateRotationX(Single, Vector3) CreateRotationX(Single, Vector3)

建立會讓點從中心點繞著 X 軸旋轉的矩陣。Creates a matrix for rotating points around the X axis from a center point.

CreateRotationY(Single, Vector3) CreateRotationY(Single, Vector3) CreateRotationY(Single, Vector3) CreateRotationY(Single, Vector3)

以弧度為單位的數量,從中心點依此弧度來繞著 Y 軸旋轉。The amount, in radians, by which to rotate around the Y axis from a center point.

CreateRotationY(Single) CreateRotationY(Single) CreateRotationY(Single) CreateRotationY(Single)

建立會讓點繞著 Y 軸旋轉的矩陣。Creates a matrix for rotating points around the Y axis.

CreateRotationZ(Single) CreateRotationZ(Single) CreateRotationZ(Single) CreateRotationZ(Single)

建立會讓點繞著 Z 軸旋轉的矩陣。Creates a matrix for rotating points around the Z axis.

CreateRotationZ(Single, Vector3) CreateRotationZ(Single, Vector3) CreateRotationZ(Single, Vector3) CreateRotationZ(Single, Vector3)

建立會讓點從中心點繞著 Z 軸旋轉的矩陣。Creates a matrix for rotating points around the Z axis from a center point.

CreateScale(Vector3) CreateScale(Vector3) CreateScale(Vector3) CreateScale(Vector3)

從指定的向量縮放比例建立縮放矩陣。Creates a scaling matrix from the specified vector scale.

CreateScale(Single) CreateScale(Single) CreateScale(Single) CreateScale(Single)

建立統一的縮放矩陣,在每個座標軸上以相同比例縮放。Creates a uniform scaling matrix that scale equally on each axis.

CreateScale(Vector3, Vector3) CreateScale(Vector3, Vector3) CreateScale(Vector3, Vector3) CreateScale(Vector3, Vector3)

針對中心點建立縮放矩陣。Creates a scaling matrix with a center point.

CreateScale(Single, Vector3) CreateScale(Single, Vector3) CreateScale(Single, Vector3) CreateScale(Single, Vector3)

建立統一的縮放矩陣,在每個座標軸上針對中心點以相同比例縮放。Creates a uniform scaling matrix that scales equally on each axis with a center point.

CreateScale(Single, Single, Single) CreateScale(Single, Single, Single) CreateScale(Single, Single, Single) CreateScale(Single, Single, Single)

從指定的 X、Y 和 Z 元件建立縮放矩陣。Creates a scaling matrix from the specified X, Y, and Z components.

CreateScale(Single, Single, Single, Vector3) CreateScale(Single, Single, Single, Vector3) CreateScale(Single, Single, Single, Vector3) CreateScale(Single, Single, Single, Vector3)

建立依指定中心點位移的縮放矩陣。Creates a scaling matrix that is offset by a given center point.

CreateShadow(Vector3, Plane) CreateShadow(Vector3, Plane) CreateShadow(Vector3, Plane) CreateShadow(Vector3, Plane)

建立會將幾何簡維成指定平面的矩陣,就像從指定光源投射的陰影一樣。Creates a matrix that flattens geometry into a specified plane as if casting a shadow from a specified light source.

CreateTranslation(Vector3) CreateTranslation(Vector3) CreateTranslation(Vector3) CreateTranslation(Vector3)

從指定的三維向量建立轉移矩陣。Creates a translation matrix from the specified 3-dimensional vector.

CreateTranslation(Single, Single, Single) CreateTranslation(Single, Single, Single) CreateTranslation(Single, Single, Single) CreateTranslation(Single, Single, Single)

從指定的 X、Y 和 Z 元件建立轉移矩陣。Creates a translation matrix from the specified X, Y, and Z components.

CreateWorld(Vector3, Vector3, Vector3) CreateWorld(Vector3, Vector3, Vector3) CreateWorld(Vector3, Vector3, Vector3) CreateWorld(Vector3, Vector3, Vector3)

使用指定的參數建立世界矩陣。Creates a world matrix with the specified parameters.

Decompose(Matrix4x4, Vector3, Quaternion, Vector3) Decompose(Matrix4x4, Vector3, Quaternion, Vector3) Decompose(Matrix4x4, Vector3, Quaternion, Vector3) Decompose(Matrix4x4, Vector3, Quaternion, Vector3)

嘗試從指定的縮放、旋轉或轉移矩陣中擷取縮放、轉移和旋轉元件。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.

Equals(Matrix4x4) Equals(Matrix4x4) Equals(Matrix4x4) Equals(Matrix4x4)

傳回值,這個值指出此執行個體和另一個 4x4 矩陣是否相等。Returns a value that indicates whether this instance and another 4x4 matrix are equal.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

傳回值,這個值指出此執行個體和指定的物件是否相等。Returns a value that indicates whether this instance and a specified object are equal.

GetDeterminant() GetDeterminant() GetDeterminant() GetDeterminant()

計算目前的 4x4 矩陣的行列式。Calculates the determinant of the current 4x4 matrix.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回這個執行個體的雜湊碼。Returns the hash code for this instance.

Invert(Matrix4x4, Matrix4x4) Invert(Matrix4x4, Matrix4x4) Invert(Matrix4x4, Matrix4x4) Invert(Matrix4x4, Matrix4x4)

反轉指定的矩陣。Inverts the specified matrix. 指示作業是否成功的傳回值。The return value indicates whether the operation succeeded.

Lerp(Matrix4x4, Matrix4x4, Single) Lerp(Matrix4x4, Matrix4x4, Single) Lerp(Matrix4x4, Matrix4x4, Single) Lerp(Matrix4x4, Matrix4x4, 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(Matrix4x4, Matrix4x4) Multiply(Matrix4x4, Matrix4x4) Multiply(Matrix4x4, Matrix4x4) Multiply(Matrix4x4, Matrix4x4)

傳回兩個矩陣一起相乘所產生的矩陣。Returns the matrix that results from multiplying two matrices together.

Multiply(Matrix4x4, Single) Multiply(Matrix4x4, Single) Multiply(Matrix4x4, Single) Multiply(Matrix4x4, Single)

傳回矩陣,該矩陣為依據純量因數縮放指定矩陣之所有元素而產生。Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor.

Negate(Matrix4x4) Negate(Matrix4x4) Negate(Matrix4x4) Negate(Matrix4x4)

將指定矩陣的所有值乘以 -1,對其變換正負號。Negates the specified matrix by multiplying all its values by -1.

Subtract(Matrix4x4, Matrix4x4) Subtract(Matrix4x4, Matrix4x4) Subtract(Matrix4x4, Matrix4x4) Subtract(Matrix4x4, Matrix4x4)

將第二個矩陣中的每個元素減去第一個矩陣中相對應的元素。Subtracts each element in a second matrix from its corresponding element in a first matrix.

ToString() ToString() ToString() ToString()

傳回表示這個矩陣的字串。Returns a string that represents this matrix.

Transform(Matrix4x4, Quaternion) Transform(Matrix4x4, Quaternion) Transform(Matrix4x4, Quaternion) Transform(Matrix4x4, Quaternion)

套用指定的四元數旋轉來轉換指定的矩陣。Transforms the specified matrix by applying the specified Quaternion rotation.

Transpose(Matrix4x4) Transpose(Matrix4x4) Transpose(Matrix4x4) Transpose(Matrix4x4)

轉置矩陣的列和行。Transposes the rows and columns of a matrix.

運算子

Addition(Matrix4x4, Matrix4x4) Addition(Matrix4x4, Matrix4x4) Addition(Matrix4x4, Matrix4x4) Addition(Matrix4x4, Matrix4x4)

將一個矩陣的每個元素和第二個矩陣的相對應元素相加。Adds each element in one matrix with its corresponding element in a second matrix.

Equality(Matrix4x4, Matrix4x4) Equality(Matrix4x4, Matrix4x4) Equality(Matrix4x4, Matrix4x4) Equality(Matrix4x4, Matrix4x4)

傳回值,指出指定的矩陣是否相等。Returns a value that indicates whether the specified matrices are equal.

Inequality(Matrix4x4, Matrix4x4) Inequality(Matrix4x4, Matrix4x4) Inequality(Matrix4x4, Matrix4x4) Inequality(Matrix4x4, Matrix4x4)

傳回值,指出指定的矩陣是否不相等。Returns a value that indicates whether the specified matrices are not equal.

Multiply(Matrix4x4, Single) Multiply(Matrix4x4, Single) Multiply(Matrix4x4, Single) Multiply(Matrix4x4, Single)

傳回矩陣,該矩陣為依據純量因數縮放指定矩陣之所有元素而產生。Returns the matrix that results from scaling all the elements of a specified matrix by a scalar factor.

Multiply(Matrix4x4, Matrix4x4) Multiply(Matrix4x4, Matrix4x4) Multiply(Matrix4x4, Matrix4x4) Multiply(Matrix4x4, Matrix4x4)

傳回兩個矩陣一起相乘所產生的矩陣。Returns the matrix that results from multiplying two matrices together.

Subtraction(Matrix4x4, Matrix4x4) Subtraction(Matrix4x4, Matrix4x4) Subtraction(Matrix4x4, Matrix4x4) Subtraction(Matrix4x4, Matrix4x4)

將第二個矩陣中的每個元素減去第一個矩陣中相對應的元素。Subtracts each element in a second matrix from its corresponding element in a first matrix.

UnaryNegation(Matrix4x4) UnaryNegation(Matrix4x4) UnaryNegation(Matrix4x4) UnaryNegation(Matrix4x4)

將指定矩陣的所有值乘以 -1,對其變換正負號。Negates the specified matrix by multiplying all its values by -1.

適用於