Vector3D Constructor (Double, Double, Double)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
)

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)

.NET Framework
Available since 3.0
Return to top
Show: