Point4D.Multiply(Point4D, Matrix3D) 運算子

定義

使用指定的 Point4D 結構轉換指定的 Matrix3D 結構。

C#
public static System.Windows.Media.Media3D.Point4D operator * (System.Windows.Media.Media3D.Point4D point, System.Windows.Media.Media3D.Matrix3D matrix);

參數

point
Point4D

要轉換的 Point4D 結構。

matrix
Matrix3D

轉換 Matrix3D 結構。

傳回

傳回轉換 pointmatrix 的結果。

範例

下列範例示範如何使用多載乘法運算子,依 Matrix3D 結構轉換 Point4D 結構。

C#
// Multiplies a Point4D by a Matrix.  
// Returns a Point4D.

Point4D point1 = new Point4D(10, 5, 1, 4);
Point4D pointResult = new Point4D();
Matrix3D matrix1 = new Matrix3D(10, 10, 10, 0, 20, 20, 20, 0, 30, 30, 30, 0, 5, 10, 15, 1);

pointResult = point1 * matrix1;
// pointResult is equal to (250, 270, 290, 4)

// Displaying Results
resultType = "Point4D";
syntaxString = "pointResult = point1 * matrix1;";
operationString = "Multiplying a Point4D by a Matrix3D";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

另請參閱