Point4D.Addition(Point4D, Point4D) 演算子

定義

Point4D 構造体を Point4D に加算します。

public:
 static System::Windows::Media::Media3D::Point4D operator +(System::Windows::Media::Media3D::Point4D point1, System::Windows::Media::Media3D::Point4D point2);
public static System.Windows.Media.Media3D.Point4D operator + (System.Windows.Media.Media3D.Point4D point1, System.Windows.Media.Media3D.Point4D point2);
static member ( + ) : System.Windows.Media.Media3D.Point4D * System.Windows.Media.Media3D.Point4D -> System.Windows.Media.Media3D.Point4D
Public Shared Operator + (point1 As Point4D, point2 As Point4D) As Point4D

パラメーター

point1
Point4D

最初に加算する Point4D 構造体。

point2
Point4D

加算対象の 2 番目の Point4D 構造体。

戻り値

Point4D

point1point2 の合計が返されます。

次の例は、オーバーロードされた加算演算子を使用して 2 つの Point4D 構造体を追加する方法を示しています。

                       // Add a Point4D to a Point4D using the static Add method.
                       // Returns a Point4D.

                       Point4D point1 = new Point4D(10, 5, 1, 4);
                       Point4D point2 = new Point4D(15, 40, 60, 75);
                       Point4D pointResult = new Point4D();

                       pointResult = Point4D.Add(point1, point2);
                       // pointResult is equal to (25, 45, 61, 79)

                       // Displaying Results
                       syntaxString = "pointResult = Point4D.Add(point1, point2);";
                       resultType = "Point4D";
                       operationString = "Adding a 3D Point and a 3D Vector";
                       ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);
' Add a Point4D to a Point4D using the static Add method.
' Returns a Point4D.

Dim point1 As New Point4D(10, 5, 1, 4)
Dim point2 As New Point4D(15, 40, 60, 75)
Dim pointResult As New Point4D()

pointResult = Point4D.Add(point1, point2)
' pointResult is equal to (25, 45, 61, 79)

' Displaying Results
syntaxString = "pointResult = Point4D.Add(point1, point2)"
resultType = "Point4D"
operationString = "Adding a 3D Point and a 3D Vector"
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString)

適用対象

こちらもご覧ください