編集

次の方法で共有


Rect3D Struct

Definition

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
[System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Rect3DConverter))]
public struct Rect3D : IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Rect3DConverter))>]
[<System.Serializable>]
type Rect3D = struct
    interface IFormattable
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Media.Media3D.Rect3DConverter))>]
type Rect3D = struct
    interface IFormattable
Public Structure Rect3D
Implements IFormattable
Inheritance
Rect3D
Attributes
Implements

Remarks

Rect3D is defined as a location (Point3D) and a size structure (Size3D). 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. An empty rectangle is specified by Empty, which has X, Y, and Z values of -Infinity.

This structure is typically used to represent the bounds of a MeshGeometry3D or Model3D.

Size3D and Rect3D are not typically used in XAML, because no settable properties exist in the WPF 3D object model that use those types.

Constructors

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

Initializes a new instance of the Rect3D structure.

Rect3D(Point3D, Size3D)

Initializes a new instance of the Rect3D structure.

Properties

Empty

Gets an empty Rect3D.

IsEmpty

Gets a value that indicates whether this Rect3D is the EmptyRect3D.

Location

Gets or sets a Point3D that represents the origin of the Rect3D.

Size

Gets or sets the area of the Rect3D.

SizeX

Gets or sets the size of the Rect3D in the X dimension.

SizeY

Gets or sets the size of the Rect3D in the Y dimension.

SizeZ

Gets or sets the size of the Rect3D in the Z dimension.

X

Gets or sets the value of the X coordinate of the Rect3D.

Y

Gets or sets the value of the Y coordinate of the Rect3D.

Z

Gets or sets the value of the Z coordinate of the Rect3D.

Methods

Contains(Double, Double, Double)

Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Contains(Point3D)

Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Contains(Rect3D)

Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.

Equals(Object)

Compares two Rect3D instances for equality.

Equals(Rect3D, Rect3D)

Compares two Rect3D instances for equality.

Equals(Rect3D)

Compares two Rect3D instances for equality.

GetHashCode()

Returns the hash code for the Rect3D.

Intersect(Rect3D, Rect3D)

Returns the intersection of the specified Rect3D values.

Intersect(Rect3D)

Finds the intersection of the current Rect3D and the specified Rect3D, and stores the result as the current Rect3D.

IntersectsWith(Rect3D)

Returns a value that indicates whether the specified Rect3D intersects with this Rect3D.

Offset(Double, Double, Double)

Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Rect3D, Double, Double, Double)

Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Rect3D, Vector3D)

Gets or sets an offset value by which the location of a Rect3D is translated.

Offset(Vector3D)

Sets the offset translation of the Rect3D to the provided value, specified as a Vector3D.

Parse(String)

Converts a string representation of a Rect3D into the equivalent Rect3D structure.

ToString()

Creates a string representation of the Rect3D.

ToString(IFormatProvider)

Creates a string representation of the Rect3D.

Union(Point3D)

Updates a specified Rect3D to reflect the union of that Rect3D and a specified Point3D.

Union(Rect3D, Point3D)

Returns a new Rect3D that represents the union of a Rect3D, and a specified Point3D.

Union(Rect3D, Rect3D)

Returns a new instance of Rect3D that represents the union of two Rect3D objects.

Union(Rect3D)

Updates a specified Rect3D to reflect the union of that Rect3D and a second specified Rect3D.

Operators

Equality(Rect3D, Rect3D)

Compares two Rect3D instances for exact equality.

Inequality(Rect3D, Rect3D)

Compares two Rect3D instances for exact inequality.

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider)

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(String, IFormatProvider).

Applies to