Represents an x-, y-, and z-coordinate point in 3-D space.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
In XAML, the delimiter between the values of a can be either a comma or a space.
Some cultures might use the comma character as the decimal delimiter instead of the period character. XAML processing for invariant culture defaults to en-US in most XAML processor implementations, and expects the period to be the decimal delimiter. You should avoid using the comma character as the decimal delimiter if specifying a in XAML, because that will clash with the string type conversion of a attribute value into its components.
The following code illustrates how to use the subtraction methods. First, the structures and the Vector3D structures are instantiated. The structures are subtracted using the overloaded - operator and then they are subtracted using the static Subtract method. Next, the Vector3D structure is subtracted from the first structure using the static Subtract method, and finally the structure is subtract from the Vector3D using the overloaded - operator.
// instantiate variables Point3D point1 = new Point3D(); Point3D point2 = new Point3D(15, 40, 60); Vector3D vector1 = new Vector3D(20, 30, 40); Point3D pointResult1 = new Point3D(); Point3D pointResult2 = new Point3D(); Vector3D vectorResult1 = new Vector3D(); Vector3D vectorResult2 = new Vector3D(); // defining x,y,z of point1 point1.X = 10; point1.Y = 5; point1.Z = 1; vectorResult1 = Point3D.Subtract(point1, point2); // vectorResult1 is equal to (-5, -35, -59) vectorResult2 = point2 - point1; // vectorResult2 is equal to (5, 35, 59) pointResult1 = Point3D.Subtract(point1, vector1); // pointResult1 is equal to (-10, -25, -39) pointResult2 = vector1 - point1; // pointResult2 is equal to (10, 25, 39)
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.