Point4D.Multiply Operator (Point4D, Matrix3D)

 

Transforms the specified Point4D structure by the specified Matrix3D structure.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static Point4D operator *(
	Point4D point,
	Matrix3D matrix
)

Parameters

point
Type: System.Windows.Media.Media3D.Point4D

The Point4D structure to transform.

matrix
Type: System.Windows.Media.Media3D.Matrix3D

The transformation Matrix3D structure.

Return Value

Type: System.Windows.Media.Media3D.Point4D

Returns the result of transforming point and matrix.

The following example shows how to use the overloaded multiplication operator to transform a Point4D structure by a Matrix3D structure.

                  // 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
Available since 3.0
Return to top
Show: