# Matrix3D 結構

## 定義

``public value class Matrix3D : IFormattable``
``````[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Matrix3DConverter))]
[System.Serializable]
public struct Matrix3D : IFormattable``````
``````type Matrix3D = struct
interface IFormattable``````
``````Public Structure Matrix3D
Implements IFormattable``````

Matrix3D

## 範例

``````// Multiplies a Vector3D by a Matrix3D using the static Multiply method.
// Returns a Vector3D.

Vector3D vector1 = new Vector3D(20, 30, 40);
Matrix3D matrix1 = new Matrix3D(10, 10, 10, 0, 20, 20, 20, 0, 30, 30, 30, 0, 5, 10, 15, 1);
Vector3D vectorResult = new Vector3D();

vectorResult = Vector3D.Multiply(vector1,matrix1);
// vector Result is equal to (2000, 2000, 2000)
``````
``````' Multiplies a Vector3D by a Matrix3D using the static Multiply method.
' Returns a Vector3D.

Dim vector1 As New Vector3D(20, 30, 40)
Dim matrix1 As New Matrix3D(10, 10, 10, 0, 20, 20, 20, 0, 30, 30, 30, 0, 5, 10, 15, 1)
Dim vectorResult As New Vector3D()

vectorResult = Vector3D.Multiply(vector1,matrix1)
' vector Result is equal to (2000, 2000, 2000)
``````

## 備註

Matrix3D 的資料列向量語法如下：Matrix3D has the following row-vector syntax:

M11 M12 M13 M14
M21 M22 M23 M24
M31 M32 M33 M34
OffsetX OffsetY OffsetZ M44

### XAML Attribute UsageXAML Attribute Usage

``````<object property="m11, m12, m13, m21, m22, m23, m31, m32, m33, offsetX, offsetY, offsetZ"/>
- or -
<object property="Identity"/>
``````

M11M11
System.Double

M12M12
System.Double

M13M13
System.Double

M14M14
System.Double

M21M21
System.Double

M22M22
System.Double

M23M23
System.Double

M24M24
System.Double

M31M31
System.Double

M32M32
System.Double

M33M33
System.Double

M34M34
System.Double

M44M44
System.Double

offsetXoffsetX
System.Double

offsetYoffsetY
System.Double

offsetZoffsetZ
System.Double

## 建構函式

 用於設定矩陣初始值的建構函式。Constructor that sets matrix's initial values.

## 屬性

 擷取這個 Matrix3D 結構的行列式。Retrieves the determinant of this Matrix3D structure. 取得值，這個值表示這個 Matrix3D 是否可以反轉。Gets a value that indicates whether this Matrix3D is invertible. 將 Matrix3D 結構變更為單位 Matrix3D。Changes a Matrix3D structure into an identity Matrix3D. 取得值，這個值表示這個 Matrix3D 結構是否為仿射。Gets a value that indicates whether this Matrix3D structure is affine. 判斷這個 Matrix3D 結構是否為單位 Matrix3D。Determines whether this Matrix3D structure is an identity Matrix3D. 取得或設定這個 Matrix3D 之結構第一列第一行的值。Gets or sets the value of the first row and first column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第一列第二行的值。Gets or sets the value of the first row and second column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第一列第三欄的值。Gets or sets the value of the first row and third column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第一列第四欄的值。Gets or sets the value of the first row and fourth column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第二列第一行的值。Gets or sets the value of the second row and first column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第二列第二行的值。Gets or sets the value of the second row and second column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第二列第三欄的值。Gets or sets the value of the second row and third column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第二列第四欄的值。Gets or sets the value of the second row and fourth column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第三列第一行的值。Gets or sets the value of the third row and first column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第三列第二行的值。Gets or sets the value of the third row and second column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第三列第三欄的值。Gets or sets the value of the third row and third column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第三列第四欄的值。Gets or sets the value of the third row and fourth column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第四列第四欄的值。Gets or sets the value of the fourth row and fourth column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第四列第一欄的值。Gets or sets the value of the fourth row and first column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第四列第二欄的值。Gets or sets the value of the fourth row and second column of this Matrix3D structure. 取得或設定這個 Matrix3D 結構之第四列第三欄的值。Gets or sets the value of the fourth row and third column of this Matrix3D structure.

## 方法

 在目前的矩陣之後加上指定的矩陣。Appends a specified matrix to the current matrix. 測試兩個矩陣之間是否相等。Tests equality between two matrices. 測試兩個矩陣之間是否相等。Tests equality between two matrices. 測試兩個矩陣之間是否相等。Tests equality between two matrices. 傳回這個矩陣的雜湊碼。Returns the hash code for this matrix. 反轉這個 Matrix3D 結構。Inverts this Matrix3D structure. 將指定的矩陣相乘。Multiplies the specified matrices. 將 Matrix3D 結構的字串表示轉換為對等的 Matrix3D 結構。Converts a string representation of a Matrix3D structure into the equivalent Matrix3D structure. 在目前矩陣之前加上指定的矩陣。Prepends a specified matrix to the current matrix. 在目前的 Matrix3D 之後加上旋轉轉換。Appends a rotation transform to the current Matrix3D. 繞著指定的 Matrix3D 旋轉 Point3D。Rotates this Matrix3D about the specified Point3D. 在這個 Point3D 結構之前，加上繞著指定的中心 Matrix3D 的旋轉。Prepends a rotation about a specified center Point3D to this Matrix3D structure. 在這個 Quaternion 結構之前加上 Matrix3D 所指定的旋轉。Prepends a rotation specified by a Quaternion to this Matrix3D structure. 在這個 Vector3D 結構之前加上指定的縮放 Matrix3D。Appends the specified scale Vector3D to this Matrix3D structure. 繞著指定的 Matrix3D，依指定的 Vector3D 縮放這個 Point3D 結構。Scales this Matrix3D structure by the specified Vector3D about the specified Point3D. 在這個 Point3D 結構之前，加上繞著指定的 Matrix3D 的縮放。Prepends the specified scale transformation about the specified Point3D to this Matrix3D structure. 在目前的 Matrix3D 結構之前加上指定的縮放 Vector3D。Prepends the specified scale Vector3D to the current Matrix3D structure. 將這個 Matrix3D 結構變更為單位矩陣。Changes this Matrix3D structure into an identity matrix. 建立這個 Matrix3D 結構字串表示。Creates a string representation of this Matrix3D structure. 建立這個 Matrix3D 結構字串表示。Creates a string representation of this Matrix3D structure. 依 Point3D 轉換指定的 Matrix3D 並傳回結果。Transforms the specified Point3D by the Matrix3D and returns the result. 依 Point3D 轉換陣列中的所指定 Matrix3D。Transforms the specified Point3D objects in the array by the Matrix3D. 依 Point4D 轉換指定的 Matrix3D 並傳回結果。Transforms the specified Point4D by the Matrix3D and returns the result. 依 Point4D 轉換陣列中的所指定 Matrix3D 並傳回結果。Transforms the specified Point4D objects in the array by the Matrix3D and returns the result. 依這個 Vector3D 轉換指定的 Matrix3D。Transforms the specified Vector3D by this Matrix3D. 依這個 Vector3D 轉換陣列中的所指定 Matrix3D。Transforms the specified Vector3D objects in the array by this Matrix3D. 在目前的 Matrix3D 結構之後加上所指定位移的平移。Appends a translation of the specified offset to the current Matrix3D structure. 在這個 Matrix3D 結構之前加上所指定位移的平移。Prepends a translation of the specified offset to this Matrix3D structure.

## 運算子

 比較兩個 Matrix3D 執行個體是否完全相等。Compares two Matrix3D instances for exact equality. 比較兩個 Matrix3D 執行個體是否完全不相等。Compares two Matrix3D instances for exact inequality. 將指定的矩陣相乘。Multiplies the specified matrices.

## 明確介面實作

 使用指定的格式，格式化目前執行個體的值。Formats the value of the current instance using the specified format.