Point4D Structure
Represents an x-, y-, z-, and w-coordinate point in world space used in performing transformations with non-affine 3-D matrices.
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The Point4D type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | Add | Adds a Point4D structure to a Point4D. |
![]() | Equals(Object) | Determines whether the specified Object is a Point4D structure and if the X, Y, Z, and W properties of the specified Object are equal to the X, Y, Z, and W properties of this Point4D structure. (Overrides ValueType::Equals(Object).) |
![]() | Equals(Point4D) | Compares two Point4D structures for equality. |
![]() ![]() | Equals(Point4D, Point4D) | Compares two Point4D structures for equality. |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Returns a hash code for this Point4D structure. (Overrides ValueType::GetHashCode().) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Multiply | Transforms the specified Point4D structure by the specified Matrix3D structure. |
![]() | Offset | Translates the Point4D structure by the specified amounts. |
![]() ![]() | Parse | Converts a String representation of a point4D structure into the equivalent Point4D structure. |
![]() ![]() | Subtract | Subtracts a Point4D structure from a Point4D structure. |
![]() | ToString() | Creates a String representation of this Point4D structure. (Overrides ValueType::ToString().) |
![]() | ToString(IFormatProvider) | Creates a String representation of this Point4D structure. |
| Name | Description | |
|---|---|---|
![]() ![]() | Addition | Adds a Point4D structure to a Point4D. |
![]() ![]() | Equality | Compares two Point4D structures for equality. |
![]() ![]() | Inequality | Compares two Point4D structures for inequality. |
![]() ![]() | Multiply | Transforms the specified Point4D structure by the specified Matrix3D structure. |
![]() ![]() | Subtraction | Subtracts a Point4D structure from a Point4D structure and returns the result as a Point4D structure. |
| Name | Description | |
|---|---|---|
![]() ![]() | IFormattable::ToString | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. For a description of this member, see ToString. |
In XAML, the delimiter between the values of a Point4D 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 Point4D in XAML, because that will clash with the string type conversion of a Point4D attribute value into its components.
This example shows how to test Point4D structures for equality and inequality.
The following code illustrates how to test Point4D structures for equality and inequality using the Point4D equality methods. The Point4D structures are tested for equality using the overloaded equality (==) operator, then for inequality using the overloaded inequality (!=) operator, and finally a Point3D structure and a Point4D structure are checked for equality using the static Equals method.
// instantiate Points Point4D point4D1 = new Point4D(); Point4D point4D2 = new Point4D(15, 40, 60, 75); Point3D point3D1 = new Point3D(15, 40, 60); // result variables Boolean areEqual; Boolean areNotEqual; String stringResult; // defining x,y,z,w of point1 point4D1.X = 10; point4D1.Y = 5; point4D1.Z = 1; point4D1.W = 4; // checking if Points are equal areEqual = point4D1 == point4D2; // areEqual is False // checking if Points are not equal areNotEqual = point4D1 != point4D2; // areNotEqual is True if (Point4D.Equals(point4D1, point3D1)) { // the if condition is not true, so this block will not execute stringResult = "Both objects are Point4D structures and they are equal"; } else { // the if condition is false, so this branch will execute stringResult = "Parameters are not both Point4D strucutres, or they are but are not equal"; }
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.
