共用方式為


Vector3D.Multiply 方法

定義

將指定的 Vector3D 結構乘以 DoubleMatrix,並傳回結果。

多載

Multiply(Double, Vector3D)

將指定的純量乘以指定的 Vector3D 結構,並傳回結果做為 Vector3D

Multiply(Vector3D, Double)

將指定的 Vector3D 結構乘以指定的純量,並傳回結果做為 Vector3D

Multiply(Vector3D, Matrix3D)

使用指定的 Vector3D 結構,轉換指定之 Matrix3D 結構的座標空間。

Multiply(Double, Vector3D)

將指定的純量乘以指定的 Vector3D 結構,並傳回結果做為 Vector3D

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

參數

scalar
Double

要相乘的純量。

vector
Vector3D

要相乘的 Vector3D 結構。

傳回

scalarvector 相乘的乘積。

範例

下列範例示範如何將純量乘以 Vector3D 結構。

// Multiplies a Vector3D by a Scalar using the static Multiply method.  
// Returns a Vector3D.

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

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

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

vectorResult = Vector3D.Multiply(vector1, scalar1)
' vectorResult is equal to (1500, 2250, 3000)

另請參閱

適用於

Multiply(Vector3D, Double)

將指定的 Vector3D 結構乘以指定的純量,並傳回結果做為 Vector3D

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

參數

vector
Vector3D

要相乘的 Vector3D 結構。

scalar
Double

要相乘的純量。

傳回

vectorscalar 相乘的乘積。

範例

下列範例示範如何將結構乘 Vector3D 以純量。

// Multiplies a Vector3D by a Scalar using the static Multiply method.  
// Returns a Vector3D.

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

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

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

vectorResult = Vector3D.Multiply(vector1, scalar1)
' vectorResult is equal to (1500, 2250, 3000)

另請參閱

適用於

Multiply(Vector3D, Matrix3D)

使用指定的 Vector3D 結構,轉換指定之 Matrix3D 結構的座標空間。

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

參數

vector
Vector3D

要轉換的 Vector3D 結構。

matrix
Matrix3D

要套用至 Vector3D 結構的轉換。

傳回

傳回依 vector 轉換 matrix3D 的結果。

範例

下列範例示範如何使用 Multiply 方法來依 Matrix3D 結構轉換 Vector3D 結構。

// 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)
' Multiplies a Vector3D by a Matrix3D using the static Multiply method.  
' 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 = Vector3D.Multiply(vector1,matrix1)
' vector Result is equal to (2000, 2000, 2000)

另請參閱

適用於