XMUBYTE2 structure (directxpackedvector.h)
Describes a 2D vector where each component is a unsigned integer, 8-bits (1 byte) in length.
A 2D vector where each component is a unsigned integer, 8-bits (1 byte) in length.
For a list of additional functionality such as constructors and operators that are available using XMUBYTE2
when you
are programming in C++, see XMUBYTE2 Extensions.
Syntax
struct XMUBYTE2 {
union {
struct {
uint8_t x;
uint8_t y;
};
uint16_t v;
};
void XMUBYTE2();
void XMUBYTE2(
const XMUBYTE2 & unnamedParam1
);
XMUBYTE2 & operator=(
const XMUBYTE2 & unnamedParam1
);
void XMUBYTE2(
XMUBYTE2 && unnamedParam1
);
XMUBYTE2 & operator=(
XMUBYTE2 && unnamedParam1
);
void XMUBYTE2(
uint16_t Packed
) noexcept;
void XMUBYTE2(
uint8_t _x,
uint8_t _y
) noexcept;
void XMUBYTE2(
const uint8_t *pArray
) noexcept;
void XMUBYTE2(
float _x,
float _y
) noexcept;
void XMUBYTE2(
const float *pArray
) noexcept;
XMUBYTE2 & operator=(
uint16_t Packed
) noexcept;
};
Members
x
Unsigned 8-bit integer value in the range [0, 255] describing the x-coordinate of the vector.
y
Unsigned 8-bit integer value in the range [0, 255] describing the y-coordinate of the vector.
v
Default constructor for XMUBYTE2
.
Default constructor for XMUBYTE2.
void XMUBYTE2( const XMUBYTE2 & unnamedParam1)
A constructor for XMUBYTE2
.
A constructor for XMUBYTE2.
XMUBYTE2 & operator=( const XMUBYTE2 & unnamedParam1)
Assigns the vector component data from one instance of XMUBYTE2
to the current instance of XMUBYTE2
.
This operator assigns the vector component data from one instance of XMUBYTE2 to the current instance of XMUBYTE2
.
void XMUBYTE2( XMUBYTE2 && unnamedParam1)
A constructor for XMUBYTE2
.
A constructor for XMUBYTE2.
XMUBYTE2 & operator=( XMUBYTE2 && unnamedParam1)
void XMUBYTE2( uint16_t Packed) noexcept
A constructor for XMUBYTE2
.
A constructor for XMUBYTE2.
void XMUBYTE2( uint8_t _x, uint8_t _y) noexcept
Initializes a new instance of XMUBYTE2
from two int8_t
arguments.
This constructor initializes a new instance of XMUBYTE2 from two uint8_t
arguments.
void XMUBYTE2( const uint8_t *pArray) noexcept
Initializes a new instance of XMUBYTE2 from a two-element int8_t
array argument.
This constructor initializes a new instance of XMUBYTE2 from a two-element int8_t
array argument.
void XMUBYTE2( float _x, float _y) noexcept
Initializes a new instance of XMUBYTE2
from two float
arguments.
This constructor initializes a new instance of XMUBYTE2 from two float
arguments.
void XMUBYTE2( const float *pArray) noexcept
Initializes a new instance of XMUBYTE2 from a two-element float
array argument.
This constructor initializes a new instance of XMUBYTE2 from a two-element float
array argument.
XMUBYTE2 & operator=( uint16_t Packed) noexcept
Remarks
You can use XMLoadUByte2 to load XMUBYTE2
into instances of XMVECTOR.
You can use XMStoreUByte2 to store instances of XMVECTOR
into an instance of XMUBYTE2
.
Namespace: Use DirectX::PackedVector
Platform Requirements
Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.Requirements
Requirement | Value |
---|---|
Header | directxpackedvector.h |