Atom
xnamath.h
1 /*++
2 
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 
5 Module Name:
6 
7  xnamath.h
8 
9 Abstract:
10 
11  XNA math library for Windows and Xbox 360
12 --*/
13 
14 #if defined(_MSC_VER) && (_MSC_VER > 1000)
15 #pragma once
16 #endif
17 
18 #ifndef __XNAMATH_H__
19 #define __XNAMATH_H__
20 
21 #ifdef __XBOXMATH_H__
22 #error XNAMATH and XBOXMATH are incompatible in the same compilation module. Use one or the other.
23 #endif
24 
25 #define XNAMATH_VERSION 203
26 
27 #if !defined(_XM_X64_) && !defined(_XM_X86_)
28 #if defined(_M_AMD64) || defined(_AMD64_)
29 #define _XM_X64_
30 #elif defined(_M_IX86) || defined(_X86_)
31 #define _XM_X86_
32 #endif
33 #endif
34 
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_
40 #else
41 #error xnamath.h only supports x86, x64, or XBox 360 targets
42 #endif
43 #endif
44 
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
49 #endif
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_
55 #else
56 #error xnamath.h only supports x86, x64, or XBox 360 targets
57 #endif
58 
59 
60 #if defined(_XM_SSE_INTRINSICS_)
61 #ifndef _XM_NO_INTRINSICS_
62 #include <xmmintrin.h>
63 #include <emmintrin.h>
64 #endif
65 #elif defined(_XM_VMX128_INTRINSICS_)
66 #error This version of xnamath.h is for Windows use only
67 #endif
68 
69 #if defined(_XM_SSE_INTRINSICS_)
70 #pragma warning(push)
71 #pragma warning(disable:4985)
72 #endif
73 #include <math.h>
74 #if defined(_XM_SSE_INTRINSICS_)
75 #pragma warning(pop)
76 #endif
77 
78 #include <sal.h>
79 
80 #if !defined(XMINLINE)
81 #if !defined(XM_NO_MISALIGNED_VECTOR_ACCESS)
82 #define XMINLINE __inline
83 #else
84 #define XMINLINE __forceinline
85 #endif
86 #endif
87 
88 #if !defined(XMFINLINE)
89 #define XMFINLINE __forceinline
90 #endif
91 
92 #if !defined(XMDEBUG)
93 #if defined(_DEBUG)
94 #define XMDEBUG
95 #endif
96 #endif // !XMDEBUG
97 
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)))
103 #else // !XMDEBUG
104 #define XMASSERT(Expression) ((VOID)0)
105 #endif // !XMDEBUG
106 #endif // !XMASSERT
107 
108 #if !defined(XM_NO_ALIGNMENT)
109 #define _DECLSPEC_ALIGN_16_ __declspec(align(16))
110 #else
111 #define _DECLSPEC_ALIGN_16_
112 #endif
113 
114 
115 #if defined(_MSC_VER) && (_MSC_VER<1500) && (_MSC_VER>=1400)
116 #define _XM_ISVS2005_
117 #endif
118 
119 /****************************************************************************
120  *
121  * Constant definitions
122  *
123  ****************************************************************************/
124 
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
131 
132 #define XM_SELECT_0 0x00000000
133 #define XM_SELECT_1 0xFFFFFFFF
134 
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
143 
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
148 
149 #define XM_CACHE_LINE_SIZE 64
150 
151 /****************************************************************************
152  *
153  * Macros
154  *
155  ****************************************************************************/
156 
157 // Unit conversion
158 
159 XMFINLINE FLOAT XMConvertToRadians(FLOAT fDegrees) { return fDegrees * (XM_PI / 180.0f); }
160 XMFINLINE FLOAT XMConvertToDegrees(FLOAT fRadians) { return fRadians * (180.0f / XM_PI); }
161 
162 // Condition register evaluation proceeding a recording (Rc) comparison
163 
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)
171 
172 
173 #define XMMin(a, b) (((a) < (b)) ? (a) : (b))
174 #define XMMax(a, b) (((a) > (b)) ? (a) : (b))
175 
176 /****************************************************************************
177  *
178  * Data types
179  *
180  ****************************************************************************/
181 
182 #pragma warning(push)
183 #pragma warning(disable:4201 4365 4324)
184 
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_
189 
190 #if defined(_XM_NO_INTRINSICS_) && !defined(_XBOX_VER)
191 // The __vector4 structure is an intrinsic on Xbox but must be separately defined
192 // for x86/x64
193 typedef struct __vector4
194 {
195  union
196  {
197  float vector4_f32[4];
198  unsigned int vector4_u32[4];
199 #ifndef XM_STRICT_VECTOR4
200  struct
201  {
202  FLOAT x;
203  FLOAT y;
204  FLOAT z;
205  FLOAT w;
206  };
207  FLOAT v[4];
208  UINT u[4];
209 #endif // !XM_STRICT_VECTOR4
210  };
211 } __vector4;
212 #endif // _XM_NO_INTRINSICS_
213 
214 #if (defined (_XM_X86_) || defined(_XM_X64_)) && defined(_XM_NO_INTRINSICS_)
215 typedef UINT __vector4i[4];
216 #else
217 typedef __declspec(align(16)) UINT __vector4i[4];
218 #endif
219 
220 // Vector intrinsic: Four 32 bit floating point components aligned on a 16 byte
221 // boundary and mapped to hardware vector registers
222 #if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_)
223 typedef __m128 XMVECTOR;
224 #else
225 typedef __vector4 XMVECTOR;
226 #endif
227 
228 // Conversion types for constants
229 typedef _DECLSPEC_ALIGN_16_ struct XMVECTORF32 {
230  union {
231  float f[4];
232  XMVECTOR v;
233  };
234 
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]; }
240 #endif
241 #endif // __cplusplus
242 } XMVECTORF32;
243 
244 typedef _DECLSPEC_ALIGN_16_ struct XMVECTORI32 {
245  union {
246  INT i[4];
247  XMVECTOR v;
248  };
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]; }
254 #endif
255 #endif // __cplusplus
256 } XMVECTORI32;
257 
258 typedef _DECLSPEC_ALIGN_16_ struct XMVECTORU8 {
259  union {
260  BYTE u[16];
261  XMVECTOR v;
262  };
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]; }
268 #endif
269 #endif // __cplusplus
270 } XMVECTORU8;
271 
272 typedef _DECLSPEC_ALIGN_16_ struct XMVECTORU32 {
273  union {
274  UINT u[4];
275  XMVECTOR v;
276  };
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]; }
282 #endif
283 #endif // __cplusplus
284 } XMVECTORU32;
285 
286 // Fix-up for (1st-3rd) XMVECTOR parameters that are pass-in-register for x86 and Xbox 360, but not for other targets
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;
293 #else
294 typedef const XMVECTOR FXMVECTOR;
295 #endif
296 
297 // Fix-up for (4th+) XMVECTOR parameters to pass in-register for Xbox 360 and by reference otherwise
298 #if defined(_XM_VMX128_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_)
299 typedef const XMVECTOR CXMVECTOR;
300 #elif defined(__cplusplus)
301 typedef const XMVECTOR& CXMVECTOR;
302 #else
303 typedef const XMVECTOR CXMVECTOR;
304 #endif
305 
306 // Vector operators
307 #if defined(__cplusplus) && !defined(XM_NO_OPERATOR_OVERLOADS)
308 
309 XMVECTOR operator+ (FXMVECTOR V);
310 XMVECTOR operator- (FXMVECTOR V);
311 
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);
318 
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);
326 
327 #endif // __cplusplus && !XM_NO_OPERATOR_OVERLOADS
328 
329 // Matrix type: Sixteen 32 bit floating point components aligned on a
330 // 16 byte boundary and mapped to four hardware vector registers
331 #if (defined(_XM_X86_) || defined(_XM_X64_)) && defined(_XM_NO_INTRINSICS_)
332 typedef struct _XMMATRIX
333 #else
334 typedef _DECLSPEC_ALIGN_16_ struct _XMMATRIX
335 #endif
336 {
337  union
338  {
339  XMVECTOR r[4];
340  struct
341  {
342  FLOAT _11, _12, _13, _14;
343  FLOAT _21, _22, _23, _24;
344  FLOAT _31, _32, _33, _34;
345  FLOAT _41, _42, _43, _44;
346  };
347  FLOAT m[4][4];
348  };
349 
350 #ifdef __cplusplus
351 
352  _XMMATRIX() {};
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);
358  _XMMATRIX(CONST FLOAT *pArray);
359 
360  FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
361  FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
362 
363  _XMMATRIX& operator= (CONST _XMMATRIX& M);
364 
365 #ifndef XM_NO_OPERATOR_OVERLOADS
366  _XMMATRIX& operator*= (CONST _XMMATRIX& M);
367  _XMMATRIX operator* (CONST _XMMATRIX& M) CONST;
368 #endif // !XM_NO_OPERATOR_OVERLOADS
369 
370 #endif // __cplusplus
371 
372 } XMMATRIX;
373 
374 // Fix-up for XMMATRIX parameters to pass in-register on Xbox 360, by reference otherwise
375 #if defined(_XM_VMX128_INTRINSICS_)
376 typedef const XMMATRIX CXMMATRIX;
377 #elif defined(__cplusplus)
378 typedef const XMMATRIX& CXMMATRIX;
379 #else
380 typedef const XMMATRIX CXMMATRIX;
381 #endif
382 
383 // 16 bit floating point number consisting of a sign bit, a 5 bit biased
384 // exponent, and a 10 bit mantissa
385 //typedef WORD HALF;
386 typedef USHORT HALF;
387 
388 // 2D Vector; 32 bit floating point components
389 typedef struct _XMFLOAT2
390 {
391  FLOAT x;
392  FLOAT y;
393 
394 #ifdef __cplusplus
395 
396  _XMFLOAT2() {};
397  _XMFLOAT2(FLOAT _x, FLOAT _y) : x(_x), y(_y) {};
398  _XMFLOAT2(CONST FLOAT *pArray);
399 
400  _XMFLOAT2& operator= (CONST _XMFLOAT2& Float2);
401 
402 #endif // __cplusplus
403 
404 } XMFLOAT2;
405 
406 // 2D Vector; 32 bit floating point components aligned on a 16 byte boundary
407 #ifdef __cplusplus
408 __declspec(align(16)) struct XMFLOAT2A : public XMFLOAT2
409 {
410  XMFLOAT2A() : XMFLOAT2() {};
411  XMFLOAT2A(FLOAT _x, FLOAT _y) : XMFLOAT2(_x, _y) {};
412  XMFLOAT2A(CONST FLOAT *pArray) : XMFLOAT2(pArray) {};
413 
414  XMFLOAT2A& operator= (CONST XMFLOAT2A& Float2);
415 };
416 #else
417 typedef __declspec(align(16)) XMFLOAT2 XMFLOAT2A;
418 #endif // __cplusplus
419 
420 // 2D Vector; 16 bit floating point components
421 typedef struct _XMHALF2
422 {
423  HALF x;
424  HALF y;
425 
426 #ifdef __cplusplus
427 
428  _XMHALF2() {};
429  _XMHALF2(HALF _x, HALF _y) : x(_x), y(_y) {};
430  _XMHALF2(CONST HALF *pArray);
431  _XMHALF2(FLOAT _x, FLOAT _y);
432  _XMHALF2(CONST FLOAT *pArray);
433 
434  _XMHALF2& operator= (CONST _XMHALF2& Half2);
435 
436 #endif // __cplusplus
437 
438 } XMHALF2;
439 
440 // 2D Vector; 16 bit signed normalized integer components
441 typedef struct _XMSHORTN2
442 {
443  SHORT x;
444  SHORT y;
445 
446 #ifdef __cplusplus
447 
448  _XMSHORTN2() {};
449  _XMSHORTN2(SHORT _x, SHORT _y) : x(_x), y(_y) {};
450  _XMSHORTN2(CONST SHORT *pArray);
451  _XMSHORTN2(FLOAT _x, FLOAT _y);
452  _XMSHORTN2(CONST FLOAT *pArray);
453 
454  _XMSHORTN2& operator= (CONST _XMSHORTN2& ShortN2);
455 
456 #endif // __cplusplus
457 
458 } XMSHORTN2;
459 
460 // 2D Vector; 16 bit signed integer components
461 typedef struct _XMSHORT2
462 {
463  SHORT x;
464  SHORT y;
465 
466 #ifdef __cplusplus
467 
468  _XMSHORT2() {};
469  _XMSHORT2(SHORT _x, SHORT _y) : x(_x), y(_y) {};
470  _XMSHORT2(CONST SHORT *pArray);
471  _XMSHORT2(FLOAT _x, FLOAT _y);
472  _XMSHORT2(CONST FLOAT *pArray);
473 
474  _XMSHORT2& operator= (CONST _XMSHORT2& Short2);
475 
476 #endif // __cplusplus
477 
478 } XMSHORT2;
479 
480 // 2D Vector; 16 bit unsigned normalized integer components
481 typedef struct _XMUSHORTN2
482 {
483  USHORT x;
484  USHORT y;
485 
486 #ifdef __cplusplus
487 
488  _XMUSHORTN2() {};
489  _XMUSHORTN2(USHORT _x, USHORT _y) : x(_x), y(_y) {};
490  _XMUSHORTN2(CONST USHORT *pArray);
491  _XMUSHORTN2(FLOAT _x, FLOAT _y);
492  _XMUSHORTN2(CONST FLOAT *pArray);
493 
494  _XMUSHORTN2& operator= (CONST _XMUSHORTN2& UShortN2);
495 
496 #endif // __cplusplus
497 
498 } XMUSHORTN2;
499 
500 // 2D Vector; 16 bit unsigned integer components
501 typedef struct _XMUSHORT2
502 {
503  USHORT x;
504  USHORT y;
505 
506 #ifdef __cplusplus
507 
508  _XMUSHORT2() {};
509  _XMUSHORT2(USHORT _x, USHORT _y) : x(_x), y(_y) {};
510  _XMUSHORT2(CONST USHORT *pArray);
511  _XMUSHORT2(FLOAT _x, FLOAT _y);
512  _XMUSHORT2(CONST FLOAT *pArray);
513 
514  _XMUSHORT2& operator= (CONST _XMUSHORT2& UShort2);
515 
516 #endif // __cplusplus
517 
518 } XMUSHORT2;
519 
520 // 3D Vector; 32 bit floating point components
521 typedef struct _XMFLOAT3
522 {
523  FLOAT x;
524  FLOAT y;
525  FLOAT z;
526 
527 #ifdef __cplusplus
528 
529  _XMFLOAT3() {};
530  _XMFLOAT3(FLOAT _x, FLOAT _y, FLOAT _z) : x(_x), y(_y), z(_z) {};
531  _XMFLOAT3(CONST FLOAT *pArray);
532 
533  _XMFLOAT3& operator= (CONST _XMFLOAT3& Float3);
534 
535 #endif // __cplusplus
536 
537 } XMFLOAT3;
538 
539 // 3D Vector; 32 bit floating point components aligned on a 16 byte boundary
540 #ifdef __cplusplus
541 __declspec(align(16)) struct XMFLOAT3A : public XMFLOAT3
542 {
543  XMFLOAT3A() : XMFLOAT3() {};
544  XMFLOAT3A(FLOAT _x, FLOAT _y, FLOAT _z) : XMFLOAT3(_x, _y, _z) {};
545  XMFLOAT3A(CONST FLOAT *pArray) : XMFLOAT3(pArray) {};
546 
547  XMFLOAT3A& operator= (CONST XMFLOAT3A& Float3);
548 };
549 #else
550 typedef __declspec(align(16)) XMFLOAT3 XMFLOAT3A;
551 #endif // __cplusplus
552 
553 // 3D Vector; 11-11-10 bit normalized components packed into a 32 bit integer
554 // The normalized 3D Vector is packed into 32 bits as follows: a 10 bit signed,
555 // normalized integer for the z component and 11 bit signed, normalized
556 // integers for the x and y components. The z component is stored in the
557 // most significant bits and the x component in the least significant bits
558 // (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0]
559 typedef struct _XMHENDN3
560 {
561  union
562  {
563  struct
564  {
565  INT x : 11; // -1023/1023 to 1023/1023
566  INT y : 11; // -1023/1023 to 1023/1023
567  INT z : 10; // -511/511 to 511/511
568  };
569  UINT v;
570  };
571 
572 #ifdef __cplusplus
573 
574  _XMHENDN3() {};
575  _XMHENDN3(UINT Packed) : v(Packed) {};
576  _XMHENDN3(FLOAT _x, FLOAT _y, FLOAT _z);
577  _XMHENDN3(CONST FLOAT *pArray);
578 
579  operator UINT () { return v; }
580 
581  _XMHENDN3& operator= (CONST _XMHENDN3& HenDN3);
582  _XMHENDN3& operator= (CONST UINT Packed);
583 
584 #endif // __cplusplus
585 
586 } XMHENDN3;
587 
588 // 3D Vector; 11-11-10 bit components packed into a 32 bit integer
589 // The 3D Vector is packed into 32 bits as follows: a 10 bit signed,
590 // integer for the z component and 11 bit signed integers for the
591 // x and y components. The z component is stored in the
592 // most significant bits and the x component in the least significant bits
593 // (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0]
594 typedef struct _XMHEND3
595 {
596  union
597  {
598  struct
599  {
600  INT x : 11; // -1023 to 1023
601  INT y : 11; // -1023 to 1023
602  INT z : 10; // -511 to 511
603  };
604  UINT v;
605  };
606 
607 #ifdef __cplusplus
608 
609  _XMHEND3() {};
610  _XMHEND3(UINT Packed) : v(Packed) {};
611  _XMHEND3(FLOAT _x, FLOAT _y, FLOAT _z);
612  _XMHEND3(CONST FLOAT *pArray);
613 
614  operator UINT () { return v; }
615 
616  _XMHEND3& operator= (CONST _XMHEND3& HenD3);
617  _XMHEND3& operator= (CONST UINT Packed);
618 
619 #endif // __cplusplus
620 
621 } XMHEND3;
622 
623 // 3D Vector; 11-11-10 bit normalized components packed into a 32 bit integer
624 // The normalized 3D Vector is packed into 32 bits as follows: a 10 bit unsigned,
625 // normalized integer for the z component and 11 bit unsigned, normalized
626 // integers for the x and y components. The z component is stored in the
627 // most significant bits and the x component in the least significant bits
628 // (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0]
629 typedef struct _XMUHENDN3
630 {
631  union
632  {
633  struct
634  {
635  UINT x : 11; // 0/2047 to 2047/2047
636  UINT y : 11; // 0/2047 to 2047/2047
637  UINT z : 10; // 0/1023 to 1023/1023
638  };
639  UINT v;
640  };
641 
642 #ifdef __cplusplus
643 
644  _XMUHENDN3() {};
645  _XMUHENDN3(UINT Packed) : v(Packed) {};
646  _XMUHENDN3(FLOAT _x, FLOAT _y, FLOAT _z);
647  _XMUHENDN3(CONST FLOAT *pArray);
648 
649  operator UINT () { return v; }
650 
651  _XMUHENDN3& operator= (CONST _XMUHENDN3& UHenDN3);
652  _XMUHENDN3& operator= (CONST UINT Packed);
653 
654 #endif // __cplusplus
655 
656 } XMUHENDN3;
657 
658 // 3D Vector; 11-11-10 bit components packed into a 32 bit integer
659 // The 3D Vector is packed into 32 bits as follows: a 10 bit unsigned
660 // integer for the z component and 11 bit unsigned integers
661 // for the x and y components. The z component is stored in the
662 // most significant bits and the x component in the least significant bits
663 // (Z10Y11X11): [32] zzzzzzzz zzyyyyyy yyyyyxxx xxxxxxxx [0]
664 typedef struct _XMUHEND3
665 {
666  union
667  {
668  struct
669  {
670  UINT x : 11; // 0 to 2047
671  UINT y : 11; // 0 to 2047
672  UINT z : 10; // 0 to 1023
673  };
674  UINT v;
675  };
676 
677 #ifdef __cplusplus
678 
679  _XMUHEND3() {};
680  _XMUHEND3(UINT Packed) : v(Packed) {};
681  _XMUHEND3(FLOAT _x, FLOAT _y, FLOAT _z);
682  _XMUHEND3(CONST FLOAT *pArray);
683 
684  operator UINT () { return v; }
685 
686  _XMUHEND3& operator= (CONST _XMUHEND3& UHenD3);
687  _XMUHEND3& operator= (CONST UINT Packed);
688 
689 #endif // __cplusplus
690 
691 } XMUHEND3;
692 
693 // 3D Vector; 10-11-11 bit normalized components packed into a 32 bit integer
694 // The normalized 3D Vector is packed into 32 bits as follows: a 10 bit signed,
695 // normalized integer for the x component and 11 bit signed, normalized
696 // integers for the y and z components. The z component is stored in the
697 // most significant bits and the x component in the least significant bits
698 // (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0]
699 typedef struct _XMDHENN3
700 {
701  union
702  {
703  struct
704  {
705  INT x : 10; // -511/511 to 511/511
706  INT y : 11; // -1023/1023 to 1023/1023
707  INT z : 11; // -1023/1023 to 1023/1023
708  };
709  UINT v;
710  };
711 
712 #ifdef __cplusplus
713 
714  _XMDHENN3() {};
715  _XMDHENN3(UINT Packed) : v(Packed) {};
716  _XMDHENN3(FLOAT _x, FLOAT _y, FLOAT _z);
717  _XMDHENN3(CONST FLOAT *pArray);
718 
719  operator UINT () { return v; }
720 
721  _XMDHENN3& operator= (CONST _XMDHENN3& DHenN3);
722  _XMDHENN3& operator= (CONST UINT Packed);
723 
724 #endif // __cplusplus
725 
726 } XMDHENN3;
727 
728 // 3D Vector; 10-11-11 bit components packed into a 32 bit integer
729 // The 3D Vector is packed into 32 bits as follows: a 10 bit signed,
730 // integer for the x component and 11 bit signed integers for the
731 // y and z components. The w component is stored in the
732 // most significant bits and the x component in the least significant bits
733 // (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0]
734 typedef struct _XMDHEN3
735 {
736  union
737  {
738  struct
739  {
740  INT x : 10; // -511 to 511
741  INT y : 11; // -1023 to 1023
742  INT z : 11; // -1023 to 1023
743  };
744  UINT v;
745  };
746 
747 #ifdef __cplusplus
748 
749  _XMDHEN3() {};
750  _XMDHEN3(UINT Packed) : v(Packed) {};
751  _XMDHEN3(FLOAT _x, FLOAT _y, FLOAT _z);
752  _XMDHEN3(CONST FLOAT *pArray);
753 
754  operator UINT () { return v; }
755 
756  _XMDHEN3& operator= (CONST _XMDHEN3& DHen3);
757  _XMDHEN3& operator= (CONST UINT Packed);
758 
759 #endif // __cplusplus
760 
761 } XMDHEN3;
762 
763 // 3D Vector; 10-11-11 bit normalized components packed into a 32 bit integer
764 // The normalized 3D Vector is packed into 32 bits as follows: a 10 bit unsigned,
765 // normalized integer for the x component and 11 bit unsigned, normalized
766 // integers for the y and z components. The w component is stored in the
767 // most significant bits and the x component in the least significant bits
768 // (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0]
769 typedef struct _XMUDHENN3
770 {
771  union
772  {
773  struct
774  {
775  UINT x : 10; // 0/1023 to 1023/1023
776  UINT y : 11; // 0/2047 to 2047/2047
777  UINT z : 11; // 0/2047 to 2047/2047
778  };
779  UINT v;
780  };
781 
782 #ifdef __cplusplus
783 
784  _XMUDHENN3() {};
785  _XMUDHENN3(UINT Packed) : v(Packed) {};
786  _XMUDHENN3(FLOAT _x, FLOAT _y, FLOAT _z);
787  _XMUDHENN3(CONST FLOAT *pArray);
788 
789  operator UINT () { return v; }
790 
791  _XMUDHENN3& operator= (CONST _XMUDHENN3& UDHenN3);
792  _XMUDHENN3& operator= (CONST UINT Packed);
793 
794 #endif // __cplusplus
795 
796 } XMUDHENN3;
797 
798 // 3D Vector; 10-11-11 bit components packed into a 32 bit integer
799 // The 3D Vector is packed into 32 bits as follows: a 10 bit unsigned,
800 // integer for the x component and 11 bit unsigned integers
801 // for the y and z components. The w component is stored in the
802 // most significant bits and the x component in the least significant bits
803 // (Z11Y11X10): [32] zzzzzzzz zzzyyyyy yyyyyyxx xxxxxxxx [0]
804 typedef struct _XMUDHEN3
805 {
806  union
807  {
808  struct
809  {
810  UINT x : 10; // 0 to 1023
811  UINT y : 11; // 0 to 2047
812  UINT z : 11; // 0 to 2047
813  };
814  UINT v;
815  };
816 
817 #ifdef __cplusplus
818 
819  _XMUDHEN3() {};
820  _XMUDHEN3(UINT Packed) : v(Packed) {};
821  _XMUDHEN3(FLOAT _x, FLOAT _y, FLOAT _z);
822  _XMUDHEN3(CONST FLOAT *pArray);
823 
824  operator UINT () { return v; }
825 
826  _XMUDHEN3& operator= (CONST _XMUDHEN3& UDHen3);
827  _XMUDHEN3& operator= (CONST UINT Packed);
828 
829 #endif // __cplusplus
830 
831 } XMUDHEN3;
832 
833 // 3D vector: 5/6/5 unsigned integer components
834 typedef struct _XMU565
835 {
836  union
837  {
838  struct
839  {
840  USHORT x : 5;
841  USHORT y : 6;
842  USHORT z : 5;
843  };
844  USHORT v;
845  };
846 
847 #ifdef __cplusplus
848 
849  _XMU565() {};
850  _XMU565(USHORT Packed) : v(Packed) {};
851  _XMU565(CHAR _x, CHAR _y, CHAR _z) : x(_x), y(_y), z(_z) {};
852  _XMU565(CONST CHAR *pArray);
853  _XMU565(FLOAT _x, FLOAT _y, FLOAT _z);
854  _XMU565(CONST FLOAT *pArray);
855 
856  operator USHORT () { return v; }
857 
858  _XMU565& operator= (CONST _XMU565& U565);
859  _XMU565& operator= (CONST USHORT Packed);
860 
861 #endif // __cplusplus
862 
863 } XMU565;
864 
865 // 3D vector: 11/11/10 floating-point components
866 // The 3D vector is packed into 32 bits as follows: a 5-bit biased exponent
867 // and 6-bit mantissa for x component, a 5-bit biased exponent and
868 // 6-bit mantissa for y component, a 5-bit biased exponent and a 5-bit
869 // mantissa for z. The z component is stored in the most significant bits
870 // and the x component in the least significant bits. No sign bits so
871 // all partial-precision numbers are positive.
872 // (Z10Y11X11): [32] ZZZZZzzz zzzYYYYY yyyyyyXX XXXxxxxx [0]
873 typedef struct _XMFLOAT3PK
874 {
875  union
876  {
877  struct
878  {
879  UINT xm : 6;
880  UINT xe : 5;
881  UINT ym : 6;
882  UINT ye : 5;
883  UINT zm : 5;
884  UINT ze : 5;
885  };
886  UINT v;
887  };
888 
889 #ifdef __cplusplus
890 
891  _XMFLOAT3PK() {};
892  _XMFLOAT3PK(UINT Packed) : v(Packed) {};
893  _XMFLOAT3PK(FLOAT _x, FLOAT _y, FLOAT _z);
894  _XMFLOAT3PK(CONST FLOAT *pArray);
895 
896  operator UINT () { return v; }
897 
898  _XMFLOAT3PK& operator= (CONST _XMFLOAT3PK& float3pk);
899  _XMFLOAT3PK& operator= (CONST UINT Packed);
900 
901 #endif // __cplusplus
902 
903 } XMFLOAT3PK;
904 
905 // 3D vector: 9/9/9 floating-point components with shared 5-bit exponent
906 // The 3D vector is packed into 32 bits as follows: a 5-bit biased exponent
907 // with 9-bit mantissa for the x, y, and z component. The shared exponent
908 // is stored in the most significant bits and the x component mantissa is in
909 // the least significant bits. No sign bits so all partial-precision numbers
910 // are positive.
911 // (E5Z9Y9X9): [32] EEEEEzzz zzzzzzyy yyyyyyyx xxxxxxxx [0]
912 typedef struct _XMFLOAT3SE
913 {
914  union
915  {
916  struct
917  {
918  UINT xm : 9;
919  UINT ym : 9;
920  UINT zm : 9;
921  UINT e : 5;
922  };
923  UINT v;
924  };
925 
926 #ifdef __cplusplus
927 
928  _XMFLOAT3SE() {};
929  _XMFLOAT3SE(UINT Packed) : v(Packed) {};
930  _XMFLOAT3SE(FLOAT _x, FLOAT _y, FLOAT _z);
931  _XMFLOAT3SE(CONST FLOAT *pArray);
932 
933  operator UINT () { return v; }
934 
935  _XMFLOAT3SE& operator= (CONST _XMFLOAT3SE& float3se);
936  _XMFLOAT3SE& operator= (CONST UINT Packed);
937 
938 #endif // __cplusplus
939 
940 } XMFLOAT3SE;
941 
942 // 4D Vector; 32 bit floating point components
943 typedef struct _XMFLOAT4
944 {
945  FLOAT x;
946  FLOAT y;
947  FLOAT z;
948  FLOAT w;
949 
950 #ifdef __cplusplus
951 
952  _XMFLOAT4() {};
953  _XMFLOAT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w) : x(_x), y(_y), z(_z), w(_w) {};
954  _XMFLOAT4(CONST FLOAT *pArray);
955 
956  _XMFLOAT4& operator= (CONST _XMFLOAT4& Float4);
957 
958 #endif // __cplusplus
959 
960 } XMFLOAT4;
961 
962 // 4D Vector; 32 bit floating point components aligned on a 16 byte boundary
963 #ifdef __cplusplus
964 __declspec(align(16)) struct XMFLOAT4A : public XMFLOAT4
965 {
966  XMFLOAT4A() : XMFLOAT4() {};
967  XMFLOAT4A(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w) : XMFLOAT4(_x, _y, _z, _w) {};
968  XMFLOAT4A(CONST FLOAT *pArray) : XMFLOAT4(pArray) {};
969 
970  XMFLOAT4A& operator= (CONST XMFLOAT4A& Float4);
971 };
972 #else
973 typedef __declspec(align(16)) XMFLOAT4 XMFLOAT4A;
974 #endif // __cplusplus
975 
976 // 4D Vector; 16 bit floating point components
977 typedef struct _XMHALF4
978 {
979  HALF x;
980  HALF y;
981  HALF z;
982  HALF w;
983 
984 #ifdef __cplusplus
985 
986  _XMHALF4() {};
987  _XMHALF4(HALF _x, HALF _y, HALF _z, HALF _w) : x(_x), y(_y), z(_z), w(_w) {};
988  _XMHALF4(CONST HALF *pArray);
989  _XMHALF4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
990  _XMHALF4(CONST FLOAT *pArray);
991 
992  _XMHALF4& operator= (CONST _XMHALF4& Half4);
993 
994 #endif // __cplusplus
995 
996 } XMHALF4;
997 
998 // 4D Vector; 16 bit signed normalized integer components
999 typedef struct _XMSHORTN4
1000 {
1001  SHORT x;
1002  SHORT y;
1003  SHORT z;
1004  SHORT w;
1005 
1006 #ifdef __cplusplus
1007 
1008  _XMSHORTN4() {};
1009  _XMSHORTN4(SHORT _x, SHORT _y, SHORT _z, SHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1010  _XMSHORTN4(CONST SHORT *pArray);
1011  _XMSHORTN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1012  _XMSHORTN4(CONST FLOAT *pArray);
1013 
1014  _XMSHORTN4& operator= (CONST _XMSHORTN4& ShortN4);
1015 
1016 #endif // __cplusplus
1017 
1018 } XMSHORTN4;
1019 
1020 // 4D Vector; 16 bit signed integer components
1021 typedef struct _XMSHORT4
1022 {
1023  SHORT x;
1024  SHORT y;
1025  SHORT z;
1026  SHORT w;
1027 
1028 #ifdef __cplusplus
1029 
1030  _XMSHORT4() {};
1031  _XMSHORT4(SHORT _x, SHORT _y, SHORT _z, SHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1032  _XMSHORT4(CONST SHORT *pArray);
1033  _XMSHORT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1034  _XMSHORT4(CONST FLOAT *pArray);
1035 
1036  _XMSHORT4& operator= (CONST _XMSHORT4& Short4);
1037 
1038 #endif // __cplusplus
1039 
1040 } XMSHORT4;
1041 
1042 // 4D Vector; 16 bit unsigned normalized integer components
1043 typedef struct _XMUSHORTN4
1044 {
1045  USHORT x;
1046  USHORT y;
1047  USHORT z;
1048  USHORT w;
1049 
1050 #ifdef __cplusplus
1051 
1052  _XMUSHORTN4() {};
1053  _XMUSHORTN4(USHORT _x, USHORT _y, USHORT _z, USHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1054  _XMUSHORTN4(CONST USHORT *pArray);
1055  _XMUSHORTN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1056  _XMUSHORTN4(CONST FLOAT *pArray);
1057 
1058  _XMUSHORTN4& operator= (CONST _XMUSHORTN4& UShortN4);
1059 
1060 #endif // __cplusplus
1061 
1062 } XMUSHORTN4;
1063 
1064 // 4D Vector; 16 bit unsigned integer components
1065 typedef struct _XMUSHORT4
1066 {
1067  USHORT x;
1068  USHORT y;
1069  USHORT z;
1070  USHORT w;
1071 
1072 #ifdef __cplusplus
1073 
1074  _XMUSHORT4() {};
1075  _XMUSHORT4(USHORT _x, USHORT _y, USHORT _z, USHORT _w) : x(_x), y(_y), z(_z), w(_w) {};
1076  _XMUSHORT4(CONST USHORT *pArray);
1077  _XMUSHORT4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1078  _XMUSHORT4(CONST FLOAT *pArray);
1079 
1080  _XMUSHORT4& operator= (CONST _XMUSHORT4& UShort4);
1081 
1082 #endif // __cplusplus
1083 
1084 } XMUSHORT4;
1085 
1086 // 4D Vector; 10-10-10-2 bit normalized components packed into a 32 bit integer
1087 // The normalized 4D Vector is packed into 32 bits as follows: a 2 bit unsigned,
1088 // normalized integer for the w component and 10 bit signed, normalized
1089 // integers for the z, y, and x components. The w component is stored in the
1090 // most significant bits and the x component in the least significant bits
1091 // (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0]
1092 typedef struct _XMXDECN4
1093 {
1094  union
1095  {
1096  struct
1097  {
1098  INT x : 10; // -511/511 to 511/511
1099  INT y : 10; // -511/511 to 511/511
1100  INT z : 10; // -511/511 to 511/511
1101  UINT w : 2; // 0/3 to 3/3
1102  };
1103  UINT v;
1104  };
1105 
1106 #ifdef __cplusplus
1107 
1108  _XMXDECN4() {};
1109  _XMXDECN4(UINT Packed) : v(Packed) {};
1110  _XMXDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1111  _XMXDECN4(CONST FLOAT *pArray);
1112 
1113  operator UINT () { return v; }
1114 
1115  _XMXDECN4& operator= (CONST _XMXDECN4& XDecN4);
1116  _XMXDECN4& operator= (CONST UINT Packed);
1117 
1118 #endif // __cplusplus
1119 
1120 } XMXDECN4;
1121 
1122 // 4D Vector; 10-10-10-2 bit components packed into a 32 bit integer
1123 // The normalized 4D Vector is packed into 32 bits as follows: a 2 bit unsigned
1124 // integer for the w component and 10 bit signed integers for the
1125 // z, y, and x components. The w component is stored in the
1126 // most significant bits and the x component in the least significant bits
1127 // (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0]
1128 typedef struct _XMXDEC4
1129 {
1130  union
1131  {
1132  struct
1133  {
1134  INT x : 10; // -511 to 511
1135  INT y : 10; // -511 to 511
1136  INT z : 10; // -511 to 511
1137  UINT w : 2; // 0 to 3
1138  };
1139  UINT v;
1140  };
1141 
1142 #ifdef __cplusplus
1143 
1144  _XMXDEC4() {};
1145  _XMXDEC4(UINT Packed) : v(Packed) {};
1146  _XMXDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1147  _XMXDEC4(CONST FLOAT *pArray);
1148 
1149  operator UINT () { return v; }
1150 
1151  _XMXDEC4& operator= (CONST _XMXDEC4& XDec4);
1152  _XMXDEC4& operator= (CONST UINT Packed);
1153 
1154 #endif // __cplusplus
1155 
1156 } XMXDEC4;
1157 
1158 // 4D Vector; 10-10-10-2 bit normalized components packed into a 32 bit integer
1159 // The normalized 4D Vector is packed into 32 bits as follows: a 2 bit signed,
1160 // normalized integer for the w component and 10 bit signed, normalized
1161 // integers for the z, y, and x components. The w component is stored in the
1162 // most significant bits and the x component in the least significant bits
1163 // (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0]
1164 typedef struct _XMDECN4
1165 {
1166  union
1167  {
1168  struct
1169  {
1170  INT x : 10; // -511/511 to 511/511
1171  INT y : 10; // -511/511 to 511/511
1172  INT z : 10; // -511/511 to 511/511
1173  INT w : 2; // -1/1 to 1/1
1174  };
1175  UINT v;
1176  };
1177 
1178 #ifdef __cplusplus
1179 
1180  _XMDECN4() {};
1181  _XMDECN4(UINT Packed) : v(Packed) {};
1182  _XMDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1183  _XMDECN4(CONST FLOAT *pArray);
1184 
1185  operator UINT () { return v; }
1186 
1187  _XMDECN4& operator= (CONST _XMDECN4& DecN4);
1188  _XMDECN4& operator= (CONST UINT Packed);
1189 
1190 #endif // __cplusplus
1191 
1192 } XMDECN4;
1193 
1194 // 4D Vector; 10-10-10-2 bit components packed into a 32 bit integer
1195 // The 4D Vector is packed into 32 bits as follows: a 2 bit signed,
1196 // integer for the w component and 10 bit signed integers for the
1197 // z, y, and x components. The w component is stored in the
1198 // most significant bits and the x component in the least significant bits
1199 // (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0]
1200 typedef struct _XMDEC4
1201 {
1202  union
1203  {
1204  struct
1205  {
1206  INT x : 10; // -511 to 511
1207  INT y : 10; // -511 to 511
1208  INT z : 10; // -511 to 511
1209  INT w : 2; // -1 to 1
1210  };
1211  UINT v;
1212  };
1213 
1214 #ifdef __cplusplus
1215 
1216  _XMDEC4() {};
1217  _XMDEC4(UINT Packed) : v(Packed) {};
1218  _XMDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1219  _XMDEC4(CONST FLOAT *pArray);
1220 
1221  operator UINT () { return v; }
1222 
1223  _XMDEC4& operator= (CONST _XMDEC4& Dec4);
1224  _XMDEC4& operator= (CONST UINT Packed);
1225 
1226 #endif // __cplusplus
1227 
1228 } XMDEC4;
1229 
1230 // 4D Vector; 10-10-10-2 bit normalized components packed into a 32 bit integer
1231 // The normalized 4D Vector is packed into 32 bits as follows: a 2 bit unsigned,
1232 // normalized integer for the w component and 10 bit unsigned, normalized
1233 // integers for the z, y, and x components. The w component is stored in the
1234 // most significant bits and the x component in the least significant bits
1235 // (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0]
1236 typedef struct _XMUDECN4
1237 {
1238  union
1239  {
1240  struct
1241  {
1242  UINT x : 10; // 0/1023 to 1023/1023
1243  UINT y : 10; // 0/1023 to 1023/1023
1244  UINT z : 10; // 0/1023 to 1023/1023
1245  UINT w : 2; // 0/3 to 3/3
1246  };
1247  UINT v;
1248  };
1249 
1250 #ifdef __cplusplus
1251 
1252  _XMUDECN4() {};
1253  _XMUDECN4(UINT Packed) : v(Packed) {};
1254  _XMUDECN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1255  _XMUDECN4(CONST FLOAT *pArray);
1256 
1257  operator UINT () { return v; }
1258 
1259  _XMUDECN4& operator= (CONST _XMUDECN4& UDecN4);
1260  _XMUDECN4& operator= (CONST UINT Packed);
1261 
1262 #endif // __cplusplus
1263 
1264 } XMUDECN4;
1265 
1266 // 4D Vector; 10-10-10-2 bit components packed into a 32 bit integer
1267 // The 4D Vector is packed into 32 bits as follows: a 2 bit unsigned,
1268 // integer for the w component and 10 bit unsigned integers
1269 // for the z, y, and x components. The w component is stored in the
1270 // most significant bits and the x component in the least significant bits
1271 // (W2Z10Y10X10): [32] wwzzzzzz zzzzyyyy yyyyyyxx xxxxxxxx [0]
1272 typedef struct _XMUDEC4
1273 {
1274  union
1275  {
1276  struct
1277  {
1278  UINT x : 10; // 0 to 1023
1279  UINT y : 10; // 0 to 1023
1280  UINT z : 10; // 0 to 1023
1281  UINT w : 2; // 0 to 3
1282  };
1283  UINT v;
1284  };
1285 
1286 #ifdef __cplusplus
1287 
1288  _XMUDEC4() {};
1289  _XMUDEC4(UINT Packed) : v(Packed) {};
1290  _XMUDEC4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1291  _XMUDEC4(CONST FLOAT *pArray);
1292 
1293  operator UINT () { return v; }
1294 
1295  _XMUDEC4& operator= (CONST _XMUDEC4& UDec4);
1296  _XMUDEC4& operator= (CONST UINT Packed);
1297 
1298 #endif // __cplusplus
1299 
1300 } XMUDEC4;
1301 
1302 // 4D Vector; 20-20-20-4 bit normalized components packed into a 64 bit integer
1303 // The normalized 4D Vector is packed into 64 bits as follows: a 4 bit unsigned,
1304 // normalized integer for the w component and 20 bit signed, normalized
1305 // integers for the z, y, and x components. The w component is stored in the
1306 // most significant bits and the x component in the least significant bits
1307 // (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0]
1308 typedef struct _XMXICON4
1309 {
1310  union
1311  {
1312  struct
1313  {
1314  INT64 x : 20; // -524287/524287 to 524287/524287
1315  INT64 y : 20; // -524287/524287 to 524287/524287
1316  INT64 z : 20; // -524287/524287 to 524287/524287
1317  UINT64 w : 4; // 0/15 to 15/15
1318  };
1319  UINT64 v;
1320  };
1321 
1322 #ifdef __cplusplus
1323 
1324  _XMXICON4() {};
1325  _XMXICON4(UINT64 Packed) : v(Packed) {};
1326  _XMXICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1327  _XMXICON4(CONST FLOAT *pArray);
1328 
1329  operator UINT64 () { return v; }
1330 
1331  _XMXICON4& operator= (CONST _XMXICON4& XIcoN4);
1332  _XMXICON4& operator= (CONST UINT64 Packed);
1333 
1334 #endif // __cplusplus
1335 
1336 } XMXICON4;
1337 
1338 // 4D Vector; 20-20-20-4 bit components packed into a 64 bit integer
1339 // The 4D Vector is packed into 64 bits as follows: a 4 bit unsigned
1340 // integer for the w component and 20 bit signed integers for the
1341 // z, y, and x components. The w component is stored in the
1342 // most significant bits and the x component in the least significant bits
1343 // (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0]
1344 typedef struct _XMXICO4
1345 {
1346  union
1347  {
1348  struct
1349  {
1350  INT64 x : 20; // -524287 to 524287
1351  INT64 y : 20; // -524287 to 524287
1352  INT64 z : 20; // -524287 to 524287
1353  UINT64 w : 4; // 0 to 15
1354  };
1355  UINT64 v;
1356  };
1357 
1358 #ifdef __cplusplus
1359 
1360  _XMXICO4() {};
1361  _XMXICO4(UINT64 Packed) : v(Packed) {};
1362  _XMXICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1363  _XMXICO4(CONST FLOAT *pArray);
1364 
1365  operator UINT64 () { return v; }
1366 
1367  _XMXICO4& operator= (CONST _XMXICO4& XIco4);
1368  _XMXICO4& operator= (CONST UINT64 Packed);
1369 
1370 #endif // __cplusplus
1371 
1372 } XMXICO4;
1373 
1374 // 4D Vector; 20-20-20-4 bit normalized components packed into a 64 bit integer
1375 // The normalized 4D Vector is packed into 64 bits as follows: a 4 bit signed,
1376 // normalized integer for the w component and 20 bit signed, normalized
1377 // integers for the z, y, and x components. The w component is stored in the
1378 // most significant bits and the x component in the least significant bits
1379 // (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0]
1380 typedef struct _XMICON4
1381 {
1382  union
1383  {
1384  struct
1385  {
1386  INT64 x : 20; // -524287/524287 to 524287/524287
1387  INT64 y : 20; // -524287/524287 to 524287/524287
1388  INT64 z : 20; // -524287/524287 to 524287/524287
1389  INT64 w : 4; // -7/7 to 7/7
1390  };
1391  UINT64 v;
1392  };
1393 
1394 #ifdef __cplusplus
1395 
1396  _XMICON4() {};
1397  _XMICON4(UINT64 Packed) : v(Packed) {};
1398  _XMICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1399  _XMICON4(CONST FLOAT *pArray);
1400 
1401  operator UINT64 () { return v; }
1402 
1403  _XMICON4& operator= (CONST _XMICON4& IcoN4);
1404  _XMICON4& operator= (CONST UINT64 Packed);
1405 
1406 #endif // __cplusplus
1407 
1408 } XMICON4;
1409 
1410 // 4D Vector; 20-20-20-4 bit components packed into a 64 bit integer
1411 // The 4D Vector is packed into 64 bits as follows: a 4 bit signed,
1412 // integer for the w component and 20 bit signed integers for the
1413 // z, y, and x components. The w component is stored in the
1414 // most significant bits and the x component in the least significant bits
1415 // (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0]
1416 typedef struct _XMICO4
1417 {
1418  union
1419  {
1420  struct
1421  {
1422  INT64 x : 20; // -524287 to 524287
1423  INT64 y : 20; // -524287 to 524287
1424  INT64 z : 20; // -524287 to 524287
1425  INT64 w : 4; // -7 to 7
1426  };
1427  UINT64 v;
1428  };
1429 
1430 #ifdef __cplusplus
1431 
1432  _XMICO4() {};
1433  _XMICO4(UINT64 Packed) : v(Packed) {};
1434  _XMICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1435  _XMICO4(CONST FLOAT *pArray);
1436 
1437  operator UINT64 () { return v; }
1438 
1439  _XMICO4& operator= (CONST _XMICO4& Ico4);
1440  _XMICO4& operator= (CONST UINT64 Packed);
1441 
1442 #endif // __cplusplus
1443 
1444 } XMICO4;
1445 
1446 // 4D Vector; 20-20-20-4 bit normalized components packed into a 64 bit integer
1447 // The normalized 4D Vector is packed into 64 bits as follows: a 4 bit unsigned,
1448 // normalized integer for the w component and 20 bit unsigned, normalized
1449 // integers for the z, y, and x components. The w component is stored in the
1450 // most significant bits and the x component in the least significant bits
1451 // (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0]
1452 typedef struct _XMUICON4
1453 {
1454  union
1455  {
1456  struct
1457  {
1458  UINT64 x : 20; // 0/1048575 to 1048575/1048575
1459  UINT64 y : 20; // 0/1048575 to 1048575/1048575
1460  UINT64 z : 20; // 0/1048575 to 1048575/1048575
1461  UINT64 w : 4; // 0/15 to 15/15
1462  };
1463  UINT64 v;
1464  };
1465 
1466 #ifdef __cplusplus
1467 
1468  _XMUICON4() {};
1469  _XMUICON4(UINT64 Packed) : v(Packed) {};
1470  _XMUICON4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1471  _XMUICON4(CONST FLOAT *pArray);
1472 
1473  operator UINT64 () { return v; }
1474 
1475  _XMUICON4& operator= (CONST _XMUICON4& UIcoN4);
1476  _XMUICON4& operator= (CONST UINT64 Packed);
1477 
1478 #endif // __cplusplus
1479 
1480 } XMUICON4;
1481 
1482 // 4D Vector; 20-20-20-4 bit components packed into a 64 bit integer
1483 // The 4D Vector is packed into 64 bits as follows: a 4 bit unsigned
1484 // integer for the w component and 20 bit unsigned integers for the
1485 // z, y, and x components. The w component is stored in the
1486 // most significant bits and the x component in the least significant bits
1487 // (W4Z20Y20X20): [64] wwwwzzzz zzzzzzzz zzzzzzzz yyyyyyyy yyyyyyyy yyyyxxxx xxxxxxxx xxxxxxxx [0]
1488 typedef struct _XMUICO4
1489 {
1490  union
1491  {
1492  struct
1493  {
1494  UINT64 x : 20; // 0 to 1048575
1495  UINT64 y : 20; // 0 to 1048575
1496  UINT64 z : 20; // 0 to 1048575
1497  UINT64 w : 4; // 0 to 15
1498  };
1499  UINT64 v;
1500  };
1501 
1502 #ifdef __cplusplus
1503 
1504  _XMUICO4() {};
1505  _XMUICO4(UINT64 Packed) : v(Packed) {};
1506  _XMUICO4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1507  _XMUICO4(CONST FLOAT *pArray);
1508 
1509  operator UINT64 () { return v; }
1510 
1511  _XMUICO4& operator= (CONST _XMUICO4& UIco4);
1512  _XMUICO4& operator= (CONST UINT64 Packed);
1513 
1514 #endif // __cplusplus
1515 
1516 } XMUICO4;
1517 
1518 // ARGB Color; 8-8-8-8 bit unsigned normalized integer components packed into
1519 // a 32 bit integer. The normalized color is packed into 32 bits using 8 bit
1520 // unsigned, normalized integers for the alpha, red, green, and blue components.
1521 // The alpha component is stored in the most significant bits and the blue
1522 // component in the least significant bits (A8R8G8B8):
1523 // [32] aaaaaaaa rrrrrrrr gggggggg bbbbbbbb [0]
1524 typedef struct _XMCOLOR
1525 {
1526  union
1527  {
1528  struct
1529  {
1530  UINT b : 8; // Blue: 0/255 to 255/255
1531  UINT g : 8; // Green: 0/255 to 255/255
1532  UINT r : 8; // Red: 0/255 to 255/255
1533  UINT a : 8; // Alpha: 0/255 to 255/255
1534  };
1535  UINT c;
1536  };
1537 
1538 #ifdef __cplusplus
1539 
1540  _XMCOLOR() {};
1541  _XMCOLOR(UINT Color) : c(Color) {};
1542  _XMCOLOR(FLOAT _r, FLOAT _g, FLOAT _b, FLOAT _a);
1543  _XMCOLOR(CONST FLOAT *pArray);
1544 
1545  operator UINT () { return c; }
1546 
1547  _XMCOLOR& operator= (CONST _XMCOLOR& Color);
1548  _XMCOLOR& operator= (CONST UINT Color);
1549 
1550 #endif // __cplusplus
1551 
1552 } XMCOLOR;
1553 
1554 // 4D Vector; 8 bit signed normalized integer components
1555 typedef struct _XMBYTEN4
1556 {
1557  union
1558  {
1559  struct
1560  {
1561  CHAR x;
1562  CHAR y;
1563  CHAR z;
1564  CHAR w;
1565  };
1566  UINT v;
1567  };
1568 
1569 #ifdef __cplusplus
1570 
1571  _XMBYTEN4() {};
1572  _XMBYTEN4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {};
1573  _XMBYTEN4(UINT Packed) : v(Packed) {};
1574  _XMBYTEN4(CONST CHAR *pArray);
1575  _XMBYTEN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1576  _XMBYTEN4(CONST FLOAT *pArray);
1577 
1578  _XMBYTEN4& operator= (CONST _XMBYTEN4& ByteN4);
1579 
1580 #endif // __cplusplus
1581 
1582 } XMBYTEN4;
1583 
1584 // 4D Vector; 8 bit signed integer components
1585 typedef struct _XMBYTE4
1586 {
1587  union
1588  {
1589  struct
1590  {
1591  CHAR x;
1592  CHAR y;
1593  CHAR z;
1594  CHAR w;
1595  };
1596  UINT v;
1597  };
1598 
1599 #ifdef __cplusplus
1600 
1601  _XMBYTE4() {};
1602  _XMBYTE4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {};
1603  _XMBYTE4(UINT Packed) : v(Packed) {};
1604  _XMBYTE4(CONST CHAR *pArray);
1605  _XMBYTE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1606  _XMBYTE4(CONST FLOAT *pArray);
1607 
1608  _XMBYTE4& operator= (CONST _XMBYTE4& Byte4);
1609 
1610 #endif // __cplusplus
1611 
1612 } XMBYTE4;
1613 
1614 // 4D Vector; 8 bit unsigned normalized integer components
1615 typedef struct _XMUBYTEN4
1616 {
1617  union
1618  {
1619  struct
1620  {
1621  BYTE x;
1622  BYTE y;
1623  BYTE z;
1624  BYTE w;
1625  };
1626  UINT v;
1627  };
1628 
1629 #ifdef __cplusplus
1630 
1631  _XMUBYTEN4() {};
1632  _XMUBYTEN4(BYTE _x, BYTE _y, BYTE _z, BYTE _w) : x(_x), y(_y), z(_z), w(_w) {};
1633  _XMUBYTEN4(UINT Packed) : v(Packed) {};
1634  _XMUBYTEN4(CONST BYTE *pArray);
1635  _XMUBYTEN4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1636  _XMUBYTEN4(CONST FLOAT *pArray);
1637 
1638  _XMUBYTEN4& operator= (CONST _XMUBYTEN4& UByteN4);
1639 
1640 #endif // __cplusplus
1641 
1642 } XMUBYTEN4;
1643 
1644 // 4D Vector; 8 bit unsigned integer components
1645 typedef struct _XMUBYTE4
1646 {
1647  union
1648  {
1649  struct
1650  {
1651  BYTE x;
1652  BYTE y;
1653  BYTE z;
1654  BYTE w;
1655  };
1656  UINT v;
1657  };
1658 
1659 #ifdef __cplusplus
1660 
1661  _XMUBYTE4() {};
1662  _XMUBYTE4(BYTE _x, BYTE _y, BYTE _z, BYTE _w) : x(_x), y(_y), z(_z), w(_w) {};
1663  _XMUBYTE4(UINT Packed) : v(Packed) {};
1664  _XMUBYTE4(CONST BYTE *pArray);
1665  _XMUBYTE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1666  _XMUBYTE4(CONST FLOAT *pArray);
1667 
1668  _XMUBYTE4& operator= (CONST _XMUBYTE4& UByte4);
1669 
1670 #endif // __cplusplus
1671 
1672 } XMUBYTE4;
1673 
1674 // 4D vector; 4 bit unsigned integer components
1675 typedef struct _XMUNIBBLE4
1676 {
1677  union
1678  {
1679  struct
1680  {
1681  USHORT x : 4;
1682  USHORT y : 4;
1683  USHORT z : 4;
1684  USHORT w : 4;
1685  };
1686  USHORT v;
1687  };
1688 
1689 #ifdef __cplusplus
1690 
1691  _XMUNIBBLE4() {};
1692  _XMUNIBBLE4(USHORT Packed) : v(Packed) {};
1693  _XMUNIBBLE4(CHAR _x, CHAR _y, CHAR _z, CHAR _w) : x(_x), y(_y), z(_z), w(_w) {};
1694  _XMUNIBBLE4(CONST CHAR *pArray);
1695  _XMUNIBBLE4(FLOAT _x, FLOAT _y, FLOAT _z, FLOAT _w);
1696  _XMUNIBBLE4(CONST FLOAT *pArray);
1697 
1698  operator USHORT () { return v; }
1699 
1700  _XMUNIBBLE4& operator= (CONST _XMUNIBBLE4& UNibble4);
1701  _XMUNIBBLE4& operator= (CONST USHORT Packed);
1702 
1703 #endif // __cplusplus
1704 
1705 } XMUNIBBLE4;
1706 
1707 // 4D vector: 5/5/5/1 unsigned integer components
1708 typedef struct _XMU555
1709 {
1710  union
1711  {
1712  struct
1713  {
1714  USHORT x : 5;
1715  USHORT y : 5;
1716  USHORT z : 5;
1717  USHORT w : 1;
1718  };
1719  USHORT v;
1720  };
1721 
1722 #ifdef __cplusplus
1723 
1724  _XMU555() {};
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);
1730 
1731  operator USHORT () { return v; }
1732 
1733  _XMU555& operator= (CONST _XMU555& U555);
1734  _XMU555& operator= (CONST USHORT Packed);
1735 
1736 #endif // __cplusplus
1737 
1738 } XMU555;
1739 
1740 // 3x3 Matrix: 32 bit floating point components
1741 typedef struct _XMFLOAT3X3
1742 {
1743  union
1744  {
1745  struct
1746  {
1747  FLOAT _11, _12, _13;
1748  FLOAT _21, _22, _23;
1749  FLOAT _31, _32, _33;
1750  };
1751  FLOAT m[3][3];
1752  };
1753 
1754 #ifdef __cplusplus
1755 
1756  _XMFLOAT3X3() {};
1757  _XMFLOAT3X3(FLOAT m00, FLOAT m01, FLOAT m02,
1758  FLOAT m10, FLOAT m11, FLOAT m12,
1759  FLOAT m20, FLOAT m21, FLOAT m22);
1760  _XMFLOAT3X3(CONST FLOAT *pArray);
1761 
1762  FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
1763  FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
1764 
1765  _XMFLOAT3X3& operator= (CONST _XMFLOAT3X3& Float3x3);
1766 
1767 #endif // __cplusplus
1768 
1769 } XMFLOAT3X3;
1770 
1771 // 4x3 Matrix: 32 bit floating point components
1772 typedef struct _XMFLOAT4X3
1773 {
1774  union
1775  {
1776  struct
1777  {
1778  FLOAT _11, _12, _13;
1779  FLOAT _21, _22, _23;
1780  FLOAT _31, _32, _33;
1781  FLOAT _41, _42, _43;
1782  };
1783  FLOAT m[4][3];
1784  };
1785 
1786 #ifdef __cplusplus
1787 
1788  _XMFLOAT4X3() {};
1789  _XMFLOAT4X3(FLOAT m00, FLOAT m01, FLOAT m02,
1790  FLOAT m10, FLOAT m11, FLOAT m12,
1791  FLOAT m20, FLOAT m21, FLOAT m22,
1792  FLOAT m30, FLOAT m31, FLOAT m32);
1793  _XMFLOAT4X3(CONST FLOAT *pArray);
1794 
1795  FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
1796  FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
1797 
1798  _XMFLOAT4X3& operator= (CONST _XMFLOAT4X3& Float4x3);
1799 
1800 #endif // __cplusplus
1801 
1802 } XMFLOAT4X3;
1803 
1804 // 4x3 Matrix: 32 bit floating point components aligned on a 16 byte boundary
1805 #ifdef __cplusplus
1806 __declspec(align(16)) struct XMFLOAT4X3A : public XMFLOAT4X3
1807 {
1808  XMFLOAT4X3A() : 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) {}
1815 
1816  FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
1817  FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
1818 
1819  XMFLOAT4X3A& operator= (CONST XMFLOAT4X3A& Float4x3);
1820 };
1821 #else
1822 typedef __declspec(align(16)) XMFLOAT4X3 XMFLOAT4X3A;
1823 #endif // __cplusplus
1824 
1825 // 4x4 Matrix: 32 bit floating point components
1826 typedef struct _XMFLOAT4X4
1827 {
1828  union
1829  {
1830  struct
1831  {
1832  FLOAT _11, _12, _13, _14;
1833  FLOAT _21, _22, _23, _24;
1834  FLOAT _31, _32, _33, _34;
1835  FLOAT _41, _42, _43, _44;
1836  };
1837  FLOAT m[4][4];
1838  };
1839 
1840 #ifdef __cplusplus
1841 
1842  _XMFLOAT4X4() {};
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);
1847  _XMFLOAT4X4(CONST FLOAT *pArray);
1848 
1849  FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
1850  FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
1851 
1852  _XMFLOAT4X4& operator= (CONST _XMFLOAT4X4& Float4x4);
1853 
1854 #endif // __cplusplus
1855 
1856 } XMFLOAT4X4;
1857 
1858 // 4x4 Matrix: 32 bit floating point components aligned on a 16 byte boundary
1859 #ifdef __cplusplus
1860 __declspec(align(16)) struct XMFLOAT4X4A : public XMFLOAT4X4
1861 {
1862  XMFLOAT4X4A() : 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) {}
1869 
1870  FLOAT operator() (UINT Row, UINT Column) CONST { return m[Row][Column]; }
1871  FLOAT& operator() (UINT Row, UINT Column) { return m[Row][Column]; }
1872 
1873  XMFLOAT4X4A& operator= (CONST XMFLOAT4X4A& Float4x4);
1874 };
1875 #else
1876 typedef __declspec(align(16)) XMFLOAT4X4 XMFLOAT4X4A;
1877 #endif // __cplusplus
1878 
1879 #if !defined(_XM_X86_) && !defined(_XM_X64_)
1880 #pragma bitfield_order(pop)
1881 #endif // !_XM_X86_ && !_XM_X64_
1882 
1883 #pragma warning(pop)
1884 
1885 
1886 /****************************************************************************
1887  *
1888  * Data conversion operations
1889  *
1890  ****************************************************************************/
1891 
1892 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_)
1893 #else
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);
1898 #endif
1899 
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);
1910 
1911 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_)
1912 #else
1913 XMVECTOR XMVectorSetBinaryConstant(UINT C0, UINT C1, UINT C2, UINT C3);
1914 XMVECTOR XMVectorSplatConstant(INT IntConstant, UINT DivExponent);
1915 XMVECTOR XMVectorSplatConstantInt(INT IntConstant);
1916 #endif
1917 
1918 /****************************************************************************
1919  *
1920  * Load operations
1921  *
1922  ****************************************************************************/
1923 
1924 XMVECTOR XMLoadInt(_In_ CONST UINT* pSource);
1925 XMVECTOR XMLoadFloat(_In_ CONST FLOAT* pSource);
1926 
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);
1936 
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);
1952 
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);
1981 
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);
1987 
1988 /****************************************************************************
1989  *
1990  * Store operations
1991  *
1992  ****************************************************************************/
1993 
1994 VOID XMStoreInt(_Out_ UINT* pDestination, FXMVECTOR V);
1995 VOID XMStoreFloat(_Out_ FLOAT* pDestination, FXMVECTOR V);
1996 
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);
2006 
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);
2022 
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);
2053 
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);
2062 
2063 /****************************************************************************
2064  *
2065  * General vector operations
2066  *
2067  ****************************************************************************/
2068 
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();
2087 
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);
2093 
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);
2099 
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);
2105 
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);
2111 
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);
2117 
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);
2123 
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);
2129 
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);
2135 
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);
2142 
2143 #if !defined(_XM_NO_INTRINSICS_) && defined(_XM_VMX128_INTRINSICS_)
2144 #else
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);
2151 #endif
2152 
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);
2168 
2169 XMVECTOR XMVectorIsNaN(FXMVECTOR V);
2170 XMVECTOR XMVectorIsInfinite(FXMVECTOR V);
2171 
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);
2180 
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);
2186 
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);
2242 
2243 /****************************************************************************
2244  *
2245  * 2D vector operations
2246  *
2247  ****************************************************************************/
2248 
2249 
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);
2265 
2266 BOOL XMVector2IsNaN(FXMVECTOR V);
2267 BOOL XMVector2IsInfinite(FXMVECTOR V);
2268 
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);
2308 
2309 /****************************************************************************
2310  *
2311  * 3D vector operations
2312  *
2313  ****************************************************************************/
2314 
2315 
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);
2331 
2332 BOOL XMVector3IsNaN(FXMVECTOR V);
2333 BOOL XMVector3IsInfinite(FXMVECTOR V);
2334 
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);
2392 
2393 /****************************************************************************
2394  *
2395  * 4D vector operations
2396  *
2397  ****************************************************************************/
2398 
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);
2414 
2415 BOOL XMVector4IsNaN(FXMVECTOR V);
2416 BOOL XMVector4IsInfinite(FXMVECTOR V);
2417 
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);
2441 
2442 /****************************************************************************
2443  *
2444  * Matrix operations
2445  *
2446  ****************************************************************************/
2447 
2448 BOOL XMMatrixIsNaN(CXMMATRIX M);
2449 BOOL XMMatrixIsInfinite(CXMMATRIX M);
2450 BOOL XMMatrixIsIdentity(CXMMATRIX M);
2451 
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);
2458 
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);
2484 
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);
2499 
2500 /****************************************************************************
2501  *
2502  * Quaternion operations
2503  *
2504  ****************************************************************************/
2505 
2506 BOOL XMQuaternionEqual(FXMVECTOR Q1, FXMVECTOR Q2);
2507 BOOL XMQuaternionNotEqual(FXMVECTOR Q1, FXMVECTOR Q2);
2508 
2509 BOOL XMQuaternionIsNaN(FXMVECTOR Q);
2510 BOOL XMQuaternionIsInfinite(FXMVECTOR Q);
2511 BOOL XMQuaternionIsIdentity(FXMVECTOR Q);
2512 
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);
2531 
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);
2538 
2539 VOID XMQuaternionToAxisAngle(_Out_ XMVECTOR* pAxis, _Out_ FLOAT* pAngle, FXMVECTOR Q);
2540 
2541 /****************************************************************************
2542  *
2543  * Plane operations
2544  *
2545  ****************************************************************************/
2546 
2547 BOOL XMPlaneEqual(FXMVECTOR P1, FXMVECTOR P2);
2548 BOOL XMPlaneNearEqual(FXMVECTOR P1, FXMVECTOR P2, FXMVECTOR Epsilon);
2549 BOOL XMPlaneNotEqual(FXMVECTOR P1, FXMVECTOR P2);
2550 
2551 BOOL XMPlaneIsNaN(FXMVECTOR P);
2552 BOOL XMPlaneIsInfinite(FXMVECTOR P);
2553 
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);
2566 
2567 XMVECTOR XMPlaneFromPointNormal(FXMVECTOR Point, FXMVECTOR Normal);
2568 XMVECTOR XMPlaneFromPoints(FXMVECTOR Point1, FXMVECTOR Point2, FXMVECTOR Point3);
2569 
2570 /****************************************************************************
2571  *
2572  * Color operations
2573  *
2574  ****************************************************************************/
2575 
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);
2582 
2583 BOOL XMColorIsNaN(FXMVECTOR C);
2584 BOOL XMColorIsInfinite(FXMVECTOR C);
2585 
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);
2590 
2591 /****************************************************************************
2592  *
2593  * Miscellaneous operations
2594  *
2595  ****************************************************************************/
2596 
2597 BOOL XMVerifyCPUSupport();
2598 
2599 VOID XMAssert(_In_z_ CONST CHAR* pExpression, _In_z_ CONST CHAR* pFileName, UINT LineNumber);
2600 
2601 XMVECTOR XMFresnelTerm(FXMVECTOR CosIncidentAngle, FXMVECTOR RefractionIndex);
2602 
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);
2615 
2616 /****************************************************************************
2617  *
2618  * Globals
2619  *
2620  ****************************************************************************/
2621 
2622 // The purpose of the following global constants is to prevent redundant
2623 // reloading of the constants when they are referenced by more than one
2624 // separate inline math routine called within the same function. Declaring
2625 // a constant locally within a routine is sufficient to prevent redundant
2626 // reloads of that constant when that single routine is called multiple
2627 // times in a function, but if the constant is used (and declared) in a
2628 // separate math routine it would be reloaded.
2629 
2630 #define XMGLOBALCONST extern CONST __declspec(selectany)
2631 
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};
2757 
2758 /****************************************************************************
2759  *
2760  * Implementation
2761  *
2762  ****************************************************************************/
2763 
2764 #pragma warning(push)
2765 #pragma warning(disable:4214 4204 4365 4616 6001)
2766 
2767 #if !defined(__cplusplus) && !defined(_XBOX) && defined(_XM_ISVS2005_)
2768 
2769 /* Work around VC 2005 bug where math.h defines logf with a semicolon at the end.
2770  * Note this is fixed as of Visual Studio 2005 Service Pack 1
2771  */
2772 
2773 #undef logf
2774 #define logf(x) ((float)log((double)(x)))
2775 
2776 #endif // !defined(__cplusplus) && !defined(_XBOX) && defined(_XM_ISVS2005_)
2777 
2778 //------------------------------------------------------------------------------
2779 
2780 #if defined(_XM_NO_INTRINSICS_) || defined(_XM_SSE_INTRINSICS_)
2781 
2782 XMFINLINE XMVECTOR XMVectorSetBinaryConstant(UINT C0, UINT C1, UINT C2, UINT C3)
2783 {
2784 #if defined(_XM_NO_INTRINSICS_)
2785  XMVECTORU32 vResult;
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;
2790  return vResult.v;
2791 #else // XM_SSE_INTRINSICS_
2792  static const XMVECTORU32 g_vMask1 = {1,1,1,1};
2793  // Move the parms to a vector
2794  __m128i vTemp = _mm_set_epi32(C3,C2,C1,C0);
2795  // Mask off the low bits
2796  vTemp = _mm_and_si128(vTemp,g_vMask1);
2797  // 0xFFFFFFFF on true bits
2798  vTemp = _mm_cmpeq_epi32(vTemp,g_vMask1);
2799  // 0xFFFFFFFF -> 1.0f, 0x00000000 -> 0.0f
2800  vTemp = _mm_and_si128(vTemp,g_XMOne);
2801  return reinterpret_cast<const __m128 *>(&vTemp)[0];
2802 #endif
2803 }
2804 
2805 //------------------------------------------------------------------------------
2806 
2807 XMFINLINE XMVECTOR XMVectorSplatConstant(INT IntConstant, UINT DivExponent)
2808 {
2809 #if defined(_XM_NO_INTRINSICS_)
2810  XMASSERT( IntConstant >= -16 && IntConstant <= 15 );
2811  XMASSERT(DivExponent<32);
2812  {
2813  XMVECTORI32 V = { IntConstant, IntConstant, IntConstant, IntConstant };
2814  return XMConvertVectorIntToFloat( V.v, DivExponent);
2815  }
2816 #else // XM_SSE_INTRINSICS_
2817  XMASSERT( IntConstant >= -16 && IntConstant <= 15 );
2818  XMASSERT(DivExponent<32);
2819  // Splat the int
2820  __m128i vScale = _mm_set1_epi32(IntConstant);
2821  // Convert to a float
2822  XMVECTOR vResult = _mm_cvtepi32_ps(vScale);
2823  // Convert DivExponent into 1.0f/(1<<DivExponent)
2824  UINT uScale = 0x3F800000U - (DivExponent << 23);
2825  // Splat the scalar value (It's really a float)
2826  vScale = _mm_set1_epi32(uScale);
2827  // Multiply by the reciprocal (Perform a right shift by DivExponent)
2828  vResult = _mm_mul_ps(vResult,reinterpret_cast<const __m128 *>(&vScale)[0]);
2829  return vResult;
2830 #endif
2831 }
2832 
2833 //------------------------------------------------------------------------------
2834 
2835 XMFINLINE XMVECTOR XMVectorSplatConstantInt(INT IntConstant)
2836 {
2837 #if defined(_XM_NO_INTRINSICS_)
2838  XMASSERT( IntConstant >= -16 && IntConstant <= 15 );
2839  {
2840  XMVECTORI32 V = { IntConstant, IntConstant, IntConstant, IntConstant };
2841  return V.v;
2842  }
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];
2847 #endif
2848 }
2849 
2850 //------------------------------------------------------------------------------
2851 
2852 XMFINLINE XMVECTOR XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2, UINT Elements)
2853 {
2854  return XMVectorPermute(V1, V2, XMVectorPermuteControl((Elements), ((Elements) + 1), ((Elements) + 2), ((Elements) + 3)));
2855 }
2856 
2857 //------------------------------------------------------------------------------
2858 
2859 XMFINLINE XMVECTOR XMVectorRotateLeft(FXMVECTOR V, UINT Elements)
2860 {
2861 #if defined(_XM_NO_INTRINSICS_)
2862  XMASSERT( Elements < 4 );
2863  {
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] };
2866  return vResult.v;
2867  }
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 );
2874 #endif
2875 }
2876 
2877 //------------------------------------------------------------------------------
2878 
2879 XMFINLINE XMVECTOR XMVectorRotateRight(FXMVECTOR V, UINT Elements)
2880 {
2881 #if defined(_XM_NO_INTRINSICS_)
2882  XMASSERT( Elements < 4 );
2883  {
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] };
2886  return vResult.v;
2887  }
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 );
2894 #endif
2895 }
2896 
2897 //------------------------------------------------------------------------------
2898 
2899 XMFINLINE XMVECTOR XMVectorSwizzle(FXMVECTOR V, UINT E0, UINT E1, UINT E2, UINT E3)
2900 {
2901 #if defined(_XM_NO_INTRINSICS_)
2902  XMASSERT( (E0 < 4) && (E1 < 4) && (E2 < 4) && (E3 < 4) );
2903  {
2904  XMVECTORF32 vResult = { V.vector4_f32[E0], V.vector4_f32[E1], V.vector4_f32[E2], V.vector4_f32[E3] };
2905  return vResult.v;
2906  }
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 );
2913 #endif
2914 }
2915 
2916 //------------------------------------------------------------------------------
2917 
2918 XMFINLINE XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, UINT VSLeftRotateElements,
2919  UINT Select0, UINT Select1, UINT Select2, UINT Select3)
2920 {
2921  XMVECTOR Control = XMVectorSelectControl(Select0&1, Select1&1, Select2&1, Select3&1);
2922  return XMVectorSelect( VD, XMVectorRotateLeft(VS, VSLeftRotateElements), Control );
2923 }
2924 
2925 // Implemented for VMX128 intrinsics as #defines aboves
2926 #endif _XM_NO_INTRINSICS_ || _XM_SSE_INTRINSICS_
2927 
2928 //------------------------------------------------------------------------------
2929 
2930 #include "xnamathconvert.inl"
2931 #include "xnamathvector.inl"
2932 #include "xnamathmatrix.inl"
2933 #include "xnamathmisc.inl"
2934 
2935 #pragma warning(pop)
2936 
2937 #endif // __XNAMATH_H__
2938 
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