Rect3D Rect3D Rect3D Rect3D Struct

定義

表示 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))]
[System.Serializable]
public struct Rect3D : IFormattable
type Rect3D = struct
    interface IFormattable
Public Structure Rect3D
Implements IFormattable
繼承
屬性
實作

備註

Rect3D定義為位置 (Point3D) 和大小結構 (Size3D)。Rect3D is defined as a location (Point3D) and a size structure (Size3D). 因為為大小Y指定的Z、和值是巨量且不是座標, 所以除非空白矩形, 否則不能是負數。 XBecause 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指定空的矩形, 其具有XYZ -無限大的值。An empty rectangle is specified by Empty, which has X, Y, and Z values of -Infinity.

這個結構通常用來表示MeshGeometry3DModel3D的界限。This 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(Point3D, Size3D) Rect3D(Point3D, Size3D) Rect3D(Point3D, Size3D) Rect3D(Point3D, Size3D)

初始化 Rect3D 結構的新執行個體。Initializes a new instance of a Rect3D structure.

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

初始化 Rect3D 結構的新執行個體。Initializes a new instance of the Rect3D structure.

屬性

Empty Empty Empty Empty

取得空的 Rect3DGets an empty Rect3D.

IsEmpty IsEmpty IsEmpty IsEmpty

取得值,這個值表示這個 Rect3D 是否為 EmptyRect3DGets a value that indicates whether this Rect3D is the EmptyRect3D.

Location Location Location Location

取得或設定 Point3D,表示 Rect3D 的原點。Gets or sets a Point3D that represents the origin of the Rect3D.

Size Size Size Size

取得或設定 Rect3D 的區域。Gets or sets the area of the Rect3D.

SizeX SizeX SizeX SizeX

取得或設定 Rect3D 在 X 維度的大小。Gets or sets the size of the Rect3D in the X dimension.

SizeY SizeY SizeY SizeY

取得或設定 Rect3D 在 Y 維度的大小。Gets or sets the size of the Rect3D in the Y dimension.

SizeZ SizeZ SizeZ SizeZ

取得或設定 Rect3D 在 Z 維度的大小。Gets or sets the size of the Rect3D in the Z dimension.

X X X X

取得或設定 Rect3D 的 X 座標值。Gets or sets the value of the X coordinate of the Rect3D.

Y Y Y Y

取得或設定 Rect3D 的 Y 座標值。Gets or sets the value of the Y coordinate of the Rect3D.

Z Z Z Z

取得或設定 Rect3D 的 Z 座標值。Gets or sets the value of the Z coordinate of the Rect3D.

方法

Contains(Point3D) Contains(Point3D) Contains(Point3D) Contains(Point3D)

取得值,此值會指出指定的 Point3D 是否位於 Rect3D,包含其邊緣。Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Contains(Rect3D) Contains(Rect3D) Contains(Rect3D) Contains(Rect3D)

取得值,此值會指出指定的 Point3D 是否位於 Rect3D,包含其邊緣。Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Contains(Double, Double, Double) Contains(Double, Double, Double) Contains(Double, Double, Double) Contains(Double, Double, Double)

取得值,此值會指出指定的 Point3D 是否位於 Rect3D,包含其邊緣。Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

比較兩個 Rect3D 執行個體是否相等。Compares two Rect3D instances for equality.

Equals(Rect3D) Equals(Rect3D) Equals(Rect3D) Equals(Rect3D)

比較兩個 Rect3D 執行個體是否相等。Compares two Rect3D instances for equality.

Equals(Rect3D, Rect3D) Equals(Rect3D, Rect3D) Equals(Rect3D, Rect3D) Equals(Rect3D, Rect3D)

比較兩個 Rect3D 執行個體是否相等。Compares two Rect3D instances for equality.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回 Rect3D 的雜湊程式碼。Returns the hash code for the Rect3D

Intersect(Rect3D) Intersect(Rect3D) Intersect(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) Intersect(Rect3D, Rect3D) Intersect(Rect3D, Rect3D) Intersect(Rect3D, Rect3D)

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

IntersectsWith(Rect3D) IntersectsWith(Rect3D) IntersectsWith(Rect3D) IntersectsWith(Rect3D)

傳回值,這個值表示指定的 Rect3D 是否與此 Rect3D 相交。Returns a value that indicates whether the specified Rect3D intersects with this Rect3D.

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

取得或設定位移值,其中會解譯 Rect3D 的位置。Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Double, Double, Double) Offset(Double, Double, Double) Offset(Double, Double, Double) Offset(Double, Double, Double)

取得或設定位移值,其中會解譯 Rect3D 的位置。Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Vector3D) Offset(Vector3D) Offset(Vector3D) Offset(Vector3D)

Rect3D 的位移平移設為提供的值 (以 Vector3D 指定)。Sets the offset translation of the Rect3D to the provided value, specified as a Vector3D.

Offset(Rect3D, Vector3D) Offset(Rect3D, Vector3D) Offset(Rect3D, Vector3D) Offset(Rect3D, Vector3D)

取得或設定位移值,其中會解譯 Rect3D 的位置。Gets or sets an offset value by which the location of a Rect3D is translated.

Parse(String) Parse(String) Parse(String) Parse(String)

Rect3D 的字串表示轉換成對等的 Rect3D 結構。Converts a string representation of a Rect3D into the equivalent Rect3D structure.

ToString() ToString() ToString() ToString()

建立 Rect3D 的字串表示。Creates a string representation of the Rect3D.

ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider)

建立 Rect3D 的字串表示。Creates a string representation of the Rect3D.

Union(Rect3D, Rect3D) Union(Rect3D, Rect3D) Union(Rect3D, Rect3D) Union(Rect3D, Rect3D)

傳回 Rect3D 的新執行個體,這個執行個體表示兩個 Rect3D 物件的聯集。Returns a new instance of Rect3D that represents the union of two Rect3D objects.

Union(Point3D) Union(Point3D) Union(Point3D) Union(Point3D)

更新指定的 Rect3D 以反映該 Rect3D 和指定的 Point3D 的聯集。Updates a specified Rect3D to reflect the union of that Rect3D and a specified Point3D.

Union(Rect3D) Union(Rect3D) Union(Rect3D) Union(Rect3D)

更新指定的 Rect3D 以反映該 Rect3D 和第二個指定之 Rect3D 的聯集。Updates a specified Rect3D to reflect the union of that Rect3D and a second specified Rect3D.

Union(Rect3D, Point3D) Union(Rect3D, Point3D) Union(Rect3D, Point3D) Union(Rect3D, Point3D)

傳回新 Rect3D,它表示 Rect3D 與指定的 Point3D 的聯集。Returns a new Rect3D that represents the union of a Rect3D, and a specified Point3D.

運算子

Equality(Rect3D, Rect3D) Equality(Rect3D, Rect3D) Equality(Rect3D, Rect3D) Equality(Rect3D, Rect3D)

比較兩個 Rect3D 執行個體是否完全相等。Compares two Rect3D instances for exact equality.

Inequality(Rect3D, Rect3D) Inequality(Rect3D, Rect3D) Inequality(Rect3D, Rect3D) Inequality(Rect3D, Rect3D)

比較兩個 Rect3D 執行個體是否完全不相等。Compares two Rect3D instances for exact inequality.

明確介面實作

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

適用於