Vector3D.Multiply 运算符

定义

将指定的 Vector3D 结构乘以指定的 DoubleMatrix 并返回结果。

重载

Multiply(Vector3D, Matrix3D)

使用指定的 Vector3D 结构转换指定的 Matrix3D 结构的坐标空间。

Multiply(Double, Vector3D)

将指定的标量乘以指定的 Vector3D 结构,并以 Vector3D 的形式返回结果。

Multiply(Vector3D, Double)

将指定的 Vector3D 结构乘以指定的标量,并以 Vector3D 的形式返回结果。

Multiply(Vector3D, Matrix3D)

使用指定的 Vector3D 结构转换指定的 Matrix3D 结构的坐标空间。

public:
 static System::Windows::Media::Media3D::Vector3D operator *(System::Windows::Media::Media3D::Vector3D vector, System::Windows::Media::Media3D::Matrix3D matrix);
public static System.Windows.Media.Media3D.Vector3D operator * (System.Windows.Media.Media3D.Vector3D vector, System.Windows.Media.Media3D.Matrix3D matrix);
static member ( * ) : System.Windows.Media.Media3D.Vector3D * System.Windows.Media.Media3D.Matrix3D -> System.Windows.Media.Media3D.Vector3D
Public Shared Operator * (vector As Vector3D, matrix As Matrix3D) As Vector3D

参数

vector
Vector3D

要转换的 Vector3D 结构。

matrix
Matrix3D

要应用于 Vector3D 结构的转换。

返回

Vector3D

vector 变换 matrix 的结果。

示例

以下示例演示如何使用重载乘法运算符按Matrix3D结构转换Vector3D结构。

// 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)
' Multiplies a Vector3D by a Matrix3D using the overloaded * operator.  
' Returns a Vector3D.

Dim vector1 As New Vector3D(20, 30, 40)
Dim matrix1 As New Matrix3D(10, 10, 10, 0, 20, 20, 20, 0, 30, 30, 30, 0, 5, 10, 15, 1)
Dim vectorResult As New Vector3D()

vectorResult = vector1 * matrix1
' vector Result is equal to (2000, 2000, 2000)

另请参阅

适用于

Multiply(Double, Vector3D)

将指定的标量乘以指定的 Vector3D 结构,并以 Vector3D 的形式返回结果。

public:
 static System::Windows::Media::Media3D::Vector3D operator *(double scalar, System::Windows::Media::Media3D::Vector3D vector);
public static System.Windows.Media.Media3D.Vector3D operator * (double scalar, System.Windows.Media.Media3D.Vector3D vector);
static member ( * ) : double * System.Windows.Media.Media3D.Vector3D -> System.Windows.Media.Media3D.Vector3D
Public Shared Operator * (scalar As Double, vector As Vector3D) As Vector3D

参数

scalar
Double

要乘以的标量。

vector
Vector3D

要相乘的 Vector3D 结构。

返回

Vector3D

scalarvector 相乘的结果。

示例

以下示例演示如何按 Vector3D 结构多个标量。

// Multiplies a Scalar by a Vector3D using the overloaded * operator.  
// Returns a Vector3D.

Vector3D vector1 = new Vector3D(20, 30, 40);
Double scalar1 = 75;
Vector3D vectorResult = new Vector3D();

vectorResult = scalar1 * vector1;
// vectorResult is equal to (1500, 2250, 3000)
' Multiplies a Scalar by a Vector3D using the overloaded * operator.  
' Returns a Vector3D.

Dim vector1 As New Vector3D(20, 30, 40)
Dim scalar1 As Double = 75
Dim vectorResult As New Vector3D()

vectorResult = scalar1 * vector1
' vectorResult is equal to (1500, 2250, 3000)

另请参阅

适用于

Multiply(Vector3D, Double)

将指定的 Vector3D 结构乘以指定的标量,并以 Vector3D 的形式返回结果。

public:
 static System::Windows::Media::Media3D::Vector3D operator *(System::Windows::Media::Media3D::Vector3D vector, double scalar);
public static System.Windows.Media.Media3D.Vector3D operator * (System.Windows.Media.Media3D.Vector3D vector, double scalar);
static member ( * ) : System.Windows.Media.Media3D.Vector3D * double -> System.Windows.Media.Media3D.Vector3D
Public Shared Operator * (vector As Vector3D, scalar As Double) As Vector3D

参数

vector
Vector3D

要相乘的 Vector3D 结构。

scalar
Double

要乘以的标量。

返回

Vector3D

vectorscalar 相乘的结果。

示例

以下示例演示如何将结构乘以 Vector3D 标量。

// Multiplies a Vector3D by a Scalar using the overloaded * operator.  
// Returns a Vector3D.

Vector3D vector1 = new Vector3D(20, 30, 40);
Double scalar1 = 75;
Vector3D vectorResult = new Vector3D();

vectorResult = vector1 * scalar1;
// vectorResult is equal to (1500, 2250, 3000)
' Multiplies a Vector3D by a Scalar using the overloaded * operator.  
' Returns a Vector3D.

Dim vector1 As New Vector3D(20, 30, 40)
Dim scalar1 As Double = 75
Dim vectorResult As New Vector3D()

vectorResult = vector1 * scalar1
' vectorResult is equal to (1500, 2250, 3000)

另请参阅

适用于