Struct XMShort4
A 4D vector consisting of 16-bit signed integer components.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath.PackedVector
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMShort4 : IEquatable<XMShort4>
Constructors
| Edit this page View SourceXMShort4(short, short, short, short)
Initializes a new instance of the XMShort4 struct.
Declaration
public XMShort4(short x, short y, short z, short w)
Parameters
Type | Name | Description |
---|---|---|
short | x | The x-coordinate of the vector. |
short | y | The y-coordinate of the vector. |
short | z | The z-coordinate of the vector. |
short | w | The w-coordinate of the vector. |
XMShort4(short[])
Initializes a new instance of the XMShort4 struct.
Declaration
public XMShort4(short[] array)
Parameters
Type | Name | Description |
---|---|---|
short[] | array | The components of the vector. |
XMShort4(float, float, float, float)
Initializes a new instance of the XMShort4 struct.
Declaration
public XMShort4(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. |
XMShort4(float[])
Initializes a new instance of the XMShort4 struct.
Declaration
public XMShort4(float[] array)
Parameters
Type | Name | Description |
---|---|---|
float[] | array | The components of the vector. |
XMShort4(ulong)
Initializes a new instance of the XMShort4 struct.
Declaration
public XMShort4(ulong packed)
Parameters
Type | Name | Description |
---|---|---|
ulong | packed | A packed value representing the vector. |
Properties
| Edit this page View SourceW
Gets or sets the w-coordinate of the vector.
Declaration
public short W { get; set; }
Property Value
Type | Description |
---|---|
short |
X
Gets or sets the x-coordinate of the vector.
Declaration
public short X { get; set; }
Property Value
Type | Description |
---|---|
short |
Y
Gets or sets the y-coordinate of the vector.
Declaration
public short Y { get; set; }
Property Value
Type | Description |
---|---|
short |
Z
Gets or sets the z-coordinate of the vector.
Declaration
public short Z { get; set; }
Property Value
Type | Description |
---|---|
short |
Methods
| Edit this page View SourceEquals(XMShort4)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMShort4 other)
Parameters
Type | Name | Description |
---|---|---|
XMShort4 | 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 XMShort4 FromVector(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMShort4 | A XMShort4. |
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 ==(XMShort4, XMShort4)
Compares two XMShort4 objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMShort4 left, XMShort4 right)
Parameters
Type | Name | Description |
---|---|---|
XMShort4 | left | The left XMShort4 to compare. |
XMShort4 | right | The right XMShort4 to compare. |
Returns
Type | Description |
---|---|
bool |
implicit operator XMVector(XMShort4)
Declaration
public static implicit operator XMVector(XMShort4 value)
Parameters
Type | Name | Description |
---|---|---|
XMShort4 | value | A XMShort4. |
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
implicit operator XMShort4(XMVector)
Declaration
public static implicit operator XMShort4(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMShort4 | A XMShort4. |
operator !=(XMShort4, XMShort4)
Compares two XMShort4 objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMShort4 left, XMShort4 right)
Parameters
Type | Name | Description |
---|---|---|
XMShort4 | left | The left XMShort4 to compare. |
XMShort4 | right | The right XMShort4 to compare. |
Returns
Type | Description |
---|---|
bool |