Point3D.Addition(Point3D, Vector3D) 演算子
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
public:
static System::Windows::Media::Media3D::Point3D operator +(System::Windows::Media::Media3D::Point3D point, System::Windows::Media::Media3D::Vector3D vector);
public static System.Windows.Media.Media3D.Point3D operator + (System.Windows.Media.Media3D.Point3D point, System.Windows.Media.Media3D.Vector3D vector);
static member ( + ) : System.Windows.Media.Media3D.Point3D * System.Windows.Media.Media3D.Vector3D -> System.Windows.Media.Media3D.Point3D
Public Shared Operator + (point As Point3D, vector As Vector3D) As Point3D
パラメーター
- point
- Point3D
加算する点。
- vector
- Vector3D
加算するベクター。
戻り値
point
と vector
の合計である Point3D 構造体。
例
次の例は、構造体に構造体を Vector3D 追加する方法を Point3D 示しています。
// Translates a Point3D by a Vector3D using the overloaded + operator.
// Returns a Point3D.
Point3D point1 = new Point3D(10, 5, 1);
Vector3D vector1 = new Vector3D(20, 30, 40);
Point3D pointResult = new Point3D();
pointResult = point1 + vector1;
// point3DResult is equal to (30, 35, 41)
// Displaying Results
syntaxString = "pointResult = point1 + vector1;";
resultType = "Point3D";
operationString = "Adding a 3D Point and a 3D Vector";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);
' Translates a Point3D by a Vector3D using the overloaded + operator.
' Returns a Point3D.
Dim point1 As New Point3D(10, 5, 1)
Dim vector1 As New Vector3D(20, 30, 40)
Dim pointResult As New Point3D()
pointResult = point1 + vector1
' point3DResult is equal to (30, 35, 41)
' Displaying Results
syntaxString = "pointResult = point1 + vector1"
resultType = "Point3D"
operationString = "Adding a 3D Point and a 3D Vector"
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString)
注釈
構造体への Point3D 構造体の Point3D 追加は禁止されています。