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
)

Parameters

vector
Type: System.Windows.Media.Media3D.Vector3D

The Vector3D structure to transform.

matrix
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.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft