Struct XMInt3
A 3D vector where each component is a signed integer.
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMInt3 : IFormattable, IEquatable<XMInt3>
Constructors
| Edit this page View SourceXMInt3(int, int, int)
Initializes a new instance of the XMInt3 struct.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "x", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "y", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "z", Justification = "Reviewed")]
public XMInt3(int x, int y, int z)
Parameters
| Type | Name | Description |
|---|---|---|
| int | x | The x-coordinate of the vector. |
| int | y | The y-coordinate of the vector. |
| int | z | The z-coordinate of the vector. |
XMInt3(int[]?)
Initializes a new instance of the XMInt3 struct.
Declaration
public XMInt3(int[]? array)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | array | The components of the array. |
XMInt3(ReadOnlySpan<int>)
Initializes a new instance of the XMInt3 struct.
Declaration
public XMInt3(ReadOnlySpan<int> array)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<int> | array | The components of the array. |
Properties
| Edit this page View SourceX
Gets or sets the x-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "X", Justification = "Reviewed")]
public int X { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Y
Gets or sets the y-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Y", Justification = "Reviewed")]
public int Y { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Z
Gets or sets the z-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Z", Justification = "Reviewed")]
public int Z { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceEquals(XMInt3)
Declaration
public readonly bool Equals(XMInt3 other)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt3 | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceFromVector(XMVector)
Declaration
public static XMInt3 FromVector(XMVector value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | value | A XMVector. |
Returns
| Type | Description |
|---|---|
| XMInt3 | A XMInt3. |
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The fully qualified type name. |
Overrides
| Edit this page View SourceToString(string?, IFormatProvider?)
Formats the value of the current instance using the specified format.
Declaration
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| string | format | The format to use. -or- A null reference ( |
| IFormatProvider | formatProvider | The provider to use to format the value. -or- A null reference ( |
Returns
| Type | Description |
|---|---|
| string | The value of the current instance in the specified format. |
ToVector()
Declaration
public XMVector ToVector()
Returns
| Type | Description |
|---|---|
| XMVector | A XMVector. |
Operators
| Edit this page View Sourceoperator ==(XMInt3, XMInt3)
Declaration
public static bool operator ==(XMInt3 left, XMInt3 right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt3 | left | |
| XMInt3 | right |
Returns
| Type | Description |
|---|---|
| bool |
implicit operator XMVector(XMInt3)
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator XMVector(XMInt3 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt3 | value | A XMInt3. |
Returns
| Type | Description |
|---|---|
| XMVector | A XMVector. |
implicit operator XMInt3(XMVector)
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator XMInt3(XMVector value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | value | A XMVector. |
Returns
| Type | Description |
|---|---|
| XMInt3 | A XMInt3. |
operator !=(XMInt3, XMInt3)
Declaration
public static bool operator !=(XMInt3 left, XMInt3 right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt3 | left | |
| XMInt3 | right |
Returns
| Type | Description |
|---|---|
| bool |