Rect3D Structure

Represents a 3-D rectangle: for example, a cube.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

[SerializableAttribute]
[TypeConverterAttribute(typeof(Rect3DConverter))]
public struct Rect3D : IFormattable
 

The Rect3D type exposes the following members.

  NameDescription
Public methodRect3D(Point3D, Size3D)Initializes a new instance of a Rect3D structure.
Public methodRect3D(Double, Double, Double, Double, Double, Double)Initializes a new instance of the Rect3D structure.
Top

  NameDescription
Public propertyStatic memberEmptyGets an empty Rect3D.
Public propertyIsEmptyGets a value that indicates whether this Rect3D is the Empty Rect3D.
Public propertyLocationGets or sets a Point3D that represents the origin of the Rect3D.
Public propertySizeGets or sets the area of the Rect3D.
Public propertySizeXGets or sets the size of the Rect3D in the X dimension.
Public propertySizeYGets or sets the size of the Rect3D in the Y dimension.
Public propertySizeZGets or sets the size of the Rect3D in the Z dimension.
Public propertyXGets or sets the value of the X coordinate of the Rect3D.
Public propertyYGets or sets the value of the Y coordinate of the Rect3D.
Public propertyZGets or sets the value of the Z coordinate of the Rect3D.
Top

  NameDescription
Public methodContains(Point3D)Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.
Public methodContains(Rect3D)Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.
Public methodContains(Double, Double, Double)Gets a value that indicates whether a specified Point3D is within the Rect3D, including its edges.
Public methodEquals(Object)Compares two Rect3D instances for equality. (Overrides ValueType.Equals(Object).)
Public methodEquals(Rect3D)Compares two Rect3D instances for equality.
Public methodStatic memberEquals(Rect3D, Rect3D)Compares two Rect3D instances for equality.
Public methodGetHashCodeReturns the hash code for the Rect3D (Overrides ValueType.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIntersect(Rect3D)Finds the intersection of the current Rect3D and the specified Rect3D, and stores the result as the current Rect3D.
Public methodStatic memberIntersect(Rect3D, Rect3D)Returns the intersection of the specified Rect3D values.
Public methodIntersectsWithReturns a value that indicates whether the specified Rect3D intersects with this Rect3D.
Public methodOffset(Vector3D)Sets the offset translation of the Rect3D to the provided value, specified as a Vector3D.
Public methodStatic memberOffset(Rect3D, Vector3D)Gets or sets an offset value by which the location of a Rect3D is translated.
Public methodOffset(Double, Double, Double)Gets or sets an offset value by which the location of a Rect3D is translated.
Public methodStatic memberOffset(Rect3D, Double, Double, Double)Gets or sets an offset value by which the location of a Rect3D is translated.
Public methodStatic memberParseConverts a string representation of a Rect3D into the equivalent Rect3D structure.
Public methodToString()Creates a string representation of the Rect3D. (Overrides ValueType.ToString().)
Public methodToString(IFormatProvider)Creates a string representation of the Rect3D.
Public methodUnion(Point3D)Updates a specified Rect3D to reflect the union of that Rect3D and a specified Point3D.
Public methodUnion(Rect3D)Updates a specified Rect3D to reflect the union of that Rect3D and a second specified Rect3D.
Public methodStatic memberUnion(Rect3D, Point3D)Returns a new Rect3D that represents the union of a Rect3D, and a specified Point3D.
Public methodStatic memberUnion(Rect3D, Rect3D)Returns a new instance of Rect3D that represents the union of two Rect3D objects.
Top

  NameDescription
Public operatorStatic memberEqualityCompares two Rect3D instances for exact equality.
Public operatorStatic memberInequalityCompares two Rect3D instances for exact inequality.
Top

  NameDescription
Explicit interface implemetationPrivate methodIFormattable.ToStringThis 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.
Top

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft