Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes a 2D vector consisting of 16-bit signed and normalized integer components.
For a list of additional functionality such as constructors and operators that are available
using XMSHORT2 when you are programming in C++, see XMSHORT2 Extensions.
Syntax
struct XMSHORT2 {
union {
struct {
int16_t x;
int16_t y;
};
uint32_t v;
};
void XMSHORT2();
void XMSHORT2(
const XMSHORT2 & unnamedParam1
);
XMSHORT2 & operator=(
const XMSHORT2 & unnamedParam1
);
void XMSHORT2(
XMSHORT2 && unnamedParam1
);
XMSHORT2 & operator=(
XMSHORT2 && unnamedParam1
);
void XMSHORT2(
uint32_t Packed
) noexcept;
void XMSHORT2(
int16_t _x,
int16_t _y
) noexcept;
void XMSHORT2(
const int16_t *pArray
) noexcept;
void XMSHORT2(
float _x,
float _y
) noexcept;
void XMSHORT2(
const float *pArray
) noexcept;
XMSHORT2 & operator=(
uint32_t Packed
) noexcept;
};
Members
x
Signed integer in the range [-32767, 32767] describing the x-coordinate of the vector.
y
Signed integer in the range [-32767, 32767] describing the y-coordinate of the vector.
v
Default constructor for XMSHORT2.
Default constructor for XMSHORT2.
void XMSHORT2( const XMSHORT2 & unnamedParam1)
A constructor for XMSHORT2.
A constructor for XMSHORT2.
XMSHORT2 & operator=( const XMSHORT2 & unnamedParam1)
Assigns the vector component data from one instance of XMSHORT2 to the current instance of XMSHORT2.
This operator assigns the vector component data from one instance of XMSHORT2 to the current instance of XMSHORT2.
void XMSHORT2( XMSHORT2 && unnamedParam1)
A constructor for XMSHORT2.
A constructor for XMSHORT2.
XMSHORT2 & operator=( XMSHORT2 && unnamedParam1)
void XMSHORT2( uint32_t Packed) noexcept
A constructor for XMSHORT2.
A constructor for XMSHORT2.
void XMSHORT2( int16_t _x, int16_t _y) noexcept
Initializes a new instance of XMSHORT2 from two int16_t arguments.
This constructor initializes a new instance of XMSHORT2 from two
int16_t arguments.
void XMSHORT2( const int16_t *pArray) noexcept
Initializes a new instance of XMSHORT2 from a two element int16_t array argument.
This constructor initializes a new instance of XMSHORT2 from a two element int16_t array argument.
void XMSHORT2( float _x, float _y) noexcept
Initializes a new instance of XMSHORT2 from two float arguments.
This constructor initializes a new instance of XMSHORT2 from two
float arguments.
void XMSHORT2( const float *pArray) noexcept
Initializes a new instance of XMSHORT2 from a two element float array argument.
This constructor initializes a new instance of XMSHORT2 from a two element float array argument.
XMSHORT2 & operator=( uint32_t Packed) noexcept
Remarks
The components are normalized when this structure is loaded into an XMVECTOR using XMLoadShort2. Each component will be divided by 32767.0f.
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 |