Export (0) Print
Expand All

Point3D.Addition Operator

Adds a Point3D structure to a Vector3D and returns the result as a Point3D structure.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static Point3D operator +(
	Point3D point,
	Vector3D vector


Type: System.Windows.Media.Media3D.Point3D

The point to add.

Type: System.Windows.Media.Media3D.Vector3D

The vector to add.

Return Value

Type: System.Windows.Media.Media3D.Point3D
A Point3D structure that is the sum of point and vector.

Adding a Point3D structure to a Point3D structure is prohibited.

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

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft