Export (0) Print
Expand All

Vector3D.Add Method (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 Add(
	Vector3D vector,
	Point3D point
)

Parameters

vector
Type: System.Windows.Media.Media3D.Vector3D
The Vector3D structure used to translate the specified Point3D structure.
point
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 Add method to translate a Point3D structure by a Vector3D structure.


// Translates a Point3D by a Vector3D using the static Add method.  
// Returns a Point3D.

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

pointResult = Vector3D.Add(vector1, point1);
// 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

ADD
Show:
© 2015 Microsoft