Addition Operator (Vector3D, Point3D)
Collapse the table of content
Expand the table of content

Vector3D.Addition Operator (Vector3D, Point3D)

Translates the specified Point3D structure by the specified Vector3D structure and returns the result as a Point3D structure.

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

public static Point3D operator +(
	Vector3D vector,
	Point3D point


Type: System.Windows.Media.Media3D.Vector3D
The Vector3D structure used to translate the specified Point3D structure.
Type: System.Windows.Media.Media3D.Point3D
The Point3D structure to be translated.

Return Value

Type: System.Windows.Media.Media3D.Point3D
The result of translating point by vector.

The following example shows how to use the overloaded addition operator to translate a Point3D structure by a Vector3D structure.

                        // Translates a Point3D by a Vector3D using the overloaded + operator.  
                        // Returns a Point3D.

                        Vector3D vector1 = new Vector3D(20, 30, 40);
                        Point3D point1 = new Point3D(10, 5, 1);
                        Point3D pointResult = new Point3D();

                        pointResult = point1 + vector1;
                        // vectorResult is equal to (30, 35, 41)

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

© 2015 Microsoft