Struct XMByte4
A 4D vector where each component is a signed integer, 8-bits (1 byte) in length.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath.PackedVector
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMByte4 : IEquatable<XMByte4>
Constructors
| Edit this page View SourceXMByte4(sbyte, sbyte, sbyte, sbyte)
Initializes a new instance of the XMByte4 struct.
Declaration
public XMByte4(sbyte x, sbyte y, sbyte z, sbyte w)
Parameters
Type | Name | Description |
---|---|---|
sbyte | x | The x-coordinate of the vector. |
sbyte | y | The y-coordinate of the vector. |
sbyte | z | The z-coordinate of the vector. |
sbyte | w | The w-coordinate of the vector. |
XMByte4(sbyte[])
Initializes a new instance of the XMByte4 struct.
Declaration
public XMByte4(sbyte[] array)
Parameters
Type | Name | Description |
---|---|---|
sbyte[] | array | The components of the vector. |
XMByte4(float, float, float, float)
Initializes a new instance of the XMByte4 struct.
Declaration
public XMByte4(float x, float y, float z, float w)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x-coordinate of the vector. |
float | y | The y-coordinate of the vector. |
float | z | The z-coordinate of the vector. |
float | w | The w-coordinate of the vector. |
XMByte4(float[])
Initializes a new instance of the XMByte4 struct.
Declaration
public XMByte4(float[] array)
Parameters
Type | Name | Description |
---|---|---|
float[] | array | The components of the vector. |
XMByte4(uint)
Initializes a new instance of the XMByte4 struct.
Declaration
public XMByte4(uint packed)
Parameters
Type | Name | Description |
---|---|---|
uint | packed | A packed value representing the vector. |
Properties
| Edit this page View SourceW
Gets or sets the w-coordinate of the vector.
Declaration
public sbyte W { get; set; }
Property Value
Type | Description |
---|---|
sbyte |
X
Gets or sets the x-coordinate of the vector.
Declaration
public sbyte X { get; set; }
Property Value
Type | Description |
---|---|
sbyte |
Y
Gets or sets the y-coordinate of the vector.
Declaration
public sbyte Y { get; set; }
Property Value
Type | Description |
---|---|
sbyte |
Z
Gets or sets the z-coordinate of the vector.
Declaration
public sbyte Z { get; set; }
Property Value
Type | Description |
---|---|
sbyte |
Methods
| Edit this page View SourceEquals(XMByte4)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMByte4 other)
Parameters
Type | Name | Description |
---|---|---|
XMByte4 | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceFromVector(XMVector)
Declaration
public static XMByte4 FromVector(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMByte4 | A XMByte4. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToVector()
Declaration
public XMVector ToVector()
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
Operators
| Edit this page View Sourceoperator ==(XMByte4, XMByte4)
Compares two XMByte4 objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMByte4 left, XMByte4 right)
Parameters
Type | Name | Description |
---|---|---|
XMByte4 | left | The left XMByte4 to compare. |
XMByte4 | right | The right XMByte4 to compare. |
Returns
Type | Description |
---|---|
bool |
implicit operator XMVector(XMByte4)
Declaration
public static implicit operator XMVector(XMByte4 value)
Parameters
Type | Name | Description |
---|---|---|
XMByte4 | value | A XMByte4. |
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
implicit operator XMByte4(XMVector)
Declaration
public static implicit operator XMByte4(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMByte4 | A XMByte4. |
operator !=(XMByte4, XMByte4)
Compares two XMByte4 objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMByte4 left, XMByte4 right)
Parameters
Type | Name | Description |
---|---|---|
XMByte4 | left | The left XMByte4 to compare. |
XMByte4 | right | The right XMByte4 to compare. |
Returns
Type | Description |
---|---|
bool |