Multiply Operator (Vector3D, Matrix3D)
Collapse the table of content
Expand the table of content

Vector3D.Multiply Operator (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 operator *(
	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

The result of transforming vector by matrix.

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

// Multiplies a Vector3D by a Matrix3D using the overloaded * operator.  
// 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 = vector1 * matrix1;
// vector Result is equal to (2000, 2000, 2000)

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft