Point4D.Multiply(Point4D, Matrix3D) 运算符

定义

使用指定的 Point4D 结构转换指定的 Matrix3D 结构。

public:
 static System::Windows::Media::Media3D::Point4D operator *(System::Windows::Media::Media3D::Point4D point, System::Windows::Media::Media3D::Matrix3D matrix);
public static System.Windows.Media.Media3D.Point4D operator * (System.Windows.Media.Media3D.Point4D point, System.Windows.Media.Media3D.Matrix3D matrix);
static member ( * ) : System.Windows.Media.Media3D.Point4D * System.Windows.Media.Media3D.Matrix3D -> System.Windows.Media.Media3D.Point4D
Public Shared Operator * (point As Point4D, matrix As Matrix3D) As Point4D

参数

point
Point4D

要转换的 Point4D 结构。

matrix
Matrix3D

转换 Matrix3D 结构。

返回

返回转换 pointmatrix 的结果。

示例

以下示例演示如何使用重载乘法运算符通过Matrix3D结构转换Point4D结构。

// 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);
' Multiplies a Point4D by a Matrix.  
' Returns a Point4D.

Dim point1 As New Point4D(10, 5, 1, 4)
Dim pointResult As New Point4D()
Dim matrix1 As 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)

适用于

另请参阅