Struct Rectangle3D
Represents Rectangle3D.
public struct Rectangle3D : IEquatable<Rectangle3D>, ISpanFormattable, IFormattable
- Implements
- Inherited Members
Constructors
Rectangle3D(Point3D, Point3D)
public Rectangle3D(Point3D start, Point3D end)
Parameters
Rectangle3D(int, int, int, int, int, int)
public Rectangle3D(int x, int y, int z, int width, int height, int depth)
Parameters
Properties
Depth
public int Depth { get; }
Property Value
End
public Point3D End { get; set; }
Property Value
Height
public int Height { get; }
Property Value
Start
public Point3D Start { get; set; }
Property Value
Width
public int Width { get; }
Property Value
X
public int X { get; set; }
Property Value
Y
public int Y { get; set; }
Property Value
Z
public int Z { get; set; }
Property Value
Methods
Contains(Point2D)
public bool Contains(Point2D p)
Parameters
pPoint2D
Returns
Contains(Point3D)
public bool Contains(Point3D p)
Parameters
pPoint3D
Returns
Contains(IPoint2D)
public bool Contains(IPoint2D p)
Parameters
pIPoint2D
Returns
Contains(IPoint3D)
public bool Contains(IPoint3D p)
Parameters
pIPoint3D
Returns
Equals(Rectangle3D)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Rectangle3D other)
Parameters
otherRectangle3DAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
MakeHold(Rectangle3D)
public void MakeHold(Rectangle3D r)
Parameters
Parse(ReadOnlySpan<char>, IFormatProvider)
public static Rectangle3D Parse(ReadOnlySpan<char> s, IFormatProvider provider)
Parameters
sReadOnlySpan<char>providerIFormatProvider
Returns
Parse(string)
public static Rectangle3D Parse(string s)
Parameters
sstring
Returns
Parse(string, IFormatProvider)
public static Rectangle3D Parse(string s, IFormatProvider provider)
Parameters
sstringproviderIFormatProvider
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
ToString(string, IFormatProvider)
Formats the value of the current instance using the specified format.
public string ToString(string format, IFormatProvider formatProvider)
Parameters
formatstringThe format to use.
-or-
A null reference (
Nothingin Visual Basic) to use the default format defined for the type of the IFormattable implementation.formatProviderIFormatProviderThe provider to use to format the value.
-or-
A null reference (
Nothingin Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.
Returns
- string
The value of the current instance in the specified format.
TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider)
Tries to format the value of the current instance into the provided span of characters.
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider provider)
Parameters
destinationSpan<char>The span in which to write this instance's value formatted as a span of characters.
charsWrittenintWhen this method returns, contains the number of characters that were written in
destination.formatReadOnlySpan<char>A span containing the characters that represent a standard or custom format string that defines the acceptable format for
destination.providerIFormatProviderAn optional object that supplies culture-specific formatting information for
destination.
Returns
TryParse(ReadOnlySpan<char>, IFormatProvider, out Rectangle3D)
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider provider, out Rectangle3D result)
Parameters
sReadOnlySpan<char>providerIFormatProviderresultRectangle3D
Returns
TryParse(string, IFormatProvider, out Rectangle3D)
public static bool TryParse(string s, IFormatProvider provider, out Rectangle3D result)
Parameters
sstringproviderIFormatProviderresultRectangle3D
Returns
Operators
operator ==(Rectangle3D, Rectangle3D)
public static bool operator ==(Rectangle3D l, Rectangle3D r)
Parameters
Returns
operator !=(Rectangle3D, Rectangle3D)
public static bool operator !=(Rectangle3D l, Rectangle3D r)