Point3D.Multiply Operator (Point3D, Matrix3D)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Transforms the specified Point3D structure by the specified Matrix3D structure.

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

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

Parameters

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

The point to transform.

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

The matrix that is used to transform point.

Return Value

Type: System.Windows.Media.Media3D.Point3D

The result of transforming point by using matrix.

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

                  // Multiplies a Point3D by a Matrix.  
                  // Returns a Point3D.

Point3D point1 = new Point3D(10, 5, 1);
                  Point3D pointResult = new Point3D();
                  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 (235, 240, 245)

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

.NET Framework
Available since 3.0
Return to top
Show: