Vector3D.Multiply 運算子

定義

將指定的 Vector3D 結構乘以 DoubleMatrix,並傳回結果。Multiplies the specified Vector3D structure by the specified Double or Matrix and returns the result.

多載

Multiply(Vector3D, Matrix3D)

使用指定的 Vector3D 結構,轉換指定之 Matrix3D 結構的座標空間。Transforms the coordinate space of the specified Vector3D structure using the specified Matrix3D structure.

Multiply(Double, Vector3D)

將指定的純量乘以指定的 Vector3D 結構,並傳回結果做為 Vector3DMultiplies the specified scalar by the specified Vector3D structure and returns the result as a Vector3D.

Multiply(Vector3D, Double)

將指定的 Vector3D 結構乘以指定的純量,並傳回結果做為 Vector3DMultiplies the specified Vector3D structure by the specified scalar and returns the result as a Vector3D.

Multiply(Vector3D, Matrix3D)

使用指定的 Vector3D 結構,轉換指定之 Matrix3D 結構的座標空間。Transforms the coordinate space of the specified Vector3D structure using the specified Matrix3D structure.

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 結構。The Vector3D structure to transform.

matrix
Matrix3D

要套用至 Vector3D 結構的轉換。The transformation to apply to the Vector3D structure.

傳回

vector 轉換 matrix 的結果。The result of transforming vector by matrix.

範例

下列範例示範如何使用多載的乘法運算子, 透過Vector3D Matrix3D結構來轉換結構。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)
' 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 結構,並傳回結果做為 Vector3DMultiplies the specified scalar by the specified Vector3D structure and returns the result as a 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

要相乘的純量。The scalar to multiply.

vector
Vector3D

要相乘的 Vector3D 結構。The Vector3D structure to multiply.

傳回

scalarvector 相乘的乘積。The result of multiplying scalar and vector.

範例

下列範例示範如何透過Vector3D結構來多個純量。The following example shows how to multiple a scalar by a Vector3D structure.

// 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 結構乘以指定的純量,並傳回結果做為 Vector3DMultiplies the specified Vector3D structure by the specified scalar and returns the result as a 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 結構。The Vector3D structure to multiply.

scalar
Double

要相乘的純量。The scalar to multiply.

傳回

vectorscalar 相乘的乘積。The result of multiplying vector and scalar.

範例

下列範例顯示如何將Vector3D結構乘以純量。The following example shows how to multiply a Vector3D structure by a scalar.

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

另請參閱

適用於