Rect3D 结构

定义

表示一个三维矩形:例如立方体。Represents a 3-D rectangle: for example, a cube.

public value class Rect3D : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Rect3DConverter))]
public struct Rect3D : IFormattable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Rect3DConverter))]
[System.Serializable]
public struct Rect3D : IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Rect3DConverter))>]
type Rect3D = struct
    interface IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Rect3DConverter))>]
[<System.Serializable>]
type Rect3D = struct
    interface IFormattable
Public Structure Rect3D
Implements IFormattable
继承
Rect3D
属性
实现

注解

Rect3D 定义为 (Point3D) 和大小结构 () 的位置 Size3DRect3D is defined as a location (Point3D) and a size structure (Size3D). 由于 X Y Z 为大小指定的、和值是度而不是坐标,因此,除了在空矩形情况下,它们都不能为负。Because the X, Y, and Z values specified for the size are magnitudes and not coordinates, they cannot be negative except in the case of an empty rectangle. 空矩形由指定, EmptyX 值为 Y Z -无限大。An empty rectangle is specified by Empty, which has X, Y, and Z values of -Infinity.

此结构通常用于表示或的界限 MeshGeometry3D Model3DThis structure is typically used to represent the bounds of a MeshGeometry3D or Model3D.

Size3DRect3D 通常不在 XAML 中使用,因为在使用这些类型的 WPF 3d 对象模型中不存在可设置的属性。Size3D and Rect3D are not typically used in XAML, because no settable properties exist in the WPF 3D object model that use those types.

构造函数

Rect3D(Double, Double, Double, Double, Double, Double)

初始化 Rect3D 结构的新实例。Initializes a new instance of the Rect3D structure.

Rect3D(Point3D, Size3D)

初始化 Rect3D 结构的新实例。Initializes a new instance of a Rect3D structure.

属性

Empty

获取空 Rect3DGets an empty Rect3D.

IsEmpty

获取一个值,该值指示此 Rect3D 是否为 EmptyRect3DGets a value that indicates whether this Rect3D is the EmptyRect3D.

Location

获取或设置表示 Point3D 原点的 Rect3DGets or sets a Point3D that represents the origin of the Rect3D.

Size

获取或设置 Rect3D 的面积。Gets or sets the area of the Rect3D.

SizeX

获取或设置 Rect3D 在 X 维中的大小。Gets or sets the size of the Rect3D in the X dimension.

SizeY

获取或设置 Rect3D 在 Y 维中的大小。Gets or sets the size of the Rect3D in the Y dimension.

SizeZ

获取或设置 Rect3D 的 Z 维大小。Gets or sets the size of the Rect3D in the Z dimension.

X

获取或设置 Rect3D 的 X 坐标的值。Gets or sets the value of the X coordinate of the Rect3D.

Y

获取或设置 Rect3D 的 Y 坐标的值。Gets or sets the value of the Y coordinate of the Rect3D.

Z

获取或设置 Rect3D 的 Z 坐标的值。Gets or sets the value of the Z coordinate of the Rect3D.

方法

Contains(Double, Double, Double)

获取指示指定的 Point3D 是否在 Rect3D 内(包括其边缘)的值。Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Contains(Point3D)

获取指示指定的 Point3D 是否在 Rect3D 内(包括其边缘)的值。Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Contains(Rect3D)

获取指示指定的 Point3D 是否在 Rect3D 内(包括其边缘)的值。Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Equals(Object)

比较两个 Rect3D 实例是否相等。Compares two Rect3D instances for equality.

Equals(Rect3D)

比较两个 Rect3D 实例是否相等。Compares two Rect3D instances for equality.

Equals(Rect3D, Rect3D)

比较两个 Rect3D 实例是否相等。Compares two Rect3D instances for equality.

GetHashCode()

返回 Rect3D 的哈希代码。Returns the hash code for the Rect3D

Intersect(Rect3D)

查找当前 Rect3D 与指定 Rect3D 的交集,并将结果存储为当前 Rect3DFinds the intersection of the current Rect3D and the specified Rect3D, and stores the result as the current Rect3D.

Intersect(Rect3D, Rect3D)

返回指定的 Rect3D 值的交集。Returns the intersection of the specified Rect3D values.

IntersectsWith(Rect3D)

返回一个值,该值指示指定的 Rect3D 是否与此 Rect3D 相交。Returns a value that indicates whether the specified Rect3D intersects with this Rect3D.

Offset(Double, Double, Double)

获取或设置 Rect3D 的位置平移的偏移量值。Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Rect3D, Double, Double, Double)

获取或设置 Rect3D 的位置平移的偏移量值。Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Rect3D, Vector3D)

获取或设置 Rect3D 的位置平移的偏移量值。Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Vector3D)

设置 Rect3D 到所提供值的偏移量平移,如 Vector3D 所指定。Sets the offset translation of the Rect3D to the provided value, specified as a Vector3D.

Parse(String)

Rect3D 的字符串表示形式转换为等效的 Rect3D 结构。Converts a string representation of a Rect3D into the equivalent Rect3D structure.

ToString()

创建 Rect3D 的字符串表示形式。Creates a string representation of the Rect3D.

ToString(IFormatProvider)

创建 Rect3D 的字符串表示形式。Creates a string representation of the Rect3D.

Union(Point3D)

更新指定的 Rect3D,反映该 Rect3D 和指定的 Point3D 的联合。Updates a specified Rect3D to reflect the union of that Rect3D and a specified Point3D.

Union(Rect3D)

更新指定的 Rect3D 以反映该 Rect3D 和另一个指定 Rect3D 的联合。Updates a specified Rect3D to reflect the union of that Rect3D and a second specified Rect3D.

Union(Rect3D, Point3D)

返回一个新的 Rect3D,它表示 Rect3D 与指定 Point3D 的联合。Returns a new Rect3D that represents the union of a Rect3D, and a specified Point3D.

Union(Rect3D, Rect3D)

返回 Rect3D 的一个新实例,它表示两个 Rect3D 对象的联合。Returns a new instance of Rect3D that represents the union of two Rect3D objects.

运算符

Equality(Rect3D, Rect3D)

比较两个 Rect3D 实例是否完全相等。Compares two Rect3D instances for exact equality.

Inequality(Rect3D, Rect3D)

比较两个 Rect3D 实例是否完全不相等。Compares two Rect3D instances for exact inequality.

显式接口实现

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

适用于