Show / Hide Table of Contents

Struct Size3D

Universal structure that describes the size of an object in width and height in a two-dimensional space.

Implements
IFormattable
IEquatable<Size3D>
IEquatable<ISize3D>
ISize3D
ISize
IVector3D
IVector
IEquatable<IVector>
IEquatable<Vector2>
IEquatable<IVector3D>
IEquatable<Vector3>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: TheXDS.MCART.Types
Assembly: MCART.dll
Syntax
public struct Size3D : IFormattable, IEquatable<Size3D>, IEquatable<ISize3D>, ISize3D, ISize, IVector3D, IVector, IEquatable<IVector>, IEquatable<Vector2>, IEquatable<IVector3D>, IEquatable<Vector3>

Constructors

| Edit this page View Source

Size3D(double, double, double)

Universal structure that describes the size of an object in width and height in a two-dimensional space.

Declaration
public Size3D(double width, double height, double depth)
Parameters
Type Name Description
double width

Width value.

double height

Height value.

double depth

Depth value.

Fields

| Edit this page View Source

NegativeInfinity

Gets a value that represents a negative infinite size. This field is read-only.

Declaration
public static readonly Size3D NegativeInfinity
Field Value
Type Description
Size3D
| Edit this page View Source

Nothing

Gets a value that does not represent any size. This field is read-only.

Declaration
public static readonly Size3D Nothing
Field Value
Type Description
Size3D
| Edit this page View Source

PositiveInfinity

Gets a value that represents an infinite size. This field is read-only.

Declaration
public static readonly Size3D PositiveInfinity
Field Value
Type Description
Size3D
| Edit this page View Source

Zero

Gets a value that represents a null size. This field is read-only.

Declaration
public static readonly Size3D Zero
Field Value
Type Description
Size3D

Properties

| Edit this page View Source

CubePerimeter

Calculates the perimeter represented by this size.

Declaration
public readonly double CubePerimeter { get; }
Property Value
Type Description
double
| Edit this page View Source

CubeVolume

Calculates the square area represented by this size.

Declaration
public readonly double CubeVolume { get; }
Property Value
Type Description
double
| Edit this page View Source

Depth

Gets the depth component of the size.

Declaration
public double Depth { readonly get; set; }
Property Value
Type Description
double
| Edit this page View Source

Height

Gets the height component of the size.

Declaration
public double Height { readonly get; set; }
Property Value
Type Description
double
| Edit this page View Source

IsReal

Gets a value indicating whether the size is valid in a real physical context.

Declaration
public readonly bool IsReal { get; }
Property Value
Type Description
bool
| Edit this page View Source

IsValid

Gets a value indicating whether all size magnitudes of this instance are valid.

Declaration
public readonly bool IsValid { get; }
Property Value
Type Description
bool
| Edit this page View Source

IsZero

Determines if this instance represents a null size.

Declaration
public readonly bool IsZero { get; }
Property Value
Type Description
bool

true if the size is null or false if the size does not contain volume.

| Edit this page View Source

Width

Gets the width component of the size.

Declaration
public double Width { readonly get; set; }
Property Value
Type Description
double

Methods

| Edit this page View Source

Equals(object?)

Indicates whether this instance and a specified object are equal.

Declaration
public override readonly bool Equals(object? obj)
Parameters
Type Name Description
object obj

Object to compare with the current instance.

Returns
Type Description
bool

true if this instance and obj are equal; otherwise, false.

Overrides
ValueType.Equals(object)
| Edit this page View Source

Equals(ISize3D?)

Determines if this instance of ISize3D is equal to another.

Declaration
public readonly bool Equals(ISize3D? other)
Parameters
Type Name Description
ISize3D other

Instance of ISize3D to compare against.

Returns
Type Description
bool

true if the sizes represented in both objects are equal, false otherwise.

| Edit this page View Source

Equals(IVector3D?)

Determines if this instance of IVector3D is equal to another.

Declaration
public readonly bool Equals(IVector3D? other)
Parameters
Type Name Description
IVector3D other

Instance of IVector3D to compare against.

Returns
Type Description
bool

true if the sizes represented in both objects are equal, false otherwise.

| Edit this page View Source

Equals(Size3D)

Determines if this instance of Size is equal to another.

Declaration
public readonly bool Equals(Size3D other)
Parameters
Type Name Description
Size3D other

Instance of Size to compare against.

Returns
Type Description
bool

true if the sizes represented in both objects are equal, false otherwise.

| Edit this page View Source

GetHashCode()

Returns the hash code generated for this instance.

Declaration
public override readonly int GetHashCode()
Returns
Type Description
int

A hash code that represents this instance.

Overrides
ValueType.GetHashCode()
| Edit this page View Source

Parse(string)

Creates a Size from a string.

Declaration
public static Size3D Parse(string value)
Parameters
Type Name Description
string value

Value to create a Size from.

Returns
Type Description
Size3D

The created Size.

Exceptions
Type Condition
FormatException

Thrown if the conversion failed.

| Edit this page View Source

ToString()

Converts this object to its string representation.

Declaration
public override readonly string ToString()
Returns
Type Description
string

A string representation of this object.

Overrides
ValueType.ToString()
| Edit this page View Source

ToString(string?)

Converts this object to its string representation.

Declaration
public readonly string ToString(string? format)
Parameters
Type Name Description
string format

Format to use.

Returns
Type Description
string

A string representation of this object.

| Edit this page View Source

ToString(string?, IFormatProvider?)

Converts this object to its string representation.

Declaration
public readonly string ToString(string? format, IFormatProvider? formatProvider)
Parameters
Type Name Description
string format

Format to use.

IFormatProvider formatProvider

Optional parameter. Format provider for the culture to use for formatting the string representation of this object. If omitted, CurrentCulture will be used.

Returns
Type Description
string

A string representation of this object.

| Edit this page View Source

TryParse(string?, out Size3D)

Attempts to create a Size from a string.

Declaration
public static bool TryParse(string? value, out Size3D size)
Parameters
Type Name Description
string value

Value to create a Size from.

Size3D size

The created Size.

Returns
Type Description
bool

true if the conversion was successful, false otherwise.

Operators

| Edit this page View Source

operator +(Size3D, double)

Performs an addition operation on the point.

Declaration
public static Size3D operator +(Size3D l, double r)
Parameters
Type Name Description
Size3D l

Point 1.

double r

Addition operand.

Returns
Type Description
Size3D

A new Size3D whose vectors are the sum of the original vectors + r.

| Edit this page View Source

operator +(Size3D, ISize3D)

Performs an addition operation on the points.

Declaration
public static Size3D operator +(Size3D l, ISize3D r)
Parameters
Type Name Description
Size3D l

Point 1.

ISize3D r

Point 2.

Returns
Type Description
Size3D

The sum of the vectors of the points.

| Edit this page View Source

operator +(Size3D, IVector3D)

Performs an addition operation on the points.

Declaration
public static Size3D operator +(Size3D l, IVector3D r)
Parameters
Type Name Description
Size3D l

Point 1.

IVector3D r

Point 2.

Returns
Type Description
Size3D

The sum of the vectors of the points.

| Edit this page View Source

operator +(Size3D, Size3D)

Performs an addition operation on the points.

Declaration
public static Size3D operator +(Size3D l, Size3D r)
Parameters
Type Name Description
Size3D l

Point 1.

Size3D r

Point 2.

Returns
Type Description
Size3D

The sum of the vectors of the points.

| Edit this page View Source

operator --(Size3D)

Decrements by 1 the vectors of the point.

Declaration
public static Size3D operator --(Size3D p)
Parameters
Type Name Description
Size3D p

Point to decrement.

Returns
Type Description
Size3D

A point with its vectors decremented by 1.

| Edit this page View Source

operator /(Size3D, double)

Performs a division operation on the point.

Declaration
public static Size3D operator /(Size3D l, double r)
Parameters
Type Name Description
Size3D l

Point 1.

double r

Division operand.

Returns
Type Description
Size3D

A new Size3D whose vectors are the division of the original vectors / r.

| Edit this page View Source

operator /(Size3D, ISize3D)

Performs a division operation on the points.

Declaration
public static Size3D operator /(Size3D l, ISize3D r)
Parameters
Type Name Description
Size3D l

Point 1.

ISize3D r

Point 2.

Returns
Type Description
Size3D

The division of the vectors of the points.

| Edit this page View Source

operator /(Size3D, IVector3D)

Performs a division operation on the points.

Declaration
public static Size3D operator /(Size3D l, IVector3D r)
Parameters
Type Name Description
Size3D l

Point 1.

IVector3D r

Point 2.

Returns
Type Description
Size3D

The division of the vectors of the points.

| Edit this page View Source

operator /(Size3D, Size3D)

Performs a division operation on the points.

Declaration
public static Size3D operator /(Size3D l, Size3D r)
Parameters
Type Name Description
Size3D l

Point 1.

Size3D r

Point 2.

Returns
Type Description
Size3D

The division of the vectors of the points.

| Edit this page View Source

operator ==(Size3D, ISize3D)

Compares equality between two instances of Size3D.

Declaration
public static bool operator ==(Size3D size1, ISize3D size2)
Parameters
Type Name Description
Size3D size1

First element to compare.

ISize3D size2

Second element to compare.

Returns
Type Description
bool

true if the sizes represented in both objects are equal, false otherwise.

| Edit this page View Source

operator ==(Size3D, IVector3D)

Compares equality between two instances of Size3D.

Declaration
public static bool operator ==(Size3D size1, IVector3D size2)
Parameters
Type Name Description
Size3D size1

First element to compare.

IVector3D size2

Second element to compare.

Returns
Type Description
bool

true if the sizes represented in both objects are equal, false otherwise.

| Edit this page View Source

operator ==(Size3D, Size3D)

Compares equality between two instances of Size3D.

Declaration
public static bool operator ==(Size3D size1, Size3D size2)
Parameters
Type Name Description
Size3D size1

First element to compare.

Size3D size2

Second element to compare.

Returns
Type Description
bool

true if the sizes represented in both objects are equal, false otherwise.

| Edit this page View Source

implicit operator Size3D(Vector3)

Implicitly converts a Vector3 to a Size3D.

Declaration
public static implicit operator Size3D(Vector3 p)
Parameters
Type Name Description
Vector3 p

Vector3 value to be converted.

Returns
Type Description
Size3D
| Edit this page View Source

implicit operator Vector3(Size3D)

Implicitly converts a Size3D to a Vector3.

Declaration
public static implicit operator Vector3(Size3D p)
Parameters
Type Name Description
Size3D p

Size3D value to be converted.

Returns
Type Description
Vector3
| Edit this page View Source

operator ++(Size3D)

Increments by 1 the vectors of the point.

Declaration
public static Size3D operator ++(Size3D p)
Parameters
Type Name Description
Size3D p

Point to increment.

Returns
Type Description
Size3D

A point with its vectors incremented by 1.

| Edit this page View Source

operator !=(Size3D, ISize3D)

Compares inequality between two instances of Size3D.

Declaration
public static bool operator !=(Size3D size1, ISize3D size2)
Parameters
Type Name Description
Size3D size1

First element to compare.

ISize3D size2

Second element to compare.

Returns
Type Description
bool

true if the sizes represented in both objects are different, false otherwise.

| Edit this page View Source

operator !=(Size3D, IVector3D)

Compares inequality between two instances of Size3D.

Declaration
public static bool operator !=(Size3D size1, IVector3D size2)
Parameters
Type Name Description
Size3D size1

First element to compare.

IVector3D size2

Second element to compare.

Returns
Type Description
bool

true if the sizes represented in both objects are different, false otherwise.

| Edit this page View Source

operator !=(Size3D, Size3D)

Compares inequality between two instances of Size3D.

Declaration
public static bool operator !=(Size3D size1, Size3D size2)
Parameters
Type Name Description
Size3D size1

First element to compare.

Size3D size2

Second element to compare.

Returns
Type Description
bool

true if the sizes represented in both objects are different, false otherwise.

| Edit this page View Source

operator %(Size3D, double)

Performs a remainder operation on the point.

Declaration
public static Size3D operator %(Size3D l, double r)
Parameters
Type Name Description
Size3D l

Point 1.

double r

Remainder operand.

Returns
Type Description
Size3D

A new Size3D whose vectors are the remainder of the original vectors % r.

| Edit this page View Source

operator %(Size3D, ISize3D)

Performs a remainder operation on the points.

Declaration
public static Size3D operator %(Size3D l, ISize3D r)
Parameters
Type Name Description
Size3D l

Point 1.

ISize3D r

Point 2.

Returns
Type Description
Size3D

The remainder of the vectors of the points.

| Edit this page View Source

operator %(Size3D, IVector3D)

Performs a remainder operation on the points.

Declaration
public static Size3D operator %(Size3D l, IVector3D r)
Parameters
Type Name Description
Size3D l

Point 1.

IVector3D r

Point 2.

Returns
Type Description
Size3D

A new Size3D whose vectors are the remainder of the original vectors % r.

| Edit this page View Source

operator %(Size3D, Size3D)

Performs a remainder operation on the points.

Declaration
public static Size3D operator %(Size3D l, Size3D r)
Parameters
Type Name Description
Size3D l

Point 1.

Size3D r

Point 2.

Returns
Type Description
Size3D

The remainder of the vectors of the points.

| Edit this page View Source

operator *(Size3D, double)

Performs a multiplication operation on the point.

Declaration
public static Size3D operator *(Size3D l, double r)
Parameters
Type Name Description
Size3D l

Point 1.

double r

Multiplication operand.

Returns
Type Description
Size3D

A new Size3D whose vectors are the multiplication of the original vectors * r.

| Edit this page View Source

operator *(Size3D, ISize3D)

Performs a multiplication operation on the points.

Declaration
public static Size3D operator *(Size3D l, ISize3D r)
Parameters
Type Name Description
Size3D l

Point 1.

ISize3D r

Point 2.

Returns
Type Description
Size3D

The multiplication of the vectors of the points.

| Edit this page View Source

operator *(Size3D, IVector3D)

Performs a multiplication operation on the points.

Declaration
public static Size3D operator *(Size3D l, IVector3D r)
Parameters
Type Name Description
Size3D l

Point 1.

IVector3D r

Point 2.

Returns
Type Description
Size3D

The multiplication of the vectors of the points.

| Edit this page View Source

operator *(Size3D, Size3D)

Performs a multiplication operation on the points.

Declaration
public static Size3D operator *(Size3D l, Size3D r)
Parameters
Type Name Description
Size3D l

Point 1.

Size3D r

Point 2.

Returns
Type Description
Size3D

The multiplication of the vectors of the points.

| Edit this page View Source

operator -(Size3D, double)

Performs a subtraction operation on the point.

Declaration
public static Size3D operator -(Size3D l, double r)
Parameters
Type Name Description
Size3D l

Point 1.

double r

Subtraction operand.

Returns
Type Description
Size3D

A new Size3D whose vectors are the difference of the original vectors - r.

| Edit this page View Source

operator -(Size3D, ISize3D)

Performs a subtraction operation on the points.

Declaration
public static Size3D operator -(Size3D l, ISize3D r)
Parameters
Type Name Description
Size3D l

Point 1.

ISize3D r

Point 2.

Returns
Type Description
Size3D

The difference of the vectors of the points.

| Edit this page View Source

operator -(Size3D, IVector3D)

Performs a subtraction operation on the points.

Declaration
public static Size3D operator -(Size3D l, IVector3D r)
Parameters
Type Name Description
Size3D l

Point 1.

IVector3D r

Point 2.

Returns
Type Description
Size3D

The difference of the vectors of the points.

| Edit this page View Source

operator -(Size3D, Size3D)

Performs a subtraction operation on the points.

Declaration
public static Size3D operator -(Size3D l, Size3D r)
Parameters
Type Name Description
Size3D l

Point 1.

Size3D r

Point 2.

Returns
Type Description
Size3D

The difference of the vectors of the points.

| Edit this page View Source

operator -(Size3D)

Inverts the sign of the vectors of the point.

Declaration
public static Size3D operator -(Size3D p)
Parameters
Type Name Description
Size3D p

Point to operate.

Returns
Type Description
Size3D

A point with the sign of its vectors inverted.

| Edit this page View Source

operator +(Size3D)

Converts to positive the vectors of the point.

Declaration
public static Size3D operator +(Size3D p)
Parameters
Type Name Description
Size3D p

Point to operate.

Returns
Type Description
Size3D

A point with its vectors positive.

Implements

IFormattable
IEquatable<T>
IEquatable<T>
ISize3D
ISize
IVector3D
IVector
IEquatable<T>
IEquatable<T>
IEquatable<T>
IEquatable<T>

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Objects.Itself<T>(T)
Objects.ShallowClone<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX