This documentation is archived and is not being maintained.

Vector3D.Multiply Method (Vector3D, Matrix3D)

Transforms the coordinate space of the specified Vector3D structure using the specified Matrix3D structure.

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

public static Vector3D Multiply(
	Vector3D vector,
	Matrix3D matrix


Type: System.Windows.Media.Media3D.Vector3D
The Vector3D structure to transform.
Type: System.Windows.Media.Media3D.Matrix3D
The transformation to apply to the Vector3D structure.

Return Value

Type: System.Windows.Media.Media3D.Vector3D
Returns the result of transforming vector by matrix3D.

The following example shows how to use the Multiply method to transform a Vector3D structure by a Matrix3D structure.

// 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)

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.