Export (0) Print
Expand All

Vector3D Constructor

Initializes a new instance of a Vector3D structure.

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

public Vector3D(
	double x,
	double y,
	double z
)
You cannot use constructors in XAML.

Parameters

x
Type: System.Double

The new Vector3D structure's X value.

y
Type: System.Double

The new Vector3D structure's Y value.

z
Type: System.Double

The new Vector3D structure's Z value.

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft