XMBYTE2 structure (directxpackedvector.h)
A 2D vector where each component is a signed integer, 8-bits (1 byte) in length.
For a list of additional functionality such as constructors and operators that are available using XMBYTE2
when you
are programming in C++, see XMBYTE2 Extensions.
Syntax
struct XMBYTE2 {
union {
struct {
int8_t x;
int8_t y;
};
uint16_t v;
};
void XMBYTE2();
void XMBYTE2(
const XMBYTE2 & unnamedParam1
);
XMBYTE2 & operator=(
const XMBYTE2 & unnamedParam1
);
void XMBYTE2(
XMBYTE2 && unnamedParam1
);
XMBYTE2 & operator=(
XMBYTE2 && unnamedParam1
);
void XMBYTE2(
uint16_t Packed
) noexcept;
void XMBYTE2(
int8_t _x,
int8_t _y
) noexcept;
void XMBYTE2(
const int8_t *pArray
) noexcept;
void XMBYTE2(
float _x,
float _y
) noexcept;
void XMBYTE2(
const float *pArray
) noexcept;
XMBYTE2 & operator=(
uint16_t Packed
) noexcept;
};
Members
x
Signed 8-bit integer value in the range [-127, 127] describing the x-coordinate of the vector.
y
Signed 8-bit integer value in the range [-127, 127] describing the y-coordinate of the vector.
v
Default constructor for XMBYTE2
.
Default constructor for XMBYTE2.
void XMBYTE2( const XMBYTE2 & unnamedParam1)
A constructor for XMBYTE2.
A constructor for XMBYTE2
.
XMBYTE2 & operator=( const XMBYTE2 & unnamedParam1)
Assigns the vector component data from one instance of XMBYTE2
to the current instance of XMBYTE2
.
This operator assigns the vector component data from one instance of XMBYTE2 to the current
instance of XMBYTE2
.
void XMBYTE2( XMBYTE2 && unnamedParam1)
A constructor for XMBYTE2.
A constructor for XMBYTE2
.
XMBYTE2 & operator=( XMBYTE2 && unnamedParam1)
void XMBYTE2( uint16_t Packed) noexcept
A constructor for XMBYTE2.
A constructor for XMBYTE2
.
void XMBYTE2( int8_t _x, int8_t _y) noexcept
Initializes a new instance of XMBYTE2
from XMBYTE2 int8_t
arguments.
This constructor initializes a new instance of XMBYTE2 from XMBYTE2
int8_t
arguments.
void XMBYTE2( const int8_t *pArray) noexcept
Initializes a new instance of XMBYTE2 from a two-element int8_t
array argument.
This constructor initializes a new instance of XMBYTE2 from a two-element int8_t
array argument.
void XMBYTE2( float _x, float _y) noexcept
Initializes a new instance of XMBYTE2
from two float
arguments.
This constructor initializes a new instance of XMBYTE2 from two float
arguments.
void XMBYTE2( const float *pArray) noexcept
Initializes a new instance of XMBYTE2 from a two-element float
array argument.
This constructor initializes a new instance of XMBYTE2 from a two-element float
array argument.
XMBYTE2 & operator=( uint16_t Packed) noexcept
Remarks
You can use XMLoadByte2 to load XMBYTE2
into instances
of XMVECTOR.
You can use XMStoreByte2 to store instances of XMVECTOR
into an instance of XMBYTE2
.
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 |