Point3D.Addition(Point3D, Vector3D) Operatore

Definizione

Somma una struttura a una Point3D struttura Vector3D e restituisce il risultato sotto forma di struttura Point3D.Adds a Point3D structure to a Vector3D and returns the result as a Point3D structure.

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

Parametri

point
Point3D

Punto da sommare.The point to add.

vector
Vector3D

Vettore da sommare.The vector to add.

Restituisce

Point3D

Struttura Point3D che rappresenta la somma di point e vector.A Point3D structure that is the sum of point and vector.

Esempio

Nell'esempio seguente viene illustrato come aggiungere una Vector3D struttura a una Point3D struttura.The following example shows how to add a Vector3D structure to a Point3D structure.

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

Commenti

Non Point3D è consentito aggiungere una struttura a una Point3D struttura.Adding a Point3D structure to a Point3D structure is prohibited.

Si applica a

Vedi anche