# Point3DPoint3DPoint3DPoint3D Struct

## 定义

``public value class Point3D : IFormattable``
``````[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Point3DConverter))]
[System.Serializable]
public struct Point3D : IFormattable``````
``````type Point3D = struct
interface IFormattable``````
``````Public Structure Point3D
Implements IFormattable``````

Point3DPoint3DPoint3DPoint3D

## 示例

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

## 注解

### XAML 属性用法XAML Attribute Usage

``````<object property="x,y,z"/>
-or
<object property="x y z"/>
``````

### XAML 值XAML Values

xx
Point3D 的 x 坐标。The x-coordinate of this Point3D.

yy
Point3D 的 y 坐标。The y-coordinate of this Point3D.

zz
Point3D的 z 坐标。The z-coordinate of this Point3D.

## 构造函数

 Point3D(Double, Double, Double) Point3D(Double, Double, Double) Point3D(Double, Double, Double) Point3D(Double, Double, Double) 初始化 Point3D 结构的新实例。Initializes a new instance of the Point3D structure.

## 属性

 X X X X 获取或设置此 Point3D 结构的 x 坐标。Gets or sets the x-coordinate of this Point3D structure. Y Y Y Y 获取或设置此 Point3D 结构的 y 坐标。Gets or sets the y-coordinate of this Point3D structure. Z Z Z Z 获取或设置此 Point3D 结构的 z 坐标。Gets or sets the z-coordinate of this Point3D structure.

## 方法

 Add(Point3D, Vector3D) Add(Point3D, Vector3D) Add(Point3D, Vector3D) Add(Point3D, Vector3D) 向 Point3D 添加一个 Vector3D 结构并以 Point3D 结构返回结果。Adds a Point3D structure to a Vector3D and returns the result as a Point3D structure. Equals(Object) Equals(Object) Equals(Object) Equals(Object) 确定指定的对象是否为 Point3D 结构；如果是，则确定指定的 X 的 Y、Z 和 Object 属性是否与此 X 结构的 Y、Z 和 Point3D 属性相等。Determines whether the specified object is a Point3D structure and if so, whether the X, Y, and Z properties of the specified Object are equal to the X, Y, and Z properties of this Point3D structure. Equals(Point3D) Equals(Point3D) Equals(Point3D) Equals(Point3D) 比较两个 Point3D 结构是否相等。Compares two Point3D structures for equality. Equals(Point3D, Point3D) Equals(Point3D, Point3D) Equals(Point3D, Point3D) Equals(Point3D, Point3D) 比较两个 Point3D 结构是否相等。Compares two Point3D structures for equality. GetHashCode() GetHashCode() GetHashCode() GetHashCode() 返回此 Point3D 结构的哈希代码。Returns a hash code for this Point3D structure. Multiply(Point3D, Matrix3D) Multiply(Point3D, Matrix3D) Multiply(Point3D, Matrix3D) Multiply(Point3D, Matrix3D) 使用指定的 Point3D 结构转换指定的 Matrix3D 结构。Transforms the specified Point3D structure by the specified Matrix3D structure. Offset(Double, Double, Double) Offset(Double, Double, Double) Offset(Double, Double, Double) Offset(Double, Double, Double) 将 Point3D 结构平移指定量。Translates the Point3D structure by the specified amounts. Parse(String) Parse(String) Parse(String) Parse(String) 将三维点的 String 表示形式变换为等效的 Point3D 结构。Converts a String representation of a 3-D point into the equivalent Point3D structure. Subtract(Point3D, Point3D) Subtract(Point3D, Point3D) Subtract(Point3D, Point3D) Subtract(Point3D, Point3D) 从一个 Point3D 结构中减去另一个 Point3D 结构并以 Vector3D 结构返回结果。Subtracts a Point3D structure from a Point3D structure and returns the result as a Vector3D structure. Subtract(Point3D, Vector3D) Subtract(Point3D, Vector3D) Subtract(Point3D, Vector3D) Subtract(Point3D, Vector3D) 从一个 Vector3D 结构中减去另一个 Point3D 结构并以 Point3D 结构返回结果。Subtracts a Vector3D structure from a Point3D structure and returns the result as a Point3D structure. ToString() ToString() ToString() ToString() 创建此 String 结构的 Point3D 表示形式。Creates a String representation of this Point3D structure. ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) 创建此 String 结构的 Point3D 表示形式。Creates a String representation of this Point3D structure.

## 操作员

 Addition(Point3D, Vector3D) Addition(Point3D, Vector3D) Addition(Point3D, Vector3D) Addition(Point3D, Vector3D) 向 Point3D 添加一个 Vector3D 结构并以 Point3D 结构返回结果。Adds a Point3D structure to a Vector3D and returns the result as a Point3D structure. Equality(Point3D, Point3D) Equality(Point3D, Point3D) Equality(Point3D, Point3D) Equality(Point3D, Point3D) 比较两个 Point3D 结构是否相等。Compares two Point3D structures for equality. Explicit(Point3D to Point4D) Explicit(Point3D to Point4D) Explicit(Point3D to Point4D) Explicit(Point3D to Point4D) 将 Point3D 结构变换为 Point4D 结构。Converts a Point3D structure into a Point4D structure. Explicit(Point3D to Vector3D) Explicit(Point3D to Vector3D) Explicit(Point3D to Vector3D) Explicit(Point3D to Vector3D) 将 Point3D 结构变换为 Vector3D 结构。Converts a Point3D structure into a Vector3D structure. Inequality(Point3D, Point3D) Inequality(Point3D, Point3D) Inequality(Point3D, Point3D) Inequality(Point3D, Point3D) 比较两个 Point3D 结构是否不相等。Compares two Point3D structures for inequality. Multiply(Point3D, Matrix3D) Multiply(Point3D, Matrix3D) Multiply(Point3D, Matrix3D) Multiply(Point3D, Matrix3D) 使用指定的 Point3D 结构转换指定的 Matrix3D 结构。Transforms the specified Point3D structure by the specified Matrix3D structure. Subtraction(Point3D, Point3D) Subtraction(Point3D, Point3D) Subtraction(Point3D, Point3D) Subtraction(Point3D, Point3D) 从一个 Point3D 结构中减去另一个 Point3D 结构并以 Vector3D 结构返回结果。Subtracts a Point3D structure from a Point3D structure and returns the result as a Vector3D structure. Subtraction(Point3D, Vector3D) Subtraction(Point3D, Vector3D) Subtraction(Point3D, Vector3D) Subtraction(Point3D, Vector3D) 从一个 Vector3D 结构中减去另一个 Point3D 结构并以 Point3D 结构返回结果。Subtracts a Vector3D structure from a Point3D structure and returns the result as a Point3D structure.

## 显式界面实现

 IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) 此成员支持 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 基础结构，但不能在代码中直接使用。This member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. 有关此成员的说明，请参见 ToString(String, IFormatProvider)。For a description of this member, see ToString(String, IFormatProvider).