14 #if defined(_MSC_VER) && (_MSC_VER > 1000) 22 #error XNAMATH and XBOXMATH are incompatible in the same compilation module. Use one or the other. 25 #define XNAMATH_VERSION 203 27 #if !defined(_XM_X64_) && !defined(_XM_X86_) 28 #if defined(_M_AMD64) || defined(_AMD64_) 30 #elif defined(_M_IX86) || defined(_X86_) 35 #if !defined(_XM_BIGENDIAN_) && !defined(_XM_LITTLEENDIAN_) 36 #if defined(_XM_X64_) || defined(_XM_X86_) 37 #define _XM_LITTLEENDIAN_ 38 #elif defined(_XBOX_VER) 39 #define _XM_BIGENDIAN_ 41 #error xnamath.h only supports x86, x64, or XBox 360 targets 45 #if defined(_XM_X86_) || defined(_XM_X64_) 46 #define _XM_SSE_INTRINSICS_ 47 #if !defined(__cplusplus) && !defined(_XM_NO_INTRINSICS_) 48 #error xnamath.h only supports C compliation for Xbox 360 targets and no intrinsics cases for x86/x64 50 #elif defined(_XBOX_VER) 51 #if !defined(__VMX128_SUPPORTED) && !defined(_XM_NO_INTRINSICS_) 52 #error xnamath.h requires VMX128 compiler support for XBOX 360 53 #endif // !__VMX128_SUPPORTED && !_XM_NO_INTRINSICS_ 54 #define _XM_VMX128_INTRINSICS_ 56 #error xnamath.h only supports x86, x64, or XBox 360 targets 60 #if defined(_XM_SSE_INTRINSICS_) 61 #ifndef _XM_NO_INTRINSICS_ 62 #include <xmmintrin.h> 63 #include <emmintrin.h> 65 #elif defined(_XM_VMX128_INTRINSICS_) 66 #error This version of xnamath.h is for Windows use only 69 #if defined(_XM_SSE_INTRINSICS_) 71 #pragma warning(disable:4985) 74 #if defined(_XM_SSE_INTRINSICS_) 80 #if !defined(XMINLINE) 81 #if !defined(XM_NO_MISALIGNED_VECTOR_ACCESS) 82 #define XMINLINE __inline 84 #define XMINLINE __forceinline 88 #if !defined(XMFINLINE) 89 #define XMFINLINE __forceinline 98 #if !defined(XMASSERT) 99 #if defined(_PREFAST_) 100 #define XMASSERT(Expression) __analysis_assume((Expression)) 101 #elif defined(XMDEBUG) // !_PREFAST_ 102 #define XMASSERT(Expression) ((VOID)((Expression) || (XMAssert(#Expression, __FILE__, __LINE__), 0))) 104 #define XMASSERT(Expression) ((VOID)0) 108 #if !defined(XM_NO_ALIGNMENT) 109 #define _DECLSPEC_ALIGN_16_ __declspec(align(16)) 111 #define _DECLSPEC_ALIGN_16_ 115 #if defined(_MSC_VER) && (_MSC_VER<1500) && (_MSC_VER>=1400) 116 #define _XM_ISVS2005_ 125 #define XM_PI 3.141592654f 126 #define XM_2PI 6.283185307f 127 #define XM_1DIVPI 0.318309886f 128 #define XM_1DIV2PI 0.159154943f 129 #define XM_PIDIV2 1.570796327f 130 #define XM_PIDIV4 0.785398163f 132 #define XM_SELECT_0 0x00000000 133 #define XM_SELECT_1 0xFFFFFFFF 135 #define XM_PERMUTE_0X 0x00010203 136 #define XM_PERMUTE_0Y 0x04050607 137 #define XM_PERMUTE_0Z 0x08090A0B 138 #define XM_PERMUTE_0W 0x0C0D0E0F 139 #define XM_PERMUTE_1X 0x10111213 140 #define XM_PERMUTE_1Y 0x14151617 141 #define XM_PERMUTE_1Z 0x18191A1B 142 #define XM_PERMUTE_1W 0x1C1D1E1F 144 #define XM_CRMASK_CR6 0x000000F0 145 #define XM_CRMASK_CR6TRUE 0x00000080 146 #define XM_CRMASK_CR6FALSE 0x00000020 147 #define XM_CRMASK_CR6BOUNDS XM_CRMASK_CR6FALSE 149 #define XM_CACHE_LINE_SIZE 64 159 XMFINLINE FLOAT XMConvertToRadians(FLOAT fDegrees) {
return fDegrees * (XM_PI / 180.0f); }
160 XMFINLINE FLOAT XMConvertToDegrees(FLOAT fRadians) {
return fRadians * (180.0f / XM_PI); }
164 #define XMComparisonAllTrue(CR) (((CR) & XM_CRMASK_CR6TRUE) == XM_CRMASK_CR6TRUE) 165 #define XMComparisonAnyTrue(CR) (((CR) & XM_CRMASK_CR6FALSE) != XM_CRMASK_CR6FALSE) 166 #define XMComparisonAllFalse(CR) (((CR) & XM_CRMASK_CR6FALSE) == XM_CRMASK_CR6FALSE) 167 #define XMComparisonAnyFalse(CR) (((CR) & XM_CRMASK_CR6TRUE) != XM_CRMASK_CR6TRUE) 168 #define XMComparisonMixed(CR) (((CR) & XM_CRMASK_CR6) == 0) 169 #define XMComparisonAllInBounds(CR) (((CR) & XM_CRMASK_CR6BOUNDS) == XM_CRMASK_CR6BOUNDS) 170 #define XMComparisonAnyOutOfBounds(CR) (((CR) & XM_CRMASK_CR6BOUNDS) != XM_CRMASK_CR6BOUNDS) 173 #define XMMin(a, b) (((a) < (b)) ? (a) : (b)) 174 #define XMMax(a, b) (((a) > (b)) ? (a) : (b)) 182 #pragma warning(push) 183 #pragma warning(disable:4201 4365 4324) 185 #if !defined (_XM_X86_) && !defined(_XM_X64_) 186 #pragma bitfield_order(push) 187 #pragma bitfield_order(lsb_to_msb) 188 #endif // !_XM_X86_ && !_XM_X64_ 190 #if defined(_XM_NO_INTRINSICS_) && !defined(_XBOX_VER) 193 typedef struct __vector4
197 float vector4_f32[4];
198 unsigned int vector4_u32[4];
199 #ifndef XM_STRICT_VECTOR4 209 #endif // !XM_STRICT_VECTOR4 212 #endif // _XM_NO_INTRINSICS_ 214 #if (defined (_XM_X86_) || defined(_XM_X64_)) && defined(_XM_NO_INTRINSICS_) 215 typedef UINT __vector4i[4];
217 typedef __declspec(align(16)) UINT __vector4i[4];
222 #if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) 223 typedef __m128 XMVECTOR;
225 typedef __vector4 XMVECTOR;
235 #if defined(__cplusplus) 236 inline operator XMVECTOR()
const {
return v; }
237 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) 238 inline operator __m128i()
const {
return reinterpret_cast<const __m128i *
>(&v)[0]; }
239 inline operator __m128d()
const {
return reinterpret_cast<const __m128d *
>(&v)[0]; }
241 #endif // __cplusplus 249 #if defined(__cplusplus) 250 inline operator XMVECTOR()
const {
return v; }
251 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) 252 inline operator __m128i()
const {
return reinterpret_cast<const __m128i *
>(&v)[0]; }
253 inline operator __m128d()
const {
return reinterpret_cast<const __m128d *
>(&v)[0]; }
255 #endif // __cplusplus 263 #if defined(__cplusplus) 264 inline operator XMVECTOR()
const {
return v; }
265 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) 266 inline operator __m128i()
const {
return reinterpret_cast<const __m128i *
>(&v)[0]; }
267 inline operator __m128d()
const {
return reinterpret_cast<const __m128d *
>(&v)[0]; }
269 #endif // __cplusplus 277 #if defined(__cplusplus) 278 inline operator XMVECTOR()
const {
return v; }
279 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_SSE_INTRINSICS_) 280 inline operator __m128i()
const {
return reinterpret_cast<const __m128i *
>(&v)[0]; }
281 inline operator __m128d()
const {
return reinterpret_cast<const __m128d *
>(&v)[0]; }
283 #endif // __cplusplus 287 #if defined(_XM_VMX128_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) 288 typedef const XMVECTOR FXMVECTOR;
289 #elif defined(_XM_X86_) && !defined(_XM_NO_INTRINSICS_) 290 typedef const XMVECTOR FXMVECTOR;
291 #elif defined(__cplusplus) 292 typedef const XMVECTOR& FXMVECTOR;
294 typedef const XMVECTOR FXMVECTOR;
298 #if defined(_XM_VMX128_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) 299 typedef const XMVECTOR CXMVECTOR;
300 #elif defined(__cplusplus) 301 typedef const XMVECTOR& CXMVECTOR;
303 typedef const XMVECTOR CXMVECTOR;
307 #if defined(__cplusplus) && !defined(XM_NO_OPERATOR_OVERLOADS) 309 XMVECTOR operator+ (FXMVECTOR V);
310 XMVECTOR operator- (FXMVECTOR V);
312 XMVECTOR& operator+= (XMVECTOR& V1, FXMVECTOR V2);
313 XMVECTOR& operator-= (XMVECTOR& V1, FXMVECTOR V2);
314 XMVECTOR& operator*= (XMVECTOR& V1, FXMVECTOR V2);
315 XMVECTOR& operator/= (XMVECTOR& V1, FXMVECTOR V2);
316 XMVECTOR& operator*= (XMVECTOR& V, FLOAT S);
317 XMVECTOR& operator/= (XMVECTOR& V, FLOAT S);
319 XMVECTOR operator+ (FXMVECTOR V1, FXMVECTOR V2);
320 XMVECTOR operator- (FXMVECTOR V1, FXMVECTOR V2);
321 XMVECTOR operator* (FXMVECTOR V1, FXMVECTOR V2);
322 XMVECTOR operator/ (FXMVECTOR V1, FXMVECTOR V2);
323 XMVECTOR operator* (FXMVECTOR V, FLOAT S);
324 XMVECTOR operator* (FLOAT S, FXMVECTOR V);
325 XMVECTOR operator/ (FXMVECTOR V, FLOAT S);
327 #endif // __cplusplus && !XM_NO_OPERATOR_OVERLOADS 331 #if (defined(_XM_X86_) || defined(_XM_X64_)) && defined(_XM_NO_INTRINSICS_) 342 FLOAT _11, _12, _13, _14;
343 FLOAT _21, _22, _23, _24;
344 FLOAT _31, _32, _33, _34;
345 FLOAT _41, _42, _43, _44;
353 _XMMATRIX(FXMVECTOR R0, FXMVECTOR R1, FXMVECTOR R2, CXMVECTOR R3);
354 _XMMATRIX(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03,
355 FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13,
356 FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23,
357 FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33);
360 FLOAT operator() (UINT Row, UINT Column) CONST {
return m[Row][Column]; }
361 FLOAT& operator() (UINT Row, UINT Column) {
return m[Row][Column]; }
365 #ifndef XM_NO_OPERATOR_OVERLOADS 368 #endif // !XM_NO_OPERATOR_OVERLOADS 370 #endif // __cplusplus 375 #if defined(_XM_VMX128_INTRINSICS_) 376 typedef const XMMATRIX CXMMATRIX;
377 #elif defined(__cplusplus) 378 typedef const XMMATRIX& CXMMATRIX;
380 typedef const XMMATRIX CXMMATRIX;
397 _XMFLOAT2(FLOAT _x, FLOAT _y) : x(_x), y(_y) {};
402 #endif // __cplusplus 408 __declspec(align(16))
struct XMFLOAT2A :
public XMFLOAT2 411 XMFLOAT2A(FLOAT _x, FLOAT _y) :
XMFLOAT2(_x, _y) {};
412 XMFLOAT2A(CONST FLOAT *pArray) :
XMFLOAT2(pArray) {};
414 XMFLOAT2A& operator= (CONST XMFLOAT2A& Float2);
417 typedef __declspec(align(16))
XMFLOAT2 XMFLOAT2A;
418 #endif // __cplusplus 429 _XMHALF2(HALF _x, HALF _y) : x(_x), y(_y) {};
436 #endif // __cplusplus 449 _XMSHORTN2(SHORT _x, SHORT _y) : x(_x), y(_y) {};
456 #endif // __cplusplus 469 _XMSHORT2(SHORT _x, SHORT _y) : x(_x), y(_y) {};
476 #endif // __cplusplus 489 _XMUSHORTN2(USHORT _x, USHORT _y) : x(_x), y(_y) {};
496 #endif // __cplusplus 509 _XMUSHORT2(USHORT _x, USHORT _y) : x(_x), y(_y) {};
516 #endif // __cplusplus 530 _XMFLOAT3(FLOAT _x, FLOAT _y, FLOAT _z) : x(_x), y(_y), z(_z) {};
535 #endif // __cplusplus 541 __declspec(align(16))
struct XMFLOAT3A :
public XMFLOAT3 544 XMFLOAT3A(FLOAT _x, FLOAT _y, FLOAT _z) :
XMFLOAT3(_x, _y, _z) {};
545 XMFLOAT3A(CONST FLOAT *pArray) :
XMFLOAT3(pArray) {};
547 XMFLOAT3A& operator= (CONST XMFLOAT3A& Float3);
550 typedef __declspec(align(16))
XMFLOAT3 XMFLOAT3A;
551 #endif // __cplusplus 579 operator UINT () {
return v; }
582 _XMHENDN3& operator= (CONST UINT Packed);
584 #endif // __cplusplus 610 _XMHEND3(UINT Packed) : v(Packed) {};
611 _XMHEND3(FLOAT _x, FLOAT _y, FLOAT _z);
614 operator UINT () {
return v; }
617 _XMHEND3& operator= (CONST UINT Packed);
619 #endif // __cplusplus 649 operator UINT () {
return v; }
654 #endif // __cplusplus 684 operator UINT () {
return v; }
687 _XMUHEND3& operator= (CONST UINT Packed);
689 #endif // __cplusplus 719 operator UINT () {
return v; }
722 _XMDHENN3& operator= (CONST UINT Packed);
724 #endif // __cplusplus 750 _XMDHEN3(UINT Packed) : v(Packed) {};
751 _XMDHEN3(FLOAT _x, FLOAT _y, FLOAT _z);
754 operator UINT () {
return v; }
757 _XMDHEN3& operator= (CONST UINT Packed);
759 #endif // __cplusplus 789 operator UINT () {
return v; }
794 #endif // __cplusplus 824 operator UINT () {
return v; }
827 _XMUDHEN3& operator= (CONST UINT Packed);
829 #endif // __cplusplus 850 _XMU565(USHORT Packed) : v(Packed) {};
851 _XMU565(CHAR _x, CHAR _y, CHAR _z) : x(_x), y(_y), z(_z) {};
853 _XMU565(FLOAT _x, FLOAT _y, FLOAT _z);
856 operator USHORT () {
return v; }
859 _XMU565& operator= (CONST USHORT Packed);
861 #endif // __cplusplus 896 operator UINT () {
return v; }
901 #endif // __cplusplus 933 operator UINT () {
return v; }
938 #endif // __cplusplus 953 _XMFLOAT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w) : x(_x), y(_y), z(_z), w(_w) {};
958 #endif // __cplusplus 964 __declspec(align(16))
struct XMFLOAT4A :
public XMFLOAT4 967 XMFLOAT4A(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w) :
XMFLOAT4(_x, _y, _z, _w) {};
968 XMFLOAT4A(CONST FLOAT *pArray) :
XMFLOAT4(pArray) {};
970 XMFLOAT4A& operator= (CONST XMFLOAT4A& Float4);
973 typedef __declspec(align(16))
XMFLOAT4 XMFLOAT4A;
974 #endif // __cplusplus 987 _XMHALF4(HALF _x, HALF _y, HALF _z, HALF _w) : x(_x), y(_y), z(_z), w(_w) {};
989 _XMHALF4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
994 #endif // __cplusplus 1009 _XMSHORTN4(SHORT _x, SHORT _y, SHORT _z, SHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1011 _XMSHORTN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1016 #endif // __cplusplus 1031 _XMSHORT4(SHORT _x, SHORT _y, SHORT _z, SHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1033 _XMSHORT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1038 #endif // __cplusplus 1053 _XMUSHORTN4(USHORT _x, USHORT _y, USHORT _z, USHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1055 _XMUSHORTN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1060 #endif // __cplusplus 1075 _XMUSHORT4(USHORT _x, USHORT _y, USHORT _z, USHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1077 _XMUSHORT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1082 #endif // __cplusplus 1110 _XMXDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1113 operator UINT () {
return v; }
1116 _XMXDECN4& operator= (CONST UINT Packed);
1118 #endif // __cplusplus 1145 _XMXDEC4(UINT Packed) : v(Packed) {};
1146 _XMXDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1149 operator UINT () {
return v; }
1152 _XMXDEC4& operator= (CONST UINT Packed);
1154 #endif // __cplusplus 1181 _XMDECN4(UINT Packed) : v(Packed) {};
1182 _XMDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1185 operator UINT () {
return v; }
1188 _XMDECN4& operator= (CONST UINT Packed);
1190 #endif // __cplusplus 1217 _XMDEC4(UINT Packed) : v(Packed) {};
1218 _XMDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1221 operator UINT () {
return v; }
1224 _XMDEC4& operator= (CONST UINT Packed);
1226 #endif // __cplusplus 1254 _XMUDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1257 operator UINT () {
return v; }
1260 _XMUDECN4& operator= (CONST UINT Packed);
1262 #endif // __cplusplus 1289 _XMUDEC4(UINT Packed) : v(Packed) {};
1290 _XMUDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1293 operator UINT () {
return v; }
1296 _XMUDEC4& operator= (CONST UINT Packed);
1298 #endif // __cplusplus 1325 _XMXICON4(UINT64 Packed) : v(Packed) {};
1326 _XMXICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1329 operator UINT64 () {
return v; }
1332 _XMXICON4& operator= (CONST UINT64 Packed);
1334 #endif // __cplusplus 1361 _XMXICO4(UINT64 Packed) : v(Packed) {};
1362 _XMXICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1365 operator UINT64 () {
return v; }
1368 _XMXICO4& operator= (CONST UINT64 Packed);
1370 #endif // __cplusplus 1397 _XMICON4(UINT64 Packed) : v(Packed) {};
1398 _XMICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1401 operator UINT64 () {
return v; }
1404 _XMICON4& operator= (CONST UINT64 Packed);
1406 #endif // __cplusplus 1433 _XMICO4(UINT64 Packed) : v(Packed) {};
1434 _XMICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1437 operator UINT64 () {
return v; }
1440 _XMICO4& operator= (CONST UINT64 Packed);
1442 #endif // __cplusplus 1469 _XMUICON4(UINT64 Packed) : v(Packed) {};
1470 _XMUICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1473 operator UINT64 () {
return v; }
1476 _XMUICON4& operator= (CONST UINT64 Packed);
1478 #endif // __cplusplus 1505 _XMUICO4(UINT64 Packed) : v(Packed) {};
1506 _XMUICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1509 operator UINT64 () {
return v; }
1512 _XMUICO4& operator= (CONST UINT64 Packed);
1514 #endif // __cplusplus 1541 _XMCOLOR(UINT Color) : c(Color) {};
1542 _XMCOLOR(FLOAT _r, FLOAT _g, FLOAT _b, FLOAT _a);
1545 operator UINT () {
return c; }
1548 _XMCOLOR& operator= (CONST UINT Color);
1550 #endif // __cplusplus 1572 _XMBYTEN4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {};
1575 _XMBYTEN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1580 #endif // __cplusplus 1602 _XMBYTE4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {};
1603 _XMBYTE4(UINT Packed) : v(Packed) {};
1605 _XMBYTE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1610 #endif // __cplusplus 1632 _XMUBYTEN4(BYTE _x, BYTE _y, BYTE _z, BYTE _w) : x(_x), y(_y), z(_z), w(_w) {};
1635 _XMUBYTEN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1640 #endif // __cplusplus 1662 _XMUBYTE4(BYTE _x, BYTE _y, BYTE _z, BYTE _w) : x(_x), y(_y), z(_z), w(_w) {};
1665 _XMUBYTE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1670 #endif // __cplusplus 1693 _XMUNIBBLE4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {};
1695 _XMUNIBBLE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1698 operator USHORT () {
return v; }
1703 #endif // __cplusplus 1725 _XMU555(USHORT Packed) : v(Packed) {};
1726 _XMU555(CHAR _x, CHAR _y, CHAR _z, BOOL _w) : x(_x), y(_y), z(_z), w(_w ? 0x1 : 0) {};
1727 _XMU555(CONST CHAR *pArray, BOOL _w);
1728 _XMU555(FLOAT _x, FLOAT _y, FLOAT _z, BOOL _w);
1729 _XMU555(CONST FLOAT *pArray, BOOL _w);
1731 operator USHORT () {
return v; }
1734 _XMU555& operator= (CONST USHORT Packed);
1736 #endif // __cplusplus 1747 FLOAT _11, _12, _13;
1748 FLOAT _21, _22, _23;
1749 FLOAT _31, _32, _33;
1758 FLOAT m10, FLOAT m11, FLOAT m12,
1759 FLOAT m20, FLOAT m21, FLOAT m22);
1762 FLOAT operator() (UINT Row, UINT Column) CONST {
return m[Row][Column]; }
1763 FLOAT& operator() (UINT Row, UINT Column) {
return m[Row][Column]; }
1767 #endif // __cplusplus 1778 FLOAT _11, _12, _13;
1779 FLOAT _21, _22, _23;
1780 FLOAT _31, _32, _33;
1781 FLOAT _41, _42, _43;
1790 FLOAT m10, FLOAT m11, FLOAT m12,
1791 FLOAT m20, FLOAT m21, FLOAT m22,
1792 FLOAT m30, FLOAT m31, FLOAT m32);
1795 FLOAT operator() (UINT Row, UINT Column) CONST {
return m[Row][Column]; }
1796 FLOAT& operator() (UINT Row, UINT Column) {
return m[Row][Column]; }
1800 #endif // __cplusplus 1806 __declspec(align(16))
struct XMFLOAT4X3A :
public XMFLOAT4X3 1809 XMFLOAT4X3A(FLOAT m00, FLOAT m01, FLOAT m02,
1810 FLOAT m10, FLOAT m11, FLOAT m12,
1811 FLOAT m20, FLOAT m21, FLOAT m22,
1812 FLOAT m30, FLOAT m31, FLOAT m32) :
1813 XMFLOAT4X3(m00,m01,m02,m10,m11,m12,m20,m21,m22,m30,m31,m32) {};
1814 XMFLOAT4X3A(CONST FLOAT *pArray) :
XMFLOAT4X3(pArray) {}
1816 FLOAT operator() (UINT Row, UINT Column) CONST {
return m[Row][Column]; }
1817 FLOAT& operator() (UINT Row, UINT Column) {
return m[Row][Column]; }
1819 XMFLOAT4X3A& operator= (CONST XMFLOAT4X3A& Float4x3);
1822 typedef __declspec(align(16))
XMFLOAT4X3 XMFLOAT4X3A;
1823 #endif // __cplusplus 1832 FLOAT _11, _12, _13, _14;
1833 FLOAT _21, _22, _23, _24;
1834 FLOAT _31, _32, _33, _34;
1835 FLOAT _41, _42, _43, _44;
1843 _XMFLOAT4X4(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03,
1844 FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13,
1845 FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23,
1846 FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33);
1849 FLOAT operator() (UINT Row, UINT Column) CONST {
return m[Row][Column]; }
1850 FLOAT& operator() (UINT Row, UINT Column) {
return m[Row][Column]; }
1854 #endif // __cplusplus 1860 __declspec(align(16))
struct XMFLOAT4X4A :
public XMFLOAT4X4 1863 XMFLOAT4X4A(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03,
1864 FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13,
1865 FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23,
1866 FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33)
1867 :
XMFLOAT4X4(m00,m01,m02,m03,m10,m11,m12,m13,m20,m21,m22,m23,m30,m31,m32,m33) {};
1868 XMFLOAT4X4A(CONST FLOAT *pArray) :
XMFLOAT4X4(pArray) {}
1870 FLOAT operator() (UINT Row, UINT Column) CONST {
return m[Row][Column]; }
1871 FLOAT& operator() (UINT Row, UINT Column) {
return m[Row][Column]; }
1873 XMFLOAT4X4A& operator= (CONST XMFLOAT4X4A& Float4x4);
1876 typedef __declspec(align(16))
XMFLOAT4X4 XMFLOAT4X4A;
1877 #endif // __cplusplus 1879 #if !defined(_XM_X86_) && !defined(_XM_X64_) 1880 #pragma bitfield_order(pop) 1881 #endif // !_XM_X86_ && !_XM_X64_ 1883 #pragma warning(pop) 1892 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_) 1894 XMVECTOR XMConvertVectorIntToFloat(FXMVECTOR VInt, UINT DivExponent);
1895 XMVECTOR XMConvertVectorFloatToInt(FXMVECTOR VFloat, UINT MulExponent);
1896 XMVECTOR XMConvertVectorUIntToFloat(FXMVECTOR VUInt, UINT DivExponent);
1897 XMVECTOR XMConvertVectorFloatToUInt(FXMVECTOR VFloat, UINT MulExponent);
1900 FLOAT XMConvertHalfToFloat(HALF Value);
1901 FLOAT* XMConvertHalfToFloatStream(_Out_bytecap_x_(
sizeof(FLOAT)+OutputStride*(HalfCount-1)) FLOAT* pOutputStream,
1902 _In_ UINT OutputStride,
1903 _In_bytecount_x_(
sizeof(HALF)+InputStride*(HalfCount-1)) CONST HALF* pInputStream,
1904 _In_ UINT InputStride, _In_ UINT HalfCount);
1905 HALF XMConvertFloatToHalf(FLOAT Value);
1906 HALF* XMConvertFloatToHalfStream(_Out_bytecap_x_(
sizeof(HALF)+OutputStride*(FloatCount-1)) HALF* pOutputStream,
1907 _In_ UINT OutputStride,
1908 _In_bytecount_x_(
sizeof(FLOAT)+InputStride*(FloatCount-1)) CONST FLOAT* pInputStream,
1909 _In_ UINT InputStride, _In_ UINT FloatCount);
1911 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_) 1913 XMVECTOR XMVectorSetBinaryConstant(UINT C0, UINT C1, UINT C2, UINT C3);
1914 XMVECTOR XMVectorSplatConstant(INT IntConstant, UINT DivExponent);
1915 XMVECTOR XMVectorSplatConstantInt(INT IntConstant);
1924 XMVECTOR XMLoadInt(_In_ CONST UINT* pSource);
1925 XMVECTOR XMLoadFloat(_In_ CONST FLOAT* pSource);
1927 XMVECTOR XMLoadInt2(_In_count_c_(2) CONST UINT* pSource);
1928 XMVECTOR XMLoadInt2A(_In_count_c_(2) CONST UINT* PSource);
1929 XMVECTOR XMLoadFloat2(_In_ CONST
XMFLOAT2* pSource);
1930 XMVECTOR XMLoadFloat2A(_In_ CONST XMFLOAT2A* pSource);
1931 XMVECTOR XMLoadHalf2(_In_ CONST
XMHALF2* pSource);
1932 XMVECTOR XMLoadShortN2(_In_ CONST
XMSHORTN2* pSource);
1933 XMVECTOR XMLoadShort2(_In_ CONST
XMSHORT2* pSource);
1934 XMVECTOR XMLoadUShortN2(_In_ CONST
XMUSHORTN2* pSource);
1935 XMVECTOR XMLoadUShort2(_In_ CONST
XMUSHORT2* pSource);
1937 XMVECTOR XMLoadInt3(_In_count_c_(3) CONST UINT* pSource);
1938 XMVECTOR XMLoadInt3A(_In_count_c_(3) CONST UINT* pSource);
1939 XMVECTOR XMLoadFloat3(_In_ CONST
XMFLOAT3* pSource);
1940 XMVECTOR XMLoadFloat3A(_In_ CONST XMFLOAT3A* pSource);
1941 XMVECTOR XMLoadHenDN3(_In_ CONST
XMHENDN3* pSource);
1942 XMVECTOR XMLoadHenD3(_In_ CONST
XMHEND3* pSource);
1943 XMVECTOR XMLoadUHenDN3(_In_ CONST
XMUHENDN3* pSource);
1944 XMVECTOR XMLoadUHenD3(_In_ CONST
XMUHEND3* pSource);
1945 XMVECTOR XMLoadDHenN3(_In_ CONST
XMDHENN3* pSource);
1946 XMVECTOR XMLoadDHen3(_In_ CONST
XMDHEN3* pSource);
1947 XMVECTOR XMLoadUDHenN3(_In_ CONST
XMUDHENN3* pSource);
1948 XMVECTOR XMLoadUDHen3(_In_ CONST
XMUDHEN3* pSource);
1949 XMVECTOR XMLoadU565(_In_ CONST
XMU565* pSource);
1950 XMVECTOR XMLoadFloat3PK(_In_ CONST
XMFLOAT3PK* pSource);
1951 XMVECTOR XMLoadFloat3SE(_In_ CONST
XMFLOAT3SE* pSource);
1953 XMVECTOR XMLoadInt4(_In_count_c_(4) CONST UINT* pSource);
1954 XMVECTOR XMLoadInt4A(_In_count_c_(4) CONST UINT* pSource);
1955 XMVECTOR XMLoadFloat4(_In_ CONST
XMFLOAT4* pSource);
1956 XMVECTOR XMLoadFloat4A(_In_ CONST XMFLOAT4A* pSource);
1957 XMVECTOR XMLoadHalf4(_In_ CONST
XMHALF4* pSource);
1958 XMVECTOR XMLoadShortN4(_In_ CONST
XMSHORTN4* pSource);
1959 XMVECTOR XMLoadShort4(_In_ CONST
XMSHORT4* pSource);
1960 XMVECTOR XMLoadUShortN4(_In_ CONST
XMUSHORTN4* pSource);
1961 XMVECTOR XMLoadUShort4(_In_ CONST
XMUSHORT4* pSource);
1962 XMVECTOR XMLoadXIcoN4(_In_ CONST
XMXICON4* pSource);
1963 XMVECTOR XMLoadXIco4(_In_ CONST
XMXICO4* pSource);
1964 XMVECTOR XMLoadIcoN4(_In_ CONST
XMICON4* pSource);
1965 XMVECTOR XMLoadIco4(_In_ CONST
XMICO4* pSource);
1966 XMVECTOR XMLoadUIcoN4(_In_ CONST
XMUICON4* pSource);
1967 XMVECTOR XMLoadUIco4(_In_ CONST
XMUICO4* pSource);
1968 XMVECTOR XMLoadXDecN4(_In_ CONST
XMXDECN4* pSource);
1969 XMVECTOR XMLoadXDec4(_In_ CONST
XMXDEC4* pSource);
1970 XMVECTOR XMLoadDecN4(_In_ CONST
XMDECN4* pSource);
1971 XMVECTOR XMLoadDec4(_In_ CONST
XMDEC4* pSource);
1972 XMVECTOR XMLoadUDecN4(_In_ CONST
XMUDECN4* pSource);
1973 XMVECTOR XMLoadUDec4(_In_ CONST
XMUDEC4* pSource);
1974 XMVECTOR XMLoadByteN4(_In_ CONST
XMBYTEN4* pSource);
1975 XMVECTOR XMLoadByte4(_In_ CONST
XMBYTE4* pSource);
1976 XMVECTOR XMLoadUByteN4(_In_ CONST
XMUBYTEN4* pSource);
1977 XMVECTOR XMLoadUByte4(_In_ CONST
XMUBYTE4* pSource);
1978 XMVECTOR XMLoadUNibble4(_In_ CONST
XMUNIBBLE4* pSource);
1979 XMVECTOR XMLoadU555(_In_ CONST
XMU555* pSource);
1980 XMVECTOR XMLoadColor(_In_ CONST
XMCOLOR* pSource);
1982 XMMATRIX XMLoadFloat3x3(_In_ CONST
XMFLOAT3X3* pSource);
1983 XMMATRIX XMLoadFloat4x3(_In_ CONST
XMFLOAT4X3* pSource);
1984 XMMATRIX XMLoadFloat4x3A(_In_ CONST XMFLOAT4X3A* pSource);
1985 XMMATRIX XMLoadFloat4x4(_In_ CONST
XMFLOAT4X4* pSource);
1986 XMMATRIX XMLoadFloat4x4A(_In_ CONST XMFLOAT4X4A* pSource);
1994 VOID XMStoreInt(_Out_ UINT* pDestination, FXMVECTOR V);
1995 VOID XMStoreFloat(_Out_ FLOAT* pDestination, FXMVECTOR V);
1997 VOID XMStoreInt2(_Out_cap_c_(2) UINT* pDestination, FXMVECTOR V);
1998 VOID XMStoreInt2A(_Out_cap_c_(2) UINT* pDestination, FXMVECTOR V);
1999 VOID XMStoreFloat2(_Out_
XMFLOAT2* pDestination, FXMVECTOR V);
2000 VOID XMStoreFloat2A(_Out_ XMFLOAT2A* pDestination, FXMVECTOR V);
2001 VOID XMStoreHalf2(_Out_
XMHALF2* pDestination, FXMVECTOR V);
2002 VOID XMStoreShortN2(_Out_
XMSHORTN2* pDestination, FXMVECTOR V);
2003 VOID XMStoreShort2(_Out_
XMSHORT2* pDestination, FXMVECTOR V);
2004 VOID XMStoreUShortN2(_Out_
XMUSHORTN2* pDestination, FXMVECTOR V);
2005 VOID XMStoreUShort2(_Out_
XMUSHORT2* pDestination, FXMVECTOR V);
2007 VOID XMStoreInt3(_Out_cap_c_(3) UINT* pDestination, FXMVECTOR V);
2008 VOID XMStoreInt3A(_Out_cap_c_(3) UINT* pDestination, FXMVECTOR V);
2009 VOID XMStoreFloat3(_Out_
XMFLOAT3* pDestination, FXMVECTOR V);
2010 VOID XMStoreFloat3A(_Out_ XMFLOAT3A* pDestination, FXMVECTOR V);
2011 VOID XMStoreHenDN3(_Out_
XMHENDN3* pDestination, FXMVECTOR V);
2012 VOID XMStoreHenD3(_Out_
XMHEND3* pDestination, FXMVECTOR V);
2013 VOID XMStoreUHenDN3(_Out_
XMUHENDN3* pDestination, FXMVECTOR V);
2014 VOID XMStoreUHenD3(_Out_
XMUHEND3* pDestination, FXMVECTOR V);
2015 VOID XMStoreDHenN3(_Out_
XMDHENN3* pDestination, FXMVECTOR V);
2016 VOID XMStoreDHen3(_Out_
XMDHEN3* pDestination, FXMVECTOR V);
2017 VOID XMStoreUDHenN3(_Out_
XMUDHENN3* pDestination, FXMVECTOR V);
2018 VOID XMStoreUDHen3(_Out_
XMUDHEN3* pDestination, FXMVECTOR V);
2019 VOID XMStoreU565(_Out_
XMU565* pDestination, FXMVECTOR V);
2020 VOID XMStoreFloat3PK(_Out_
XMFLOAT3PK* pDestination, FXMVECTOR V);
2021 VOID XMStoreFloat3SE(_Out_
XMFLOAT3SE* pDestination, FXMVECTOR V);
2023 VOID XMStoreInt4(_Out_cap_c_(4) UINT* pDestination, FXMVECTOR V);
2024 VOID XMStoreInt4A(_Out_cap_c_(4) UINT* pDestination, FXMVECTOR V);
2025 VOID XMStoreInt4NC(_Out_ UINT* pDestination, FXMVECTOR V);
2026 VOID XMStoreFloat4(_Out_
XMFLOAT4* pDestination, FXMVECTOR V);
2027 VOID XMStoreFloat4A(_Out_ XMFLOAT4A* pDestination, FXMVECTOR V);
2028 VOID XMStoreFloat4NC(_Out_
XMFLOAT4* pDestination, FXMVECTOR V);
2029 VOID XMStoreHalf4(_Out_
XMHALF4* pDestination, FXMVECTOR V);
2030 VOID XMStoreShortN4(_Out_
XMSHORTN4* pDestination, FXMVECTOR V);
2031 VOID XMStoreShort4(_Out_
XMSHORT4* pDestination, FXMVECTOR V);
2032 VOID XMStoreUShortN4(_Out_
XMUSHORTN4* pDestination, FXMVECTOR V);
2033 VOID XMStoreUShort4(_Out_
XMUSHORT4* pDestination, FXMVECTOR V);
2034 VOID XMStoreXIcoN4(_Out_
XMXICON4* pDestination, FXMVECTOR V);
2035 VOID XMStoreXIco4(_Out_
XMXICO4* pDestination, FXMVECTOR V);
2036 VOID XMStoreIcoN4(_Out_
XMICON4* pDestination, FXMVECTOR V);
2037 VOID XMStoreIco4(_Out_
XMICO4* pDestination, FXMVECTOR V);
2038 VOID XMStoreUIcoN4(_Out_
XMUICON4* pDestination, FXMVECTOR V);
2039 VOID XMStoreUIco4(_Out_
XMUICO4* pDestination, FXMVECTOR V);
2040 VOID XMStoreXDecN4(_Out_
XMXDECN4* pDestination, FXMVECTOR V);
2041 VOID XMStoreXDec4(_Out_
XMXDEC4* pDestination, FXMVECTOR V);
2042 VOID XMStoreDecN4(_Out_
XMDECN4* pDestination, FXMVECTOR V);
2043 VOID XMStoreDec4(_Out_
XMDEC4* pDestination, FXMVECTOR V);
2044 VOID XMStoreUDecN4(_Out_
XMUDECN4* pDestination, FXMVECTOR V);
2045 VOID XMStoreUDec4(_Out_
XMUDEC4* pDestination, FXMVECTOR V);
2046 VOID XMStoreByteN4(_Out_
XMBYTEN4* pDestination, FXMVECTOR V);
2047 VOID XMStoreByte4(_Out_
XMBYTE4* pDestination, FXMVECTOR V);
2048 VOID XMStoreUByteN4(_Out_
XMUBYTEN4* pDestination, FXMVECTOR V);
2049 VOID XMStoreUByte4(_Out_
XMUBYTE4* pDestination, FXMVECTOR V);
2050 VOID XMStoreUNibble4(_Out_
XMUNIBBLE4* pDestination, FXMVECTOR V);
2051 VOID XMStoreU555(_Out_
XMU555* pDestination, FXMVECTOR V);
2052 VOID XMStoreColor(_Out_
XMCOLOR* pDestination, FXMVECTOR V);
2054 VOID XMStoreFloat3x3(_Out_
XMFLOAT3X3* pDestination, CXMMATRIX M);
2055 VOID XMStoreFloat3x3NC(_Out_
XMFLOAT3X3* pDestination, CXMMATRIX M);
2056 VOID XMStoreFloat4x3(_Out_
XMFLOAT4X3* pDestination, CXMMATRIX M);
2057 VOID XMStoreFloat4x3A(_Out_ XMFLOAT4X3A* pDestination, CXMMATRIX M);
2058 VOID XMStoreFloat4x3NC(_Out_
XMFLOAT4X3* pDestination, CXMMATRIX M);
2059 VOID XMStoreFloat4x4(_Out_
XMFLOAT4X4* pDestination, CXMMATRIX M);
2060 VOID XMStoreFloat4x4A(_Out_ XMFLOAT4X4A* pDestination, CXMMATRIX M);
2061 VOID XMStoreFloat4x4NC(_Out_
XMFLOAT4X4* pDestination, CXMMATRIX M);
2069 XMVECTOR XMVectorZero();
2070 XMVECTOR XMVectorSet(FLOAT x, FLOAT y, FLOAT z, FLOAT w);
2071 XMVECTOR XMVectorSetInt(UINT x, UINT y, UINT z, UINT w);
2072 XMVECTOR XMVectorReplicate(FLOAT Value);
2073 XMVECTOR XMVectorReplicatePtr(_In_ CONST FLOAT *pValue);
2074 XMVECTOR XMVectorReplicateInt(UINT Value);
2075 XMVECTOR XMVectorReplicateIntPtr(_In_ CONST UINT *pValue);
2076 XMVECTOR XMVectorTrueInt();
2077 XMVECTOR XMVectorFalseInt();
2078 XMVECTOR XMVectorSplatX(FXMVECTOR V);
2079 XMVECTOR XMVectorSplatY(FXMVECTOR V);
2080 XMVECTOR XMVectorSplatZ(FXMVECTOR V);
2081 XMVECTOR XMVectorSplatW(FXMVECTOR V);
2082 XMVECTOR XMVectorSplatOne();
2083 XMVECTOR XMVectorSplatInfinity();
2084 XMVECTOR XMVectorSplatQNaN();
2085 XMVECTOR XMVectorSplatEpsilon();
2086 XMVECTOR XMVectorSplatSignMask();
2088 FLOAT XMVectorGetByIndex(FXMVECTOR V,UINT i);
2089 FLOAT XMVectorGetX(FXMVECTOR V);
2090 FLOAT XMVectorGetY(FXMVECTOR V);
2091 FLOAT XMVectorGetZ(FXMVECTOR V);
2092 FLOAT XMVectorGetW(FXMVECTOR V);
2094 VOID XMVectorGetByIndexPtr(_Out_ FLOAT *f, FXMVECTOR V, UINT i);
2095 VOID XMVectorGetXPtr(_Out_ FLOAT *x, FXMVECTOR V);
2096 VOID XMVectorGetYPtr(_Out_ FLOAT *y, FXMVECTOR V);
2097 VOID XMVectorGetZPtr(_Out_ FLOAT *z, FXMVECTOR V);
2098 VOID XMVectorGetWPtr(_Out_ FLOAT *w, FXMVECTOR V);
2100 UINT XMVectorGetIntByIndex(FXMVECTOR V,UINT i);
2101 UINT XMVectorGetIntX(FXMVECTOR V);
2102 UINT XMVectorGetIntY(FXMVECTOR V);
2103 UINT XMVectorGetIntZ(FXMVECTOR V);
2104 UINT XMVectorGetIntW(FXMVECTOR V);
2106 VOID XMVectorGetIntByIndexPtr(_Out_ UINT *x,FXMVECTOR V, UINT i);
2107 VOID XMVectorGetIntXPtr(_Out_ UINT *x, FXMVECTOR V);
2108 VOID XMVectorGetIntYPtr(_Out_ UINT *y, FXMVECTOR V);
2109 VOID XMVectorGetIntZPtr(_Out_ UINT *z, FXMVECTOR V);
2110 VOID XMVectorGetIntWPtr(_Out_ UINT *w, FXMVECTOR V);
2112 XMVECTOR XMVectorSetByIndex(FXMVECTOR V,FLOAT f,UINT i);
2113 XMVECTOR XMVectorSetX(FXMVECTOR V, FLOAT x);
2114 XMVECTOR XMVectorSetY(FXMVECTOR V, FLOAT y);
2115 XMVECTOR XMVectorSetZ(FXMVECTOR V, FLOAT z);
2116 XMVECTOR XMVectorSetW(FXMVECTOR V, FLOAT w);
2118 XMVECTOR XMVectorSetByIndexPtr(FXMVECTOR V, _In_ CONST FLOAT *f, UINT i);
2119 XMVECTOR XMVectorSetXPtr(FXMVECTOR V, _In_ CONST FLOAT *x);
2120 XMVECTOR XMVectorSetYPtr(FXMVECTOR V, _In_ CONST FLOAT *y);
2121 XMVECTOR XMVectorSetZPtr(FXMVECTOR V, _In_ CONST FLOAT *z);
2122 XMVECTOR XMVectorSetWPtr(FXMVECTOR V, _In_ CONST FLOAT *w);
2124 XMVECTOR XMVectorSetIntByIndex(FXMVECTOR V, UINT x,UINT i);
2125 XMVECTOR XMVectorSetIntX(FXMVECTOR V, UINT x);
2126 XMVECTOR XMVectorSetIntY(FXMVECTOR V, UINT y);
2127 XMVECTOR XMVectorSetIntZ(FXMVECTOR V, UINT z);
2128 XMVECTOR XMVectorSetIntW(FXMVECTOR V, UINT w);
2130 XMVECTOR XMVectorSetIntByIndexPtr(FXMVECTOR V, _In_ CONST UINT *x, UINT i);
2131 XMVECTOR XMVectorSetIntXPtr(FXMVECTOR V, _In_ CONST UINT *x);
2132 XMVECTOR XMVectorSetIntYPtr(FXMVECTOR V, _In_ CONST UINT *y);
2133 XMVECTOR XMVectorSetIntZPtr(FXMVECTOR V, _In_ CONST UINT *z);
2134 XMVECTOR XMVectorSetIntWPtr(FXMVECTOR V, _In_ CONST UINT *w);
2136 XMVECTOR XMVectorPermuteControl(UINT ElementIndex0, UINT ElementIndex1, UINT ElementIndex2, UINT ElementIndex3);
2137 XMVECTOR XMVectorPermute(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Control);
2138 XMVECTOR XMVectorSelectControl(UINT VectorIndex0, UINT VectorIndex1, UINT VectorIndex2, UINT VectorIndex3);
2139 XMVECTOR XMVectorSelect(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Control);
2140 XMVECTOR XMVectorMergeXY(FXMVECTOR V1, FXMVECTOR V2);
2141 XMVECTOR XMVectorMergeZW(FXMVECTOR V1, FXMVECTOR V2);
2143 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_) 2145 XMVECTOR XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2, UINT Elements);
2146 XMVECTOR XMVectorRotateLeft(FXMVECTOR V, UINT Elements);
2147 XMVECTOR XMVectorRotateRight(FXMVECTOR V, UINT Elements);
2148 XMVECTOR XMVectorSwizzle(FXMVECTOR V, UINT E0, UINT E1, UINT E2, UINT E3);
2149 XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, UINT VSLeftRotateElements,
2150 UINT Select0, UINT Select1, UINT Select2, UINT Select3);
2153 XMVECTOR XMVectorEqual(FXMVECTOR V1, FXMVECTOR V2);
2154 XMVECTOR XMVectorEqualR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
2155 XMVECTOR XMVectorEqualInt(FXMVECTOR V1, FXMVECTOR V2);
2156 XMVECTOR XMVectorEqualIntR(_Out_ UINT* pCR, FXMVECTOR V, FXMVECTOR V2);
2157 XMVECTOR XMVectorNearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon);
2158 XMVECTOR XMVectorNotEqual(FXMVECTOR V1, FXMVECTOR V2);
2159 XMVECTOR XMVectorNotEqualInt(FXMVECTOR V1, FXMVECTOR V2);
2160 XMVECTOR XMVectorGreater(FXMVECTOR V1, FXMVECTOR V2);
2161 XMVECTOR XMVectorGreaterR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
2162 XMVECTOR XMVectorGreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2163 XMVECTOR XMVectorGreaterOrEqualR(_Out_ UINT* pCR, FXMVECTOR V1, FXMVECTOR V2);
2164 XMVECTOR XMVectorLess(FXMVECTOR V1, FXMVECTOR V2);
2165 XMVECTOR XMVectorLessOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2166 XMVECTOR XMVectorInBounds(FXMVECTOR V, FXMVECTOR Bounds);
2167 XMVECTOR XMVectorInBoundsR(_Out_ UINT* pCR, FXMVECTOR V, FXMVECTOR Bounds);
2169 XMVECTOR XMVectorIsNaN(FXMVECTOR V);
2170 XMVECTOR XMVectorIsInfinite(FXMVECTOR V);
2172 XMVECTOR XMVectorMin(FXMVECTOR V1,FXMVECTOR V2);
2173 XMVECTOR XMVectorMax(FXMVECTOR V1, FXMVECTOR V2);
2174 XMVECTOR XMVectorRound(FXMVECTOR V);
2175 XMVECTOR XMVectorTruncate(FXMVECTOR V);
2176 XMVECTOR XMVectorFloor(FXMVECTOR V);
2177 XMVECTOR XMVectorCeiling(FXMVECTOR V);
2178 XMVECTOR XMVectorClamp(FXMVECTOR V, FXMVECTOR Min, FXMVECTOR Max);
2179 XMVECTOR XMVectorSaturate(FXMVECTOR V);
2181 XMVECTOR XMVectorAndInt(FXMVECTOR V1, FXMVECTOR V2);
2182 XMVECTOR XMVectorAndCInt(FXMVECTOR V1, FXMVECTOR V2);
2183 XMVECTOR XMVectorOrInt(FXMVECTOR V1, FXMVECTOR V2);
2184 XMVECTOR XMVectorNorInt(FXMVECTOR V1, FXMVECTOR V2);
2185 XMVECTOR XMVectorXorInt(FXMVECTOR V1, FXMVECTOR V2);
2187 XMVECTOR XMVectorNegate(FXMVECTOR V);
2188 XMVECTOR XMVectorAdd(FXMVECTOR V1, FXMVECTOR V2);
2189 XMVECTOR XMVectorAddAngles(FXMVECTOR V1, FXMVECTOR V2);
2190 XMVECTOR XMVectorSubtract(FXMVECTOR V1, FXMVECTOR V2);
2191 XMVECTOR XMVectorSubtractAngles(FXMVECTOR V1, FXMVECTOR V2);
2192 XMVECTOR XMVectorMultiply(FXMVECTOR V1, FXMVECTOR V2);
2193 XMVECTOR XMVectorMultiplyAdd(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3);
2194 XMVECTOR XMVectorDivide(FXMVECTOR V1, FXMVECTOR V2);
2195 XMVECTOR XMVectorNegativeMultiplySubtract(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3);
2196 XMVECTOR XMVectorScale(FXMVECTOR V, FLOAT ScaleFactor);
2197 XMVECTOR XMVectorReciprocalEst(FXMVECTOR V);
2198 XMVECTOR XMVectorReciprocal(FXMVECTOR V);
2199 XMVECTOR XMVectorSqrtEst(FXMVECTOR V);
2200 XMVECTOR XMVectorSqrt(FXMVECTOR V);
2201 XMVECTOR XMVectorReciprocalSqrtEst(FXMVECTOR V);
2202 XMVECTOR XMVectorReciprocalSqrt(FXMVECTOR V);
2203 XMVECTOR XMVectorExpEst(FXMVECTOR V);
2204 XMVECTOR XMVectorExp(FXMVECTOR V);
2205 XMVECTOR XMVectorLogEst(FXMVECTOR V);
2206 XMVECTOR XMVectorLog(FXMVECTOR V);
2207 XMVECTOR XMVectorPowEst(FXMVECTOR V1, FXMVECTOR V2);
2208 XMVECTOR XMVectorPow(FXMVECTOR V1, FXMVECTOR V2);
2209 XMVECTOR XMVectorAbs(FXMVECTOR V);
2210 XMVECTOR XMVectorMod(FXMVECTOR V1, FXMVECTOR V2);
2211 XMVECTOR XMVectorModAngles(FXMVECTOR Angles);
2212 XMVECTOR XMVectorSin(FXMVECTOR V);
2213 XMVECTOR XMVectorSinEst(FXMVECTOR V);
2214 XMVECTOR XMVectorCos(FXMVECTOR V);
2215 XMVECTOR XMVectorCosEst(FXMVECTOR V);
2216 VOID XMVectorSinCos(_Out_ XMVECTOR* pSin, _Out_ XMVECTOR* pCos, FXMVECTOR V);
2217 VOID XMVectorSinCosEst(_Out_ XMVECTOR* pSin, _Out_ XMVECTOR* pCos, FXMVECTOR V);
2218 XMVECTOR XMVectorTan(FXMVECTOR V);
2219 XMVECTOR XMVectorTanEst(FXMVECTOR V);
2220 XMVECTOR XMVectorSinH(FXMVECTOR V);
2221 XMVECTOR XMVectorSinHEst(FXMVECTOR V);
2222 XMVECTOR XMVectorCosH(FXMVECTOR V);
2223 XMVECTOR XMVectorCosHEst(FXMVECTOR V);
2224 XMVECTOR XMVectorTanH(FXMVECTOR V);
2225 XMVECTOR XMVectorTanHEst(FXMVECTOR V);
2226 XMVECTOR XMVectorASin(FXMVECTOR V);
2227 XMVECTOR XMVectorASinEst(FXMVECTOR V);
2228 XMVECTOR XMVectorACos(FXMVECTOR V);
2229 XMVECTOR XMVectorACosEst(FXMVECTOR V);
2230 XMVECTOR XMVectorATan(FXMVECTOR V);
2231 XMVECTOR XMVectorATanEst(FXMVECTOR V);
2232 XMVECTOR XMVectorATan2(FXMVECTOR Y, FXMVECTOR X);
2233 XMVECTOR XMVectorATan2Est(FXMVECTOR Y, FXMVECTOR X);
2234 XMVECTOR XMVectorLerp(FXMVECTOR V0, FXMVECTOR V1, FLOAT t);
2235 XMVECTOR XMVectorLerpV(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR T);
2236 XMVECTOR XMVectorHermite(FXMVECTOR Position0, FXMVECTOR Tangent0, FXMVECTOR Position1, CXMVECTOR Tangent1, FLOAT t);
2237 XMVECTOR XMVectorHermiteV(FXMVECTOR Position0, FXMVECTOR Tangent0, FXMVECTOR Position1, CXMVECTOR Tangent1, CXMVECTOR T);
2238 XMVECTOR XMVectorCatmullRom(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, CXMVECTOR Position3, FLOAT t);
2239 XMVECTOR XMVectorCatmullRomV(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, CXMVECTOR Position3, CXMVECTOR T);
2240 XMVECTOR XMVectorBaryCentric(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, FLOAT f, FLOAT g);
2241 XMVECTOR XMVectorBaryCentricV(FXMVECTOR Position0, FXMVECTOR Position1, FXMVECTOR Position2, CXMVECTOR F, CXMVECTOR G);
2250 BOOL XMVector2Equal(FXMVECTOR V1, FXMVECTOR V2);
2251 UINT XMVector2EqualR(FXMVECTOR V1, FXMVECTOR V2);
2252 BOOL XMVector2EqualInt(FXMVECTOR V1, FXMVECTOR V2);
2253 UINT XMVector2EqualIntR(FXMVECTOR V1, FXMVECTOR V2);
2254 BOOL XMVector2NearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon);
2255 BOOL XMVector2NotEqual(FXMVECTOR V1, FXMVECTOR V2);
2256 BOOL XMVector2NotEqualInt(FXMVECTOR V1, FXMVECTOR V2);
2257 BOOL XMVector2Greater(FXMVECTOR V1, FXMVECTOR V2);
2258 UINT XMVector2GreaterR(FXMVECTOR V1, FXMVECTOR V2);
2259 BOOL XMVector2GreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2260 UINT XMVector2GreaterOrEqualR(FXMVECTOR V1, FXMVECTOR V2);
2261 BOOL XMVector2Less(FXMVECTOR V1, FXMVECTOR V2);
2262 BOOL XMVector2LessOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2263 BOOL XMVector2InBounds(FXMVECTOR V, FXMVECTOR Bounds);
2264 UINT XMVector2InBoundsR(FXMVECTOR V, FXMVECTOR Bounds);
2266 BOOL XMVector2IsNaN(FXMVECTOR V);
2267 BOOL XMVector2IsInfinite(FXMVECTOR V);
2269 XMVECTOR XMVector2Dot(FXMVECTOR V1, FXMVECTOR V2);
2270 XMVECTOR XMVector2Cross(FXMVECTOR V1, FXMVECTOR V2);
2271 XMVECTOR XMVector2LengthSq(FXMVECTOR V);
2272 XMVECTOR XMVector2ReciprocalLengthEst(FXMVECTOR V);
2273 XMVECTOR XMVector2ReciprocalLength(FXMVECTOR V);
2274 XMVECTOR XMVector2LengthEst(FXMVECTOR V);
2275 XMVECTOR XMVector2Length(FXMVECTOR V);
2276 XMVECTOR XMVector2NormalizeEst(FXMVECTOR V);
2277 XMVECTOR XMVector2Normalize(FXMVECTOR V);
2278 XMVECTOR XMVector2ClampLength(FXMVECTOR V, FLOAT LengthMin, FLOAT LengthMax);
2279 XMVECTOR XMVector2ClampLengthV(FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax);
2280 XMVECTOR XMVector2Reflect(FXMVECTOR Incident, FXMVECTOR Normal);
2281 XMVECTOR XMVector2Refract(FXMVECTOR Incident, FXMVECTOR Normal, FLOAT RefractionIndex);
2282 XMVECTOR XMVector2RefractV(FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex);
2283 XMVECTOR XMVector2Orthogonal(FXMVECTOR V);
2284 XMVECTOR XMVector2AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2);
2285 XMVECTOR XMVector2AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2);
2286 XMVECTOR XMVector2AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2);
2287 XMVECTOR XMVector2LinePointDistance(FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point);
2288 XMVECTOR XMVector2IntersectLine(FXMVECTOR Line1Point1, FXMVECTOR Line1Point2, FXMVECTOR Line2Point1, CXMVECTOR Line2Point2);
2289 XMVECTOR XMVector2Transform(FXMVECTOR V, CXMMATRIX M);
2290 XMFLOAT4* XMVector2TransformStream(_Out_bytecap_x_(
sizeof(
XMFLOAT4)+OutputStride*(VectorCount-1))
XMFLOAT4* pOutputStream,
2291 _In_ UINT OutputStride,
2292 _In_bytecount_x_(
sizeof(
XMFLOAT2)+InputStride*(VectorCount-1)) CONST
XMFLOAT2* pInputStream,
2293 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2294 XMFLOAT4* XMVector2TransformStreamNC(_Out_bytecap_x_(
sizeof(
XMFLOAT4)+OutputStride*(VectorCount-1))
XMFLOAT4* pOutputStream,
2295 _In_ UINT OutputStride,
2296 _In_bytecount_x_(
sizeof(
XMFLOAT2)+InputStride*(VectorCount-1)) CONST
XMFLOAT2* pInputStream,
2297 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2298 XMVECTOR XMVector2TransformCoord(FXMVECTOR V, CXMMATRIX M);
2299 XMFLOAT2* XMVector2TransformCoordStream(_Out_bytecap_x_(
sizeof(
XMFLOAT2)+OutputStride*(VectorCount-1))
XMFLOAT2* pOutputStream,
2300 _In_ UINT OutputStride,
2301 _In_bytecount_x_(
sizeof(
XMFLOAT2)+InputStride*(VectorCount-1)) CONST
XMFLOAT2* pInputStream,
2302 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2303 XMVECTOR XMVector2TransformNormal(FXMVECTOR V, CXMMATRIX M);
2304 XMFLOAT2* XMVector2TransformNormalStream(_Out_bytecap_x_(
sizeof(
XMFLOAT2)+OutputStride*(VectorCount-1))
XMFLOAT2* pOutputStream,
2305 _In_ UINT OutputStride,
2306 _In_bytecount_x_(
sizeof(
XMFLOAT2)+InputStride*(VectorCount-1)) CONST
XMFLOAT2* pInputStream,
2307 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2316 BOOL XMVector3Equal(FXMVECTOR V1, FXMVECTOR V2);
2317 UINT XMVector3EqualR(FXMVECTOR V1, FXMVECTOR V2);
2318 BOOL XMVector3EqualInt(FXMVECTOR V1, FXMVECTOR V2);
2319 UINT XMVector3EqualIntR(FXMVECTOR V1, FXMVECTOR V2);
2320 BOOL XMVector3NearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon);
2321 BOOL XMVector3NotEqual(FXMVECTOR V1, FXMVECTOR V2);
2322 BOOL XMVector3NotEqualInt(FXMVECTOR V1, FXMVECTOR V2);
2323 BOOL XMVector3Greater(FXMVECTOR V1, FXMVECTOR V2);
2324 UINT XMVector3GreaterR(FXMVECTOR V1, FXMVECTOR V2);
2325 BOOL XMVector3GreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2326 UINT XMVector3GreaterOrEqualR(FXMVECTOR V1, FXMVECTOR V2);
2327 BOOL XMVector3Less(FXMVECTOR V1, FXMVECTOR V2);
2328 BOOL XMVector3LessOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2329 BOOL XMVector3InBounds(FXMVECTOR V, FXMVECTOR Bounds);
2330 UINT XMVector3InBoundsR(FXMVECTOR V, FXMVECTOR Bounds);
2332 BOOL XMVector3IsNaN(FXMVECTOR V);
2333 BOOL XMVector3IsInfinite(FXMVECTOR V);
2335 XMVECTOR XMVector3Dot(FXMVECTOR V1, FXMVECTOR V2);
2336 XMVECTOR XMVector3Cross(FXMVECTOR V1, FXMVECTOR V2);
2337 XMVECTOR XMVector3LengthSq(FXMVECTOR V);
2338 XMVECTOR XMVector3ReciprocalLengthEst(FXMVECTOR V);
2339 XMVECTOR XMVector3ReciprocalLength(FXMVECTOR V);
2340 XMVECTOR XMVector3LengthEst(FXMVECTOR V);
2341 XMVECTOR XMVector3Length(FXMVECTOR V);
2342 XMVECTOR XMVector3NormalizeEst(FXMVECTOR V);
2343 XMVECTOR XMVector3Normalize(FXMVECTOR V);
2344 XMVECTOR XMVector3ClampLength(FXMVECTOR V, FLOAT LengthMin, FLOAT LengthMax);
2345 XMVECTOR XMVector3ClampLengthV(FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax);
2346 XMVECTOR XMVector3Reflect(FXMVECTOR Incident, FXMVECTOR Normal);
2347 XMVECTOR XMVector3Refract(FXMVECTOR Incident, FXMVECTOR Normal, FLOAT RefractionIndex);
2348 XMVECTOR XMVector3RefractV(FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex);
2349 XMVECTOR XMVector3Orthogonal(FXMVECTOR V);
2350 XMVECTOR XMVector3AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2);
2351 XMVECTOR XMVector3AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2);
2352 XMVECTOR XMVector3AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2);
2353 XMVECTOR XMVector3LinePointDistance(FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point);
2354 VOID XMVector3ComponentsFromNormal(_Out_ XMVECTOR* pParallel, _Out_ XMVECTOR* pPerpendicular, FXMVECTOR V, FXMVECTOR Normal);
2355 XMVECTOR XMVector3Rotate(FXMVECTOR V, FXMVECTOR RotationQuaternion);
2356 XMVECTOR XMVector3InverseRotate(FXMVECTOR V, FXMVECTOR RotationQuaternion);
2357 XMVECTOR XMVector3Transform(FXMVECTOR V, CXMMATRIX M);
2358 XMFLOAT4* XMVector3TransformStream(_Out_bytecap_x_(
sizeof(
XMFLOAT4)+OutputStride*(VectorCount-1))
XMFLOAT4* pOutputStream,
2359 _In_ UINT OutputStride,
2360 _In_bytecount_x_(
sizeof(
XMFLOAT3)+InputStride*(VectorCount-1)) CONST
XMFLOAT3* pInputStream,
2361 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2362 XMFLOAT4* XMVector3TransformStreamNC(_Out_bytecap_x_(
sizeof(
XMFLOAT4)+OutputStride*(VectorCount-1))
XMFLOAT4* pOutputStream,
2363 _In_ UINT OutputStride,
2364 _In_bytecount_x_(
sizeof(
XMFLOAT3)+InputStride*(VectorCount-1)) CONST
XMFLOAT3* pInputStream,
2365 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2366 XMVECTOR XMVector3TransformCoord(FXMVECTOR V, CXMMATRIX M);
2367 XMFLOAT3* XMVector3TransformCoordStream(_Out_bytecap_x_(
sizeof(
XMFLOAT3)+OutputStride*(VectorCount-1))
XMFLOAT3* pOutputStream,
2368 _In_ UINT OutputStride,
2369 _In_bytecount_x_(
sizeof(
XMFLOAT3)+InputStride*(VectorCount-1)) CONST
XMFLOAT3* pInputStream,
2370 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2371 XMVECTOR XMVector3TransformNormal(FXMVECTOR V, CXMMATRIX M);
2372 XMFLOAT3* XMVector3TransformNormalStream(_Out_bytecap_x_(
sizeof(
XMFLOAT3)+OutputStride*(VectorCount-1))
XMFLOAT3* pOutputStream,
2373 _In_ UINT OutputStride,
2374 _In_bytecount_x_(
sizeof(
XMFLOAT3)+InputStride*(VectorCount-1)) CONST
XMFLOAT3* pInputStream,
2375 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2376 XMVECTOR XMVector3Project(FXMVECTOR V, FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
2377 CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
2378 XMFLOAT3* XMVector3ProjectStream(_Out_bytecap_x_(
sizeof(
XMFLOAT3)+OutputStride*(VectorCount-1))
XMFLOAT3* pOutputStream,
2379 _In_ UINT OutputStride,
2380 _In_bytecount_x_(
sizeof(
XMFLOAT3)+InputStride*(VectorCount-1)) CONST
XMFLOAT3* pInputStream,
2381 _In_ UINT InputStride, _In_ UINT VectorCount,
2382 FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
2383 CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
2384 XMVECTOR XMVector3Unproject(FXMVECTOR V, FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
2385 CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
2386 XMFLOAT3* XMVector3UnprojectStream(_Out_bytecap_x_(
sizeof(
XMFLOAT3)+OutputStride*(VectorCount-1))
XMFLOAT3* pOutputStream,
2387 _In_ UINT OutputStride,
2388 _In_bytecount_x_(
sizeof(
XMFLOAT3)+InputStride*(VectorCount-1)) CONST
XMFLOAT3* pInputStream,
2389 _In_ UINT InputStride, _In_ UINT VectorCount,
2390 FLOAT ViewportX, FLOAT ViewportY, FLOAT ViewportWidth, FLOAT ViewportHeight, FLOAT ViewportMinZ, FLOAT ViewportMaxZ,
2391 CXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World);
2399 BOOL XMVector4Equal(FXMVECTOR V1, FXMVECTOR V2);
2400 UINT XMVector4EqualR(FXMVECTOR V1, FXMVECTOR V2);
2401 BOOL XMVector4EqualInt(FXMVECTOR V1, FXMVECTOR V2);
2402 UINT XMVector4EqualIntR(FXMVECTOR V1, FXMVECTOR V2);
2403 BOOL XMVector4NearEqual(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR Epsilon);
2404 BOOL XMVector4NotEqual(FXMVECTOR V1, FXMVECTOR V2);
2405 BOOL XMVector4NotEqualInt(FXMVECTOR V1, FXMVECTOR V2);
2406 BOOL XMVector4Greater(FXMVECTOR V1, FXMVECTOR V2);
2407 UINT XMVector4GreaterR(FXMVECTOR V1, FXMVECTOR V2);
2408 BOOL XMVector4GreaterOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2409 UINT XMVector4GreaterOrEqualR(FXMVECTOR V1, FXMVECTOR V2);
2410 BOOL XMVector4Less(FXMVECTOR V1, FXMVECTOR V2);
2411 BOOL XMVector4LessOrEqual(FXMVECTOR V1, FXMVECTOR V2);
2412 BOOL XMVector4InBounds(FXMVECTOR V, FXMVECTOR Bounds);
2413 UINT XMVector4InBoundsR(FXMVECTOR V, FXMVECTOR Bounds);
2415 BOOL XMVector4IsNaN(FXMVECTOR V);
2416 BOOL XMVector4IsInfinite(FXMVECTOR V);
2418 XMVECTOR XMVector4Dot(FXMVECTOR V1, FXMVECTOR V2);
2419 XMVECTOR XMVector4Cross(FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3);
2420 XMVECTOR XMVector4LengthSq(FXMVECTOR V);
2421 XMVECTOR XMVector4ReciprocalLengthEst(FXMVECTOR V);
2422 XMVECTOR XMVector4ReciprocalLength(FXMVECTOR V);
2423 XMVECTOR XMVector4LengthEst(FXMVECTOR V);
2424 XMVECTOR XMVector4Length(FXMVECTOR V);
2425 XMVECTOR XMVector4NormalizeEst(FXMVECTOR V);
2426 XMVECTOR XMVector4Normalize(FXMVECTOR V);
2427 XMVECTOR XMVector4ClampLength(FXMVECTOR V, FLOAT LengthMin, FLOAT LengthMax);
2428 XMVECTOR XMVector4ClampLengthV(FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax);
2429 XMVECTOR XMVector4Reflect(FXMVECTOR Incident, FXMVECTOR Normal);
2430 XMVECTOR XMVector4Refract(FXMVECTOR Incident, FXMVECTOR Normal, FLOAT RefractionIndex);
2431 XMVECTOR XMVector4RefractV(FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex);
2432 XMVECTOR XMVector4Orthogonal(FXMVECTOR V);
2433 XMVECTOR XMVector4AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2);
2434 XMVECTOR XMVector4AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2);
2435 XMVECTOR XMVector4AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2);
2436 XMVECTOR XMVector4Transform(FXMVECTOR V, CXMMATRIX M);
2437 XMFLOAT4* XMVector4TransformStream(_Out_bytecap_x_(
sizeof(
XMFLOAT4)+OutputStride*(VectorCount-1))
XMFLOAT4* pOutputStream,
2438 _In_ UINT OutputStride,
2439 _In_bytecount_x_(
sizeof(
XMFLOAT4)+InputStride*(VectorCount-1)) CONST
XMFLOAT4* pInputStream,
2440 _In_ UINT InputStride, _In_ UINT VectorCount, CXMMATRIX M);
2448 BOOL XMMatrixIsNaN(CXMMATRIX M);
2449 BOOL XMMatrixIsInfinite(CXMMATRIX M);
2450 BOOL XMMatrixIsIdentity(CXMMATRIX M);
2452 XMMATRIX XMMatrixMultiply(CXMMATRIX M1, CXMMATRIX M2);
2453 XMMATRIX XMMatrixMultiplyTranspose(CXMMATRIX M1, CXMMATRIX M2);
2454 XMMATRIX XMMatrixTranspose(CXMMATRIX M);
2455 XMMATRIX XMMatrixInverse(_Out_ XMVECTOR* pDeterminant, CXMMATRIX M);
2456 XMVECTOR XMMatrixDeterminant(CXMMATRIX M);
2457 BOOL XMMatrixDecompose(_Out_ XMVECTOR *outScale, _Out_ XMVECTOR *outRotQuat, _Out_ XMVECTOR *outTrans, CXMMATRIX M);
2459 XMMATRIX XMMatrixIdentity();
2460 XMMATRIX XMMatrixSet(FLOAT m00, FLOAT m01, FLOAT m02, FLOAT m03,
2461 FLOAT m10, FLOAT m11, FLOAT m12, FLOAT m13,
2462 FLOAT m20, FLOAT m21, FLOAT m22, FLOAT m23,
2463 FLOAT m30, FLOAT m31, FLOAT m32, FLOAT m33);
2464 XMMATRIX XMMatrixTranslation(FLOAT OffsetX, FLOAT OffsetY, FLOAT OffsetZ);
2465 XMMATRIX XMMatrixTranslationFromVector(FXMVECTOR Offset);
2466 XMMATRIX XMMatrixScaling(FLOAT ScaleX, FLOAT ScaleY, FLOAT ScaleZ);
2467 XMMATRIX XMMatrixScalingFromVector(FXMVECTOR Scale);
2468 XMMATRIX XMMatrixRotationX(FLOAT Angle);
2469 XMMATRIX XMMatrixRotationY(FLOAT Angle);
2470 XMMATRIX XMMatrixRotationZ(FLOAT Angle);
2471 XMMATRIX XMMatrixRotationRollPitchYaw(FLOAT Pitch, FLOAT Yaw, FLOAT Roll);
2472 XMMATRIX XMMatrixRotationRollPitchYawFromVector(FXMVECTOR Angles);
2473 XMMATRIX XMMatrixRotationNormal(FXMVECTOR NormalAxis, FLOAT Angle);
2474 XMMATRIX XMMatrixRotationAxis(FXMVECTOR Axis, FLOAT Angle);
2475 XMMATRIX XMMatrixRotationQuaternion(FXMVECTOR Quaternion);
2476 XMMATRIX XMMatrixTransformation2D(FXMVECTOR ScalingOrigin, FLOAT ScalingOrientation, FXMVECTOR Scaling,
2477 FXMVECTOR RotationOrigin, FLOAT Rotation, CXMVECTOR Translation);
2478 XMMATRIX XMMatrixTransformation(FXMVECTOR ScalingOrigin, FXMVECTOR ScalingOrientationQuaternion, FXMVECTOR Scaling,
2479 CXMVECTOR RotationOrigin, CXMVECTOR RotationQuaternion, CXMVECTOR Translation);
2480 XMMATRIX XMMatrixAffineTransformation2D(FXMVECTOR Scaling, FXMVECTOR RotationOrigin, FLOAT Rotation, FXMVECTOR Translation);
2481 XMMATRIX XMMatrixAffineTransformation(FXMVECTOR Scaling, FXMVECTOR RotationOrigin, FXMVECTOR RotationQuaternion, CXMVECTOR Translation);
2482 XMMATRIX XMMatrixReflect(FXMVECTOR ReflectionPlane);
2483 XMMATRIX XMMatrixShadow(FXMVECTOR ShadowPlane, FXMVECTOR LightPosition);
2485 XMMATRIX XMMatrixLookAtLH(FXMVECTOR EyePosition, FXMVECTOR FocusPosition, FXMVECTOR UpDirection);
2486 XMMATRIX XMMatrixLookAtRH(FXMVECTOR EyePosition, FXMVECTOR FocusPosition, FXMVECTOR UpDirection);
2487 XMMATRIX XMMatrixLookToLH(FXMVECTOR EyePosition, FXMVECTOR EyeDirection, FXMVECTOR UpDirection);
2488 XMMATRIX XMMatrixLookToRH(FXMVECTOR EyePosition, FXMVECTOR EyeDirection, FXMVECTOR UpDirection);
2489 XMMATRIX XMMatrixPerspectiveLH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ);
2490 XMMATRIX XMMatrixPerspectiveRH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ);
2491 XMMATRIX XMMatrixPerspectiveFovLH(FLOAT FovAngleY, FLOAT AspectHByW, FLOAT NearZ, FLOAT FarZ);
2492 XMMATRIX XMMatrixPerspectiveFovRH(FLOAT FovAngleY, FLOAT AspectHByW, FLOAT NearZ, FLOAT FarZ);
2493 XMMATRIX XMMatrixPerspectiveOffCenterLH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ);
2494 XMMATRIX XMMatrixPerspectiveOffCenterRH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ);
2495 XMMATRIX XMMatrixOrthographicLH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ);
2496 XMMATRIX XMMatrixOrthographicRH(FLOAT ViewWidth, FLOAT ViewHeight, FLOAT NearZ, FLOAT FarZ);
2497 XMMATRIX XMMatrixOrthographicOffCenterLH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ);
2498 XMMATRIX XMMatrixOrthographicOffCenterRH(FLOAT ViewLeft, FLOAT ViewRight, FLOAT ViewBottom, FLOAT ViewTop, FLOAT NearZ, FLOAT FarZ);
2506 BOOL XMQuaternionEqual(FXMVECTOR Q1, FXMVECTOR Q2);
2507 BOOL XMQuaternionNotEqual(FXMVECTOR Q1, FXMVECTOR Q2);
2509 BOOL XMQuaternionIsNaN(FXMVECTOR Q);
2510 BOOL XMQuaternionIsInfinite(FXMVECTOR Q);
2511 BOOL XMQuaternionIsIdentity(FXMVECTOR Q);
2513 XMVECTOR XMQuaternionDot(FXMVECTOR Q1, FXMVECTOR Q2);
2514 XMVECTOR XMQuaternionMultiply(FXMVECTOR Q1, FXMVECTOR Q2);
2515 XMVECTOR XMQuaternionLengthSq(FXMVECTOR Q);
2516 XMVECTOR XMQuaternionReciprocalLength(FXMVECTOR Q);
2517 XMVECTOR XMQuaternionLength(FXMVECTOR Q);
2518 XMVECTOR XMQuaternionNormalizeEst(FXMVECTOR Q);
2519 XMVECTOR XMQuaternionNormalize(FXMVECTOR Q);
2520 XMVECTOR XMQuaternionConjugate(FXMVECTOR Q);
2521 XMVECTOR XMQuaternionInverse(FXMVECTOR Q);
2522 XMVECTOR XMQuaternionLn(FXMVECTOR Q);
2523 XMVECTOR XMQuaternionExp(FXMVECTOR Q);
2524 XMVECTOR XMQuaternionSlerp(FXMVECTOR Q0, FXMVECTOR Q1, FLOAT t);
2525 XMVECTOR XMQuaternionSlerpV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR T);
2526 XMVECTOR XMQuaternionSquad(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3, FLOAT t);
2527 XMVECTOR XMQuaternionSquadV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3, CXMVECTOR T);
2528 VOID XMQuaternionSquadSetup(_Out_ XMVECTOR* pA, _Out_ XMVECTOR* pB, _Out_ XMVECTOR* pC, FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR Q3);
2529 XMVECTOR XMQuaternionBaryCentric(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, FLOAT f, FLOAT g);
2530 XMVECTOR XMQuaternionBaryCentricV(FXMVECTOR Q0, FXMVECTOR Q1, FXMVECTOR Q2, CXMVECTOR F, CXMVECTOR G);
2532 XMVECTOR XMQuaternionIdentity();
2533 XMVECTOR XMQuaternionRotationRollPitchYaw(FLOAT Pitch, FLOAT Yaw, FLOAT Roll);
2534 XMVECTOR XMQuaternionRotationRollPitchYawFromVector(FXMVECTOR Angles);
2535 XMVECTOR XMQuaternionRotationNormal(FXMVECTOR NormalAxis, FLOAT Angle);
2536 XMVECTOR XMQuaternionRotationAxis(FXMVECTOR Axis, FLOAT Angle);
2537 XMVECTOR XMQuaternionRotationMatrix(CXMMATRIX M);
2539 VOID XMQuaternionToAxisAngle(_Out_ XMVECTOR* pAxis, _Out_ FLOAT* pAngle, FXMVECTOR Q);
2547 BOOL XMPlaneEqual(FXMVECTOR P1, FXMVECTOR P2);
2548 BOOL XMPlaneNearEqual(FXMVECTOR P1, FXMVECTOR P2, FXMVECTOR Epsilon);
2549 BOOL XMPlaneNotEqual(FXMVECTOR P1, FXMVECTOR P2);
2551 BOOL XMPlaneIsNaN(FXMVECTOR P);
2552 BOOL XMPlaneIsInfinite(FXMVECTOR P);
2554 XMVECTOR XMPlaneDot(FXMVECTOR P, FXMVECTOR V);
2555 XMVECTOR XMPlaneDotCoord(FXMVECTOR P, FXMVECTOR V);
2556 XMVECTOR XMPlaneDotNormal(FXMVECTOR P, FXMVECTOR V);
2557 XMVECTOR XMPlaneNormalizeEst(FXMVECTOR P);
2558 XMVECTOR XMPlaneNormalize(FXMVECTOR P);
2559 XMVECTOR XMPlaneIntersectLine(FXMVECTOR P, FXMVECTOR LinePoint1, FXMVECTOR LinePoint2);
2560 VOID XMPlaneIntersectPlane(_Out_ XMVECTOR* pLinePoint1, _Out_ XMVECTOR* pLinePoint2, FXMVECTOR P1, FXMVECTOR P2);
2561 XMVECTOR XMPlaneTransform(FXMVECTOR P, CXMMATRIX M);
2562 XMFLOAT4* XMPlaneTransformStream(_Out_bytecap_x_(
sizeof(
XMFLOAT4)+OutputStride*(PlaneCount-1))
XMFLOAT4* pOutputStream,
2563 _In_ UINT OutputStride,
2564 _In_bytecount_x_(
sizeof(
XMFLOAT4)+InputStride*(PlaneCount-1)) CONST
XMFLOAT4* pInputStream,
2565 _In_ UINT InputStride, _In_ UINT PlaneCount, CXMMATRIX M);
2567 XMVECTOR XMPlaneFromPointNormal(FXMVECTOR Point, FXMVECTOR Normal);
2568 XMVECTOR XMPlaneFromPoints(FXMVECTOR Point1, FXMVECTOR Point2, FXMVECTOR Point3);
2576 BOOL XMColorEqual(FXMVECTOR C1, FXMVECTOR C2);
2577 BOOL XMColorNotEqual(FXMVECTOR C1, FXMVECTOR C2);
2578 BOOL XMColorGreater(FXMVECTOR C1, FXMVECTOR C2);
2579 BOOL XMColorGreaterOrEqual(FXMVECTOR C1, FXMVECTOR C2);
2580 BOOL XMColorLess(FXMVECTOR C1, FXMVECTOR C2);
2581 BOOL XMColorLessOrEqual(FXMVECTOR C1, FXMVECTOR C2);
2583 BOOL XMColorIsNaN(FXMVECTOR C);
2584 BOOL XMColorIsInfinite(FXMVECTOR C);
2586 XMVECTOR XMColorNegative(FXMVECTOR C);
2587 XMVECTOR XMColorModulate(FXMVECTOR C1, FXMVECTOR C2);
2588 XMVECTOR XMColorAdjustSaturation(FXMVECTOR C, FLOAT Saturation);
2589 XMVECTOR XMColorAdjustContrast(FXMVECTOR C, FLOAT Contrast);
2597 BOOL XMVerifyCPUSupport();
2599 VOID XMAssert(_In_z_ CONST CHAR* pExpression, _In_z_ CONST CHAR* pFileName, UINT LineNumber);
2601 XMVECTOR XMFresnelTerm(FXMVECTOR CosIncidentAngle, FXMVECTOR RefractionIndex);
2603 BOOL XMScalarNearEqual(FLOAT S1, FLOAT S2, FLOAT Epsilon);
2604 FLOAT XMScalarModAngle(FLOAT Value);
2605 FLOAT XMScalarSin(FLOAT Value);
2606 FLOAT XMScalarCos(FLOAT Value);
2607 VOID XMScalarSinCos(_Out_ FLOAT* pSin, _Out_ FLOAT* pCos, FLOAT Value);
2608 FLOAT XMScalarASin(FLOAT Value);
2609 FLOAT XMScalarACos(FLOAT Value);
2610 FLOAT XMScalarSinEst(FLOAT Value);
2611 FLOAT XMScalarCosEst(FLOAT Value);
2612 VOID XMScalarSinCosEst(_Out_ FLOAT* pSin, _Out_ FLOAT* pCos, FLOAT Value);
2613 FLOAT XMScalarASinEst(FLOAT Value);
2614 FLOAT XMScalarACosEst(FLOAT Value);
2630 #define XMGLOBALCONST extern CONST __declspec(selectany) 2632 XMGLOBALCONST
XMVECTORF32 g_XMSinCoefficients0 = {1.0f, -0.166666667f, 8.333333333e-3f, -1.984126984e-4f};
2633 XMGLOBALCONST
XMVECTORF32 g_XMSinCoefficients1 = {2.755731922e-6f, -2.505210839e-8f, 1.605904384e-10f, -7.647163732e-13f};
2634 XMGLOBALCONST
XMVECTORF32 g_XMSinCoefficients2 = {2.811457254e-15f, -8.220635247e-18f, 1.957294106e-20f, -3.868170171e-23f};
2635 XMGLOBALCONST
XMVECTORF32 g_XMCosCoefficients0 = {1.0f, -0.5f, 4.166666667e-2f, -1.388888889e-3f};
2636 XMGLOBALCONST
XMVECTORF32 g_XMCosCoefficients1 = {2.480158730e-5f, -2.755731922e-7f, 2.087675699e-9f, -1.147074560e-11f};
2637 XMGLOBALCONST
XMVECTORF32 g_XMCosCoefficients2 = {4.779477332e-14f, -1.561920697e-16f, 4.110317623e-19f, -8.896791392e-22f};
2638 XMGLOBALCONST
XMVECTORF32 g_XMTanCoefficients0 = {1.0f, 0.333333333f, 0.133333333f, 5.396825397e-2f};
2639 XMGLOBALCONST
XMVECTORF32 g_XMTanCoefficients1 = {2.186948854e-2f, 8.863235530e-3f, 3.592128167e-3f, 1.455834485e-3f};
2640 XMGLOBALCONST
XMVECTORF32 g_XMTanCoefficients2 = {5.900274264e-4f, 2.391290764e-4f, 9.691537707e-5f, 3.927832950e-5f};
2641 XMGLOBALCONST
XMVECTORF32 g_XMASinCoefficients0 = {-0.05806367563904f, -0.41861972469416f, 0.22480114791621f, 2.17337241360606f};
2642 XMGLOBALCONST
XMVECTORF32 g_XMASinCoefficients1 = {0.61657275907170f, 4.29696498283455f, -1.18942822255452f, -6.53784832094831f};
2643 XMGLOBALCONST
XMVECTORF32 g_XMASinCoefficients2 = {-1.36926553863413f, -4.48179294237210f, 1.41810672941833f, 5.48179257935713f};
2644 XMGLOBALCONST
XMVECTORF32 g_XMATanCoefficients0 = {1.0f, 0.333333334f, 0.2f, 0.142857143f};
2645 XMGLOBALCONST
XMVECTORF32 g_XMATanCoefficients1 = {1.111111111e-1f, 9.090909091e-2f, 7.692307692e-2f, 6.666666667e-2f};
2646 XMGLOBALCONST
XMVECTORF32 g_XMATanCoefficients2 = {5.882352941e-2f, 5.263157895e-2f, 4.761904762e-2f, 4.347826087e-2f};
2647 XMGLOBALCONST
XMVECTORF32 g_XMSinEstCoefficients = {1.0f, -1.66521856991541e-1f, 8.199913018755e-3f, -1.61475937228e-4f};
2648 XMGLOBALCONST
XMVECTORF32 g_XMCosEstCoefficients = {1.0f, -4.95348008918096e-1f, 3.878259962881e-2f, -9.24587976263e-4f};
2649 XMGLOBALCONST
XMVECTORF32 g_XMTanEstCoefficients = {2.484f, -1.954923183e-1f, 2.467401101f, XM_1DIVPI};
2650 XMGLOBALCONST
XMVECTORF32 g_XMATanEstCoefficients = {7.689891418951e-1f, 1.104742493348f, 8.661844266006e-1f, XM_PIDIV2};
2651 XMGLOBALCONST
XMVECTORF32 g_XMASinEstCoefficients = {-1.36178272886711f, 2.37949493464538f, -8.08228565650486e-1f, 2.78440142746736e-1f};
2652 XMGLOBALCONST
XMVECTORF32 g_XMASinEstConstants = {1.00000011921f, XM_PIDIV2, 0.0f, 0.0f};
2653 XMGLOBALCONST
XMVECTORF32 g_XMPiConstants0 = {XM_PI, XM_2PI, XM_1DIVPI, XM_1DIV2PI};
2654 XMGLOBALCONST
XMVECTORF32 g_XMIdentityR0 = {1.0f, 0.0f, 0.0f, 0.0f};
2655 XMGLOBALCONST
XMVECTORF32 g_XMIdentityR1 = {0.0f, 1.0f, 0.0f, 0.0f};
2656 XMGLOBALCONST
XMVECTORF32 g_XMIdentityR2 = {0.0f, 0.0f, 1.0f, 0.0f};
2657 XMGLOBALCONST
XMVECTORF32 g_XMIdentityR3 = {0.0f, 0.0f, 0.0f, 1.0f};
2658 XMGLOBALCONST
XMVECTORF32 g_XMNegIdentityR0 = {-1.0f,0.0f, 0.0f, 0.0f};
2659 XMGLOBALCONST
XMVECTORF32 g_XMNegIdentityR1 = {0.0f,-1.0f, 0.0f, 0.0f};
2660 XMGLOBALCONST
XMVECTORF32 g_XMNegIdentityR2 = {0.0f, 0.0f,-1.0f, 0.0f};
2661 XMGLOBALCONST
XMVECTORF32 g_XMNegIdentityR3 = {0.0f, 0.0f, 0.0f,-1.0f};
2662 XMGLOBALCONST
XMVECTORI32 g_XMNegativeZero = {0x80000000, 0x80000000, 0x80000000, 0x80000000};
2663 XMGLOBALCONST
XMVECTORI32 g_XMNegate3 = {0x80000000, 0x80000000, 0x80000000, 0x00000000};
2664 XMGLOBALCONST
XMVECTORI32 g_XMMask3 = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000};
2665 XMGLOBALCONST
XMVECTORI32 g_XMMaskX = {0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000};
2666 XMGLOBALCONST
XMVECTORI32 g_XMMaskY = {0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000};
2667 XMGLOBALCONST
XMVECTORI32 g_XMMaskZ = {0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000};
2668 XMGLOBALCONST
XMVECTORI32 g_XMMaskW = {0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF};
2669 XMGLOBALCONST
XMVECTORF32 g_XMOne = { 1.0f, 1.0f, 1.0f, 1.0f};
2670 XMGLOBALCONST
XMVECTORF32 g_XMOne3 = { 1.0f, 1.0f, 1.0f, 0.0f};
2671 XMGLOBALCONST
XMVECTORF32 g_XMZero = { 0.0f, 0.0f, 0.0f, 0.0f};
2672 XMGLOBALCONST
XMVECTORF32 g_XMNegativeOne = {-1.0f,-1.0f,-1.0f,-1.0f};
2673 XMGLOBALCONST
XMVECTORF32 g_XMOneHalf = { 0.5f, 0.5f, 0.5f, 0.5f};
2674 XMGLOBALCONST
XMVECTORF32 g_XMNegativeOneHalf = {-0.5f,-0.5f,-0.5f,-0.5f};
2675 XMGLOBALCONST
XMVECTORF32 g_XMNegativeTwoPi = {-XM_2PI, -XM_2PI, -XM_2PI, -XM_2PI};
2676 XMGLOBALCONST
XMVECTORF32 g_XMNegativePi = {-XM_PI, -XM_PI, -XM_PI, -XM_PI};
2677 XMGLOBALCONST
XMVECTORF32 g_XMHalfPi = {XM_PIDIV2, XM_PIDIV2, XM_PIDIV2, XM_PIDIV2};
2678 XMGLOBALCONST
XMVECTORF32 g_XMPi = {XM_PI, XM_PI, XM_PI, XM_PI};
2679 XMGLOBALCONST
XMVECTORF32 g_XMReciprocalPi = {XM_1DIVPI, XM_1DIVPI, XM_1DIVPI, XM_1DIVPI};
2680 XMGLOBALCONST
XMVECTORF32 g_XMTwoPi = {XM_2PI, XM_2PI, XM_2PI, XM_2PI};
2681 XMGLOBALCONST
XMVECTORF32 g_XMReciprocalTwoPi = {XM_1DIV2PI, XM_1DIV2PI, XM_1DIV2PI, XM_1DIV2PI};
2682 XMGLOBALCONST
XMVECTORF32 g_XMEpsilon = {1.192092896e-7f, 1.192092896e-7f, 1.192092896e-7f, 1.192092896e-7f};
2683 XMGLOBALCONST
XMVECTORI32 g_XMInfinity = {0x7F800000, 0x7F800000, 0x7F800000, 0x7F800000};
2684 XMGLOBALCONST
XMVECTORI32 g_XMQNaN = {0x7FC00000, 0x7FC00000, 0x7FC00000, 0x7FC00000};
2685 XMGLOBALCONST
XMVECTORI32 g_XMQNaNTest = {0x007FFFFF, 0x007FFFFF, 0x007FFFFF, 0x007FFFFF};
2686 XMGLOBALCONST
XMVECTORI32 g_XMAbsMask = {0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF};
2687 XMGLOBALCONST
XMVECTORI32 g_XMFltMin = {0x00800000, 0x00800000, 0x00800000, 0x00800000};
2688 XMGLOBALCONST
XMVECTORI32 g_XMFltMax = {0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF, 0x7F7FFFFF};
2689 XMGLOBALCONST
XMVECTORI32 g_XMNegOneMask = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF};
2690 XMGLOBALCONST
XMVECTORI32 g_XMMaskA8R8G8B8 = {0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000};
2691 XMGLOBALCONST
XMVECTORI32 g_XMFlipA8R8G8B8 = {0x00000000, 0x00000000, 0x00000000, 0x80000000};
2692 XMGLOBALCONST
XMVECTORF32 g_XMFixAA8R8G8B8 = {0.0f,0.0f,0.0f,(float)(0x80000000U)};
2693 XMGLOBALCONST
XMVECTORF32 g_XMNormalizeA8R8G8B8 = {1.0f/(255.0f*(float)(0x10000)),1.0f/(255.0f*(
float)(0x100)),1.0f/255.0f,1.0f/(255.0f*(float)(0x1000000))};
2694 XMGLOBALCONST
XMVECTORI32 g_XMMaskA2B10G10R10 = {0x000003FF, 0x000FFC00, 0x3FF00000, 0xC0000000};
2695 XMGLOBALCONST
XMVECTORI32 g_XMFlipA2B10G10R10 = {0x00000200, 0x00080000, 0x20000000, 0x80000000};
2696 XMGLOBALCONST
XMVECTORF32 g_XMFixAA2B10G10R10 = {-512.0f,-512.0f*(float)(0x400),-512.0f*(float)(0x100000),(float)(0x80000000U)};
2697 XMGLOBALCONST
XMVECTORF32 g_XMNormalizeA2B10G10R10 = {1.0f/511.0f,1.0f/(511.0f*(float)(0x400)),1.0f/(511.0f*(
float)(0x100000)),1.0f/(3.0f*(float)(0x40000000))};
2698 XMGLOBALCONST
XMVECTORI32 g_XMMaskX16Y16 = {0x0000FFFF, 0xFFFF0000, 0x00000000, 0x00000000};
2699 XMGLOBALCONST
XMVECTORI32 g_XMFlipX16Y16 = {0x00008000, 0x00000000, 0x00000000, 0x00000000};
2700 XMGLOBALCONST
XMVECTORF32 g_XMFixX16Y16 = {-32768.0f,0.0f,0.0f,0.0f};
2701 XMGLOBALCONST
XMVECTORF32 g_XMNormalizeX16Y16 = {1.0f/32767.0f,1.0f/(32767.0f*65536.0f),0.0f,0.0f};
2702 XMGLOBALCONST
XMVECTORI32 g_XMMaskX16Y16Z16W16 = {0x0000FFFF, 0x0000FFFF, 0xFFFF0000, 0xFFFF0000};
2703 XMGLOBALCONST
XMVECTORI32 g_XMFlipX16Y16Z16W16 = {0x00008000, 0x00008000, 0x00000000, 0x00000000};
2704 XMGLOBALCONST
XMVECTORF32 g_XMFixX16Y16Z16W16 = {-32768.0f,-32768.0f,0.0f,0.0f};
2705 XMGLOBALCONST
XMVECTORF32 g_XMNormalizeX16Y16Z16W16 = {1.0f/32767.0f,1.0f/32767.0f,1.0f/(32767.0f*65536.0f),1.0f/(32767.0f*65536.0f)};
2706 XMGLOBALCONST
XMVECTORF32 g_XMNoFraction = {8388608.0f,8388608.0f,8388608.0f,8388608.0f};
2707 XMGLOBALCONST
XMVECTORI32 g_XMMaskByte = {0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF};
2708 XMGLOBALCONST
XMVECTORF32 g_XMNegateX = {-1.0f, 1.0f, 1.0f, 1.0f};
2709 XMGLOBALCONST
XMVECTORF32 g_XMNegateY = { 1.0f,-1.0f, 1.0f, 1.0f};
2710 XMGLOBALCONST
XMVECTORF32 g_XMNegateZ = { 1.0f, 1.0f,-1.0f, 1.0f};
2711 XMGLOBALCONST
XMVECTORF32 g_XMNegateW = { 1.0f, 1.0f, 1.0f,-1.0f};
2712 XMGLOBALCONST
XMVECTORI32 g_XMSelect0101 = {XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_1};
2713 XMGLOBALCONST
XMVECTORI32 g_XMSelect1010 = {XM_SELECT_1, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0};
2714 XMGLOBALCONST
XMVECTORI32 g_XMOneHalfMinusEpsilon = { 0x3EFFFFFD, 0x3EFFFFFD, 0x3EFFFFFD, 0x3EFFFFFD};
2715 XMGLOBALCONST
XMVECTORI32 g_XMSelect1000 = {XM_SELECT_1, XM_SELECT_0, XM_SELECT_0, XM_SELECT_0};
2716 XMGLOBALCONST
XMVECTORI32 g_XMSelect1100 = {XM_SELECT_1, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0};
2717 XMGLOBALCONST
XMVECTORI32 g_XMSelect1110 = {XM_SELECT_1, XM_SELECT_1, XM_SELECT_1, XM_SELECT_0};
2718 XMGLOBALCONST
XMVECTORI32 g_XMSwizzleXYXY = {XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_0Y};
2719 XMGLOBALCONST
XMVECTORI32 g_XMSwizzleXYZX = {XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0X};
2720 XMGLOBALCONST
XMVECTORI32 g_XMSwizzleYXZW = {XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_0Z, XM_PERMUTE_0W};
2721 XMGLOBALCONST
XMVECTORI32 g_XMSwizzleYZXW = {XM_PERMUTE_0Y, XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0W};
2722 XMGLOBALCONST
XMVECTORI32 g_XMSwizzleZXYW = {XM_PERMUTE_0Z, XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_0W};
2723 XMGLOBALCONST
XMVECTORI32 g_XMPermute0X0Y1X1Y = {XM_PERMUTE_0X, XM_PERMUTE_0Y, XM_PERMUTE_1X, XM_PERMUTE_1Y};
2724 XMGLOBALCONST
XMVECTORI32 g_XMPermute0Z0W1Z1W = {XM_PERMUTE_0Z, XM_PERMUTE_0W, XM_PERMUTE_1Z, XM_PERMUTE_1W};
2725 XMGLOBALCONST
XMVECTORF32 g_XMFixupY16 = {1.0f,1.0f/65536.0f,0.0f,0.0f};
2726 XMGLOBALCONST
XMVECTORF32 g_XMFixupY16W16 = {1.0f,1.0f,1.0f/65536.0f,1.0f/65536.0f};
2727 XMGLOBALCONST
XMVECTORI32 g_XMFlipY = {0,0x80000000,0,0};
2728 XMGLOBALCONST
XMVECTORI32 g_XMFlipZ = {0,0,0x80000000,0};
2729 XMGLOBALCONST
XMVECTORI32 g_XMFlipW = {0,0,0,0x80000000};
2730 XMGLOBALCONST
XMVECTORI32 g_XMFlipYZ = {0,0x80000000,0x80000000,0};
2731 XMGLOBALCONST
XMVECTORI32 g_XMFlipZW = {0,0,0x80000000,0x80000000};
2732 XMGLOBALCONST
XMVECTORI32 g_XMFlipYW = {0,0x80000000,0,0x80000000};
2733 XMGLOBALCONST
XMVECTORI32 g_XMMaskHenD3 = {0x7FF,0x7ff<<11,0x3FF<<22,0};
2734 XMGLOBALCONST
XMVECTORI32 g_XMMaskDHen3 = {0x3FF,0x7ff<<10,0x7FF<<21,0};
2735 XMGLOBALCONST
XMVECTORF32 g_XMAddUHenD3 = {0,0,32768.0f*65536.0f,0};
2736 XMGLOBALCONST
XMVECTORF32 g_XMAddHenD3 = {-1024.0f,-1024.0f*2048.0f,0,0};
2737 XMGLOBALCONST
XMVECTORF32 g_XMAddDHen3 = {-512.0f,-1024.0f*1024.0f,0,0};
2738 XMGLOBALCONST
XMVECTORF32 g_XMMulHenD3 = {1.0f,1.0f/2048.0f,1.0f/(2048.0f*2048.0f),0};
2739 XMGLOBALCONST
XMVECTORF32 g_XMMulDHen3 = {1.0f,1.0f/1024.0f,1.0f/(1024.0f*2048.0f),0};
2740 XMGLOBALCONST
XMVECTORI32 g_XMXorHenD3 = {0x400,0x400<<11,0,0};
2741 XMGLOBALCONST
XMVECTORI32 g_XMXorDHen3 = {0x200,0x400<<10,0,0};
2742 XMGLOBALCONST
XMVECTORI32 g_XMMaskIco4 = {0xFFFFF,0xFFFFF000,0xFFFFF,0xF0000000};
2743 XMGLOBALCONST
XMVECTORI32 g_XMXorXIco4 = {0x80000,0,0x80000,0x80000000};
2744 XMGLOBALCONST
XMVECTORI32 g_XMXorIco4 = {0x80000,0,0x80000,0};
2745 XMGLOBALCONST
XMVECTORF32 g_XMAddXIco4 = {-8.0f*65536.0f,0,-8.0f*65536.0f,32768.0f*65536.0f};
2746 XMGLOBALCONST
XMVECTORF32 g_XMAddUIco4 = {0,32768.0f*65536.0f,0,32768.0f*65536.0f};
2747 XMGLOBALCONST
XMVECTORF32 g_XMAddIco4 = {-8.0f*65536.0f,0,-8.0f*65536.0f,0};
2748 XMGLOBALCONST
XMVECTORF32 g_XMMulIco4 = {1.0f,1.0f/4096.0f,1.0f,1.0f/(4096.0f*65536.0f)};
2749 XMGLOBALCONST
XMVECTORI32 g_XMMaskDec4 = {0x3FF,0x3FF<<10,0x3FF<<20,0x3<<30};
2750 XMGLOBALCONST
XMVECTORI32 g_XMXorDec4 = {0x200,0x200<<10,0x200<<20,0};
2751 XMGLOBALCONST
XMVECTORF32 g_XMAddUDec4 = {0,0,0,32768.0f*65536.0f};
2752 XMGLOBALCONST
XMVECTORF32 g_XMAddDec4 = {-512.0f,-512.0f*1024.0f,-512.0f*1024.0f*1024.0f,0};
2753 XMGLOBALCONST
XMVECTORF32 g_XMMulDec4 = {1.0f,1.0f/1024.0f,1.0f/(1024.0f*1024.0f),1.0f/(1024.0f*1024.0f*1024.0f)};
2754 XMGLOBALCONST
XMVECTORI32 g_XMMaskByte4 = {0xFF,0xFF00,0xFF0000,0xFF000000};
2755 XMGLOBALCONST
XMVECTORI32 g_XMXorByte4 = {0x80,0x8000,0x800000,0x00000000};
2756 XMGLOBALCONST
XMVECTORF32 g_XMAddByte4 = {-128.0f,-128.0f*256.0f,-128.0f*65536.0f,0};
2764 #pragma warning(push) 2765 #pragma warning(disable:4214 4204 4365 4616 6001) 2767 #if !defined(__cplusplus) && !defined(_XBOX) && defined(_XM_ISVS2005_) 2774 #define logf(x) ((float)log((double)(x))) 2776 #endif // !defined(__cplusplus) && !defined(_XBOX) && defined(_XM_ISVS2005_) 2780 #if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_) 2782 XMFINLINE XMVECTOR XMVectorSetBinaryConstant(UINT C0, UINT C1, UINT C2, UINT C3)
2784 #if defined(_XM_NO_INTRINSICS_) 2786 vResult.u[0] = (0-(C0&1)) & 0x3F800000;
2787 vResult.u[1] = (0-(C1&1)) & 0x3F800000;
2788 vResult.u[2] = (0-(C2&1)) & 0x3F800000;
2789 vResult.u[3] = (0-(C3&1)) & 0x3F800000;
2791 #else // XM_SSE_INTRINSICS_ 2794 __m128i vTemp = _mm_set_epi32(C3,C2,C1,C0);
2796 vTemp = _mm_and_si128(vTemp,g_vMask1);
2798 vTemp = _mm_cmpeq_epi32(vTemp,g_vMask1);
2800 vTemp = _mm_and_si128(vTemp,g_XMOne);
2801 return reinterpret_cast<const __m128 *
>(&vTemp)[0];
2807 XMFINLINE XMVECTOR XMVectorSplatConstant(INT IntConstant, UINT DivExponent)
2809 #if defined(_XM_NO_INTRINSICS_) 2810 XMASSERT( IntConstant >= -16 && IntConstant <= 15 );
2811 XMASSERT(DivExponent<32);
2813 XMVECTORI32 V = { IntConstant, IntConstant, IntConstant, IntConstant };
2814 return XMConvertVectorIntToFloat( V.v, DivExponent);
2816 #else // XM_SSE_INTRINSICS_ 2817 XMASSERT( IntConstant >= -16 && IntConstant <= 15 );
2818 XMASSERT(DivExponent<32);
2820 __m128i vScale = _mm_set1_epi32(IntConstant);
2822 XMVECTOR vResult = _mm_cvtepi32_ps(vScale);
2824 UINT uScale = 0x3F800000U - (DivExponent << 23);
2826 vScale = _mm_set1_epi32(uScale);
2828 vResult = _mm_mul_ps(vResult,reinterpret_cast<const __m128 *>(&vScale)[0]);
2835 XMFINLINE XMVECTOR XMVectorSplatConstantInt(INT IntConstant)
2837 #if defined(_XM_NO_INTRINSICS_) 2838 XMASSERT( IntConstant >= -16 && IntConstant <= 15 );
2840 XMVECTORI32 V = { IntConstant, IntConstant, IntConstant, IntConstant };
2843 #else // XM_SSE_INTRINSICS_ 2844 XMASSERT( IntConstant >= -16 && IntConstant <= 15 );
2845 __m128i V = _mm_set1_epi32( IntConstant );
2846 return reinterpret_cast<__m128 *
>(&V)[0];
2852 XMFINLINE XMVECTOR XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2, UINT Elements)
2854 return XMVectorPermute(V1, V2, XMVectorPermuteControl((Elements), ((Elements) + 1), ((Elements) + 2), ((Elements) + 3)));
2859 XMFINLINE XMVECTOR XMVectorRotateLeft(FXMVECTOR V, UINT Elements)
2861 #if defined(_XM_NO_INTRINSICS_) 2862 XMASSERT( Elements < 4 );
2864 XMVECTORF32 vResult = { V.vector4_f32[Elements & 3], V.vector4_f32[(Elements + 1) & 3],
2865 V.vector4_f32[(Elements + 2) & 3], V.vector4_f32[(Elements + 3) & 3] };
2868 #else // XM_SSE_INTRINSICS_ 2869 FLOAT fx = XMVectorGetByIndex(V,(Elements) & 3);
2870 FLOAT fy = XMVectorGetByIndex(V,((Elements) + 1) & 3);
2871 FLOAT fz = XMVectorGetByIndex(V,((Elements) + 2) & 3);
2872 FLOAT fw = XMVectorGetByIndex(V,((Elements) + 3) & 3);
2873 return _mm_set_ps( fw, fz, fy, fx );
2879 XMFINLINE XMVECTOR XMVectorRotateRight(FXMVECTOR V, UINT Elements)
2881 #if defined(_XM_NO_INTRINSICS_) 2882 XMASSERT( Elements < 4 );
2884 XMVECTORF32 vResult = { V.vector4_f32[(4 - (Elements)) & 3], V.vector4_f32[(5 - (Elements)) & 3],
2885 V.vector4_f32[(6 - (Elements)) & 3], V.vector4_f32[(7 - (Elements)) & 3] };
2888 #else // XM_SSE_INTRINSICS_ 2889 FLOAT fx = XMVectorGetByIndex(V,(4 - (Elements)) & 3);
2890 FLOAT fy = XMVectorGetByIndex(V,(5 - (Elements)) & 3);
2891 FLOAT fz = XMVectorGetByIndex(V,(6 - (Elements)) & 3);
2892 FLOAT fw = XMVectorGetByIndex(V,(7 - (Elements)) & 3);
2893 return _mm_set_ps( fw, fz, fy, fx );
2899 XMFINLINE XMVECTOR XMVectorSwizzle(FXMVECTOR V, UINT E0, UINT E1, UINT E2, UINT E3)
2901 #if defined(_XM_NO_INTRINSICS_) 2902 XMASSERT( (E0 < 4) && (E1 < 4) && (E2 < 4) && (E3 < 4) );
2904 XMVECTORF32 vResult = { V.vector4_f32[E0], V.vector4_f32[E1], V.vector4_f32[E2], V.vector4_f32[E3] };
2907 #else // XM_SSE_INTRINSICS_ 2908 FLOAT fx = XMVectorGetByIndex(V,E0);
2909 FLOAT fy = XMVectorGetByIndex(V,E1);
2910 FLOAT fz = XMVectorGetByIndex(V,E2);
2911 FLOAT fw = XMVectorGetByIndex(V,E3);
2912 return _mm_set_ps( fw, fz, fy, fx );
2918 XMFINLINE XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, UINT VSLeftRotateElements,
2919 UINT Select0, UINT Select1, UINT Select2, UINT Select3)
2921 XMVECTOR Control = XMVectorSelectControl(Select0&1, Select1&1, Select2&1, Select3&1);
2922 return XMVectorSelect( VD, XMVectorRotateLeft(VS, VSLeftRotateElements), Control );
2926 #endif _XM_NO_INTRINSICS_ || _XM_SSE_INTRINSICS_ 2930 #include "xnamathconvert.inl" 2931 #include "xnamathvector.inl" 2932 #include "xnamathmatrix.inl" 2933 #include "xnamathmisc.inl" 2935 #pragma warning(pop) 2937 #endif // __XNAMATH_H__ Definition: xnamath.h:272
Definition: xnamath.h:912
Definition: xnamath.h:229
Definition: xnamath.h:521
Definition: xnamath.h:244
Definition: xnamath.h:1128
Definition: xnamath.h:1675
Definition: xnamath.h:1164
Definition: xnamath.h:769
Definition: xnamath.h:1344
Definition: xnamath.h:1065
Definition: xnamath.h:804
Definition: xnamath.h:734
Definition: xnamath.h:461
Definition: xnamath.h:441
Definition: xnamath.h:1021
Definition: xnamath.h:699
Definition: xnamath.h:873
Definition: xnamath.h:559
Definition: xnamath.h:834
Definition: xnamath.h:1272
Definition: xnamath.h:1200
Definition: xnamath.h:1452
Definition: xnamath.h:334
Definition: xnamath.h:1524
Definition: xnamath.h:1488
Definition: xnamath.h:594
Definition: xnamath.h:1555
Definition: xnamath.h:1826
Definition: xnamath.h:1236
Definition: xnamath.h:999
Definition: xnamath.h:629
Definition: xnamath.h:481
Definition: xnamath.h:1043
Definition: xnamath.h:501
Definition: xnamath.h:1416
Definition: xnamath.h:1772
Definition: xnamath.h:1741
Definition: xnamath.h:664
Definition: xnamath.h:389
Definition: xnamath.h:1308
Definition: xnamath.h:1585
Definition: xnamath.h:977
Definition: xnamath.h:421
Definition: xnamath.h:1380
Definition: xnamath.h:943
Definition: xnamath.h:1708
Definition: xnamath.h:1092
Definition: xnamath.h:1645
Definition: xnamath.h:1615
Definition: xnamath.h:258