Rect3D 結構

定義

表示 3-D 矩形:例如,立方體。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. 由指定空的矩形 Empty ,其具有 X 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,表示 Rect3D 的原點。Gets 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) 基礎結構,而且不適合直接從程式碼使用。This member supports the 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).

適用於