RetroArch
d3dx10math.h
Go to the documentation of this file.
1 //
3 // Copyright (C) Microsoft Corporation. All Rights Reserved.
4 //
5 // File: D3DX10math.h
6 // Content: D3DX10 math types and functions
7 //
9 
10 #include "d3dx10.h"
11 
12 // D3DX10 and D3DX9 math look the same. You can include either one into your project.
13 // We are intentionally using the header define from D3DX9 math to prevent double-inclusion.
14 #ifndef __D3DX9MATH_H__
15 #define __D3DX9MATH_H__
16 
17 #include <math.h>
18 #if _MSC_VER >= 1200
19 #pragma warning(push)
20 #endif
21 #pragma warning(disable:4201) // anonymous unions warning
22 
23 //===========================================================================
24 //
25 // Type definitions from D3D9
26 //
27 //===========================================================================
28 
29 #ifndef D3DVECTOR_DEFINED
30 typedef struct _D3DVECTOR {
31  float x;
32  float y;
33  float z;
34 } D3DVECTOR;
35 #define D3DVECTOR_DEFINED
36 #endif
37 
38 #ifndef D3DMATRIX_DEFINED
39 typedef struct _D3DMATRIX {
40  union {
41  struct {
42  float _11, _12, _13, _14;
43  float _21, _22, _23, _24;
44  float _31, _32, _33, _34;
45  float _41, _42, _43, _44;
46 
47  };
48  float m[4][4];
49  };
50 } D3DMATRIX;
51 #define D3DMATRIX_DEFINED
52 #endif
53 
54 //===========================================================================
55 //
56 // General purpose utilities
57 //
58 //===========================================================================
59 #define D3DX_PI (3.14159265358979323846)
60 #define D3DX_1BYPI ( 1.0 / D3DX_PI )
61 
62 #define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0))
63 #define D3DXToDegree( radian ) ((radian) * (180.0 / D3DX_PI))
64 
65 
66 
67 //===========================================================================
68 //
69 // 16 bit floating point numbers
70 //
71 //===========================================================================
72 
73 #define D3DX_16F_DIG 3 // # of decimal digits of precision
74 #define D3DX_16F_EPSILON 4.8875809e-4f // smallest such that 1.0 + epsilon != 1.0
75 #define D3DX_16F_MANT_DIG 11 // # of bits in mantissa
76 #define D3DX_16F_MAX 6.550400e+004 // max value
77 #define D3DX_16F_MAX_10_EXP 4 // max decimal exponent
78 #define D3DX_16F_MAX_EXP 15 // max binary exponent
79 #define D3DX_16F_MIN 6.1035156e-5f // min positive value
80 #define D3DX_16F_MIN_10_EXP (-4) // min decimal exponent
81 #define D3DX_16F_MIN_EXP (-14) // min binary exponent
82 #define D3DX_16F_RADIX 2 // exponent radix
83 #define D3DX_16F_ROUNDS 1 // addition rounding: near
84 #define D3DX_16F_SIGN_MASK 0x8000
85 #define D3DX_16F_EXP_MASK 0x7C00
86 #define D3DX_16F_FRAC_MASK 0x03FF
87 
88 typedef struct D3DXFLOAT16
89 {
90 #ifdef __cplusplus
91 public:
92  D3DXFLOAT16() {};
93  D3DXFLOAT16( FLOAT );
95 
96  // casting
97  operator FLOAT ();
98 
99  // binary operators
101  BOOL operator != ( CONST D3DXFLOAT16& ) const;
102 
103 protected:
104 #endif //__cplusplus
105  WORD value;
107 
108 
109 
110 //===========================================================================
111 //
112 // Vectors
113 //
114 //===========================================================================
115 
116 
117 //--------------------------
118 // 2D Vector
119 //--------------------------
120 typedef struct D3DXVECTOR2
121 {
122 #ifdef __cplusplus
123 public:
124  D3DXVECTOR2() {};
125  D3DXVECTOR2( CONST FLOAT * );
127  D3DXVECTOR2( FLOAT x, FLOAT y );
128 
129  // casting
130  operator FLOAT* ();
131  operator CONST FLOAT* () const;
132 
133  // assignment operators
134  D3DXVECTOR2& operator += ( CONST D3DXVECTOR2& );
135  D3DXVECTOR2& operator -= ( CONST D3DXVECTOR2& );
136  D3DXVECTOR2& operator *= ( FLOAT );
137  D3DXVECTOR2& operator /= ( FLOAT );
138 
139  // unary operators
140  D3DXVECTOR2 operator + () const;
141  D3DXVECTOR2 operator - () const;
142 
143  // binary operators
144  D3DXVECTOR2 operator + ( CONST D3DXVECTOR2& ) const;
145  D3DXVECTOR2 operator - ( CONST D3DXVECTOR2& ) const;
146  D3DXVECTOR2 operator * ( FLOAT ) const;
147  D3DXVECTOR2 operator / ( FLOAT ) const;
148 
149  friend D3DXVECTOR2 operator * ( FLOAT, CONST D3DXVECTOR2& );
150 
152  BOOL operator != ( CONST D3DXVECTOR2& ) const;
153 
154 
155 public:
156 #endif //__cplusplus
157  FLOAT x, y;
159 
160 
161 
162 //--------------------------
163 // 2D Vector (16 bit)
164 //--------------------------
165 
166 typedef struct D3DXVECTOR2_16F
167 {
168 #ifdef __cplusplus
169 public:
170  D3DXVECTOR2_16F() {};
174 
175  // casting
176  operator D3DXFLOAT16* ();
177  operator CONST D3DXFLOAT16* () const;
178 
179  // binary operators
181  BOOL operator != ( CONST D3DXVECTOR2_16F& ) const;
182 
183 public:
184 #endif //__cplusplus
185  D3DXFLOAT16 x, y;
186 
188 
189 
190 
191 //--------------------------
192 // 3D Vector
193 //--------------------------
194 #ifdef __cplusplus
195 typedef struct D3DXVECTOR3 : public D3DVECTOR
196 {
197 public:
198  D3DXVECTOR3() {};
199  D3DXVECTOR3( CONST FLOAT * );
203 
204  // casting
205  operator FLOAT* ();
206  operator CONST FLOAT* () const;
207 
208  // assignment operators
209  D3DXVECTOR3& operator += ( CONST D3DXVECTOR3& );
210  D3DXVECTOR3& operator -= ( CONST D3DXVECTOR3& );
211  D3DXVECTOR3& operator *= ( FLOAT );
212  D3DXVECTOR3& operator /= ( FLOAT );
213 
214  // unary operators
215  D3DXVECTOR3 operator + () const;
216  D3DXVECTOR3 operator - () const;
217 
218  // binary operators
219  D3DXVECTOR3 operator + ( CONST D3DXVECTOR3& ) const;
220  D3DXVECTOR3 operator - ( CONST D3DXVECTOR3& ) const;
221  D3DXVECTOR3 operator * ( FLOAT ) const;
222  D3DXVECTOR3 operator / ( FLOAT ) const;
223 
224  friend D3DXVECTOR3 operator * ( FLOAT, CONST struct D3DXVECTOR3& );
225 
227  BOOL operator != ( CONST D3DXVECTOR3& ) const;
228 
230 
231 #else
232 typedef struct _D3DVECTOR D3DXVECTOR3, *LPD3DXVECTOR3;
233 #endif
234 
235 
236 
237 //--------------------------
238 // 3D Vector (16 bit)
239 //--------------------------
240 typedef struct D3DXVECTOR3_16F
241 {
242 #ifdef __cplusplus
243 public:
244  D3DXVECTOR3_16F() {};
249 
250  // casting
251  operator D3DXFLOAT16* ();
252  operator CONST D3DXFLOAT16* () const;
253 
254  // binary operators
256  BOOL operator != ( CONST D3DXVECTOR3_16F& ) const;
257 
258 public:
259 #endif //__cplusplus
260  D3DXFLOAT16 x, y, z;
261 
263 
264 
265 
266 //--------------------------
267 // 4D Vector
268 //--------------------------
269 typedef struct D3DXVECTOR4
270 {
271 #ifdef __cplusplus
272 public:
273  D3DXVECTOR4() {};
274  D3DXVECTOR4( CONST FLOAT* );
276  D3DXVECTOR4( CONST D3DVECTOR& xyz, FLOAT w );
278 
279  // casting
280  operator FLOAT* ();
281  operator CONST FLOAT* () const;
282 
283  // assignment operators
284  D3DXVECTOR4& operator += ( CONST D3DXVECTOR4& );
285  D3DXVECTOR4& operator -= ( CONST D3DXVECTOR4& );
286  D3DXVECTOR4& operator *= ( FLOAT );
287  D3DXVECTOR4& operator /= ( FLOAT );
288 
289  // unary operators
290  D3DXVECTOR4 operator + () const;
291  D3DXVECTOR4 operator - () const;
292 
293  // binary operators
294  D3DXVECTOR4 operator + ( CONST D3DXVECTOR4& ) const;
295  D3DXVECTOR4 operator - ( CONST D3DXVECTOR4& ) const;
296  D3DXVECTOR4 operator * ( FLOAT ) const;
297  D3DXVECTOR4 operator / ( FLOAT ) const;
298 
299  friend D3DXVECTOR4 operator * ( FLOAT, CONST D3DXVECTOR4& );
300 
302  BOOL operator != ( CONST D3DXVECTOR4& ) const;
303 
304 public:
305 #endif //__cplusplus
306  FLOAT x, y, z, w;
308 
309 
310 //--------------------------
311 // 4D Vector (16 bit)
312 //--------------------------
313 typedef struct D3DXVECTOR4_16F
314 {
315 #ifdef __cplusplus
316 public:
317  D3DXVECTOR4_16F() {};
322 
323  // casting
324  operator D3DXFLOAT16* ();
325  operator CONST D3DXFLOAT16* () const;
326 
327  // binary operators
329  BOOL operator != ( CONST D3DXVECTOR4_16F& ) const;
330 
331 public:
332 #endif //__cplusplus
333  D3DXFLOAT16 x, y, z, w;
334 
336 
337 
338 
339 //===========================================================================
340 //
341 // Matrices
342 //
343 //===========================================================================
344 #ifdef __cplusplus
345 typedef struct D3DXMATRIX : public D3DMATRIX
346 {
347 public:
348  D3DXMATRIX() {};
349  D3DXMATRIX( CONST FLOAT * );
356 
357 
358  // access grants
359  FLOAT& operator () ( UINT Row, UINT Col );
360  FLOAT operator () ( UINT Row, UINT Col ) const;
361 
362  // casting operators
363  operator FLOAT* ();
364  operator CONST FLOAT* () const;
365 
366  // assignment operators
367  D3DXMATRIX& operator *= ( CONST D3DXMATRIX& );
368  D3DXMATRIX& operator += ( CONST D3DXMATRIX& );
369  D3DXMATRIX& operator -= ( CONST D3DXMATRIX& );
370  D3DXMATRIX& operator *= ( FLOAT );
371  D3DXMATRIX& operator /= ( FLOAT );
372 
373  // unary operators
374  D3DXMATRIX operator + () const;
375  D3DXMATRIX operator - () const;
376 
377  // binary operators
378  D3DXMATRIX operator * ( CONST D3DXMATRIX& ) const;
379  D3DXMATRIX operator + ( CONST D3DXMATRIX& ) const;
380  D3DXMATRIX operator - ( CONST D3DXMATRIX& ) const;
381  D3DXMATRIX operator * ( FLOAT ) const;
382  D3DXMATRIX operator / ( FLOAT ) const;
383 
384  friend D3DXMATRIX operator * ( FLOAT, CONST D3DXMATRIX& );
385 
386  BOOL operator == ( CONST D3DXMATRIX& ) const;
387  BOOL operator != ( CONST D3DXMATRIX& ) const;
388 
390 
391 #else
392 typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX;
393 #endif
394 
395 
396 //---------------------------------------------------------------------------
397 // Aligned Matrices
398 //
399 // This class helps keep matrices 16-byte aligned as preferred by P4 cpus.
400 // It aligns matrices on the stack and on the heap or in global scope.
401 // It does this using __declspec(align(16)) which works on VC7 and on VC 6
402 // with the processor pack. Unfortunately there is no way to detect the
403 // latter so this is turned on only on VC7. On other compilers this is the
404 // the same as D3DXMATRIX.
405 //
406 // Using this class on a compiler that does not actually do the alignment
407 // can be dangerous since it will not expose bugs that ignore alignment.
408 // E.g if an object of this class in inside a struct or class, and some code
409 // memcopys data in it assuming tight packing. This could break on a compiler
410 // that eventually start aligning the matrix.
411 //---------------------------------------------------------------------------
412 #ifdef __cplusplus
413 typedef struct _D3DXMATRIXA16 : public D3DXMATRIX
414 {
415  _D3DXMATRIXA16() {};
423 
424  // new operators
425  void* operator new ( size_t );
426  void* operator new[] ( size_t );
427 
428  // delete operators
429  void operator delete ( void* ); // These are NOT virtual; Do not
430  void operator delete[] ( void* ); // cast to D3DXMATRIX and delete.
431 
432  // assignment operators
433  _D3DXMATRIXA16& operator = ( CONST D3DXMATRIX& );
434 
436 
437 #else
438 typedef D3DXMATRIX _D3DXMATRIXA16;
439 #endif
440 
441 
442 
443 #if _MSC_VER >= 1300 // VC7
444 #define D3DX_ALIGN16 __declspec(align(16))
445 #else
446 #define D3DX_ALIGN16 // Earlier compiler may not understand this, do nothing.
447 #endif
448 
450 
451 
452 
453 //===========================================================================
454 //
455 // Quaternions
456 //
457 //===========================================================================
458 typedef struct D3DXQUATERNION
459 {
460 #ifdef __cplusplus
461 public:
462  D3DXQUATERNION() {};
466 
467  // casting
468  operator FLOAT* ();
469  operator CONST FLOAT* () const;
470 
471  // assignment operators
472  D3DXQUATERNION& operator += ( CONST D3DXQUATERNION& );
473  D3DXQUATERNION& operator -= ( CONST D3DXQUATERNION& );
474  D3DXQUATERNION& operator *= ( CONST D3DXQUATERNION& );
475  D3DXQUATERNION& operator *= ( FLOAT );
476  D3DXQUATERNION& operator /= ( FLOAT );
477 
478  // unary operators
479  D3DXQUATERNION operator + () const;
480  D3DXQUATERNION operator - () const;
481 
482  // binary operators
483  D3DXQUATERNION operator + ( CONST D3DXQUATERNION& ) const;
484  D3DXQUATERNION operator - ( CONST D3DXQUATERNION& ) const;
485  D3DXQUATERNION operator * ( CONST D3DXQUATERNION& ) const;
486  D3DXQUATERNION operator * ( FLOAT ) const;
487  D3DXQUATERNION operator / ( FLOAT ) const;
488 
489  friend D3DXQUATERNION operator * (FLOAT, CONST D3DXQUATERNION& );
490 
492  BOOL operator != ( CONST D3DXQUATERNION& ) const;
493 
494 #endif //__cplusplus
495  FLOAT x, y, z, w;
497 
498 
499 //===========================================================================
500 //
501 // Planes
502 //
503 //===========================================================================
504 typedef struct D3DXPLANE
505 {
506 #ifdef __cplusplus
507 public:
508  D3DXPLANE() {};
509  D3DXPLANE( CONST FLOAT* );
511  D3DXPLANE( FLOAT a, FLOAT b, FLOAT c, FLOAT d );
512 
513  // casting
514  operator FLOAT* ();
515  operator CONST FLOAT* () const;
516 
517  // assignment operators
518  D3DXPLANE& operator *= ( FLOAT );
519  D3DXPLANE& operator /= ( FLOAT );
520 
521  // unary operators
522  D3DXPLANE operator + () const;
523  D3DXPLANE operator - () const;
524 
525  // binary operators
526  D3DXPLANE operator * ( FLOAT ) const;
527  D3DXPLANE operator / ( FLOAT ) const;
528 
529  friend D3DXPLANE operator * ( FLOAT, CONST D3DXPLANE& );
530 
531  BOOL operator == ( CONST D3DXPLANE& ) const;
532  BOOL operator != ( CONST D3DXPLANE& ) const;
533 
534 #endif //__cplusplus
535  FLOAT a, b, c, d;
537 
538 
539 //===========================================================================
540 //
541 // Colors
542 //
543 //===========================================================================
544 
545 typedef struct D3DXCOLOR
546 {
547 #ifdef __cplusplus
548 public:
549  D3DXCOLOR() {};
550  D3DXCOLOR( UINT argb );
551  D3DXCOLOR( CONST FLOAT * );
553  D3DXCOLOR( FLOAT r, FLOAT g, FLOAT b, FLOAT a );
554 
555  // casting
556  operator UINT () const;
557 
558  operator FLOAT* ();
559  operator CONST FLOAT* () const;
560 
561  // assignment operators
562  D3DXCOLOR& operator += ( CONST D3DXCOLOR& );
563  D3DXCOLOR& operator -= ( CONST D3DXCOLOR& );
564  D3DXCOLOR& operator *= ( FLOAT );
565  D3DXCOLOR& operator /= ( FLOAT );
566 
567  // unary operators
568  D3DXCOLOR operator + () const;
569  D3DXCOLOR operator - () const;
570 
571  // binary operators
572  D3DXCOLOR operator + ( CONST D3DXCOLOR& ) const;
573  D3DXCOLOR operator - ( CONST D3DXCOLOR& ) const;
574  D3DXCOLOR operator * ( FLOAT ) const;
575  D3DXCOLOR operator / ( FLOAT ) const;
576 
577  friend D3DXCOLOR operator * ( FLOAT, CONST D3DXCOLOR& );
578 
579  BOOL operator == ( CONST D3DXCOLOR& ) const;
580  BOOL operator != ( CONST D3DXCOLOR& ) const;
581 
582 #endif //__cplusplus
583  FLOAT r, g, b, a;
585 
586 
587 
588 //===========================================================================
589 //
590 // D3DX math functions:
591 //
592 // NOTE:
593 // * All these functions can take the same object as in and out parameters.
594 //
595 // * Out parameters are typically also returned as return values, so that
596 // the output of one function may be used as a parameter to another.
597 //
598 //===========================================================================
599 
600 //--------------------------
601 // Float16
602 //--------------------------
603 
604 // non-inline
605 #ifdef __cplusplus
606 extern "C" {
607 #endif
608 
609 // Converts an array 32-bit floats to 16-bit floats
611  ( D3DXFLOAT16 *pOut, CONST FLOAT *pIn, UINT n );
612 
613 // Converts an array 16-bit floats to 32-bit floats
615  ( __out_ecount(n) FLOAT *pOut, __in_ecount(n) CONST D3DXFLOAT16 *pIn, UINT n );
616 
617 #ifdef __cplusplus
618 }
619 #endif
620 
621 
622 //--------------------------
623 // 2D Vector
624 //--------------------------
625 
626 // inline
627 
629  ( CONST D3DXVECTOR2 *pV );
630 
632  ( CONST D3DXVECTOR2 *pV );
633 
635  ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 );
636 
637 // Z component of ((x1,y1,0) cross (x2,y2,0))
639  ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 );
640 
642  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 );
643 
645  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 );
646 
647 // Minimize each component. x = min(x1, x2), y = min(y1, y2)
649  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 );
650 
651 // Maximize each component. x = max(x1, x2), y = max(y1, y2)
653  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 );
654 
656  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s );
657 
658 // Linear interpolation. V1 + s(V2-V1)
660  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2,
661  FLOAT s );
662 
663 // non-inline
664 #ifdef __cplusplus
665 extern "C" {
666 #endif
667 
669  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV );
670 
671 // Hermite interpolation between position V1, tangent T1 (when s == 0)
672 // and position V2, tangent T2 (when s == 1).
674  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pT1,
675  CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pT2, FLOAT s );
676 
677 // CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1)
679  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV0, CONST D3DXVECTOR2 *pV1,
680  CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pV3, FLOAT s );
681 
682 // Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1)
684  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2,
685  CONST D3DXVECTOR2 *pV3, FLOAT f, FLOAT g);
686 
687 // Transform (x, y, 0, 1) by matrix.
689  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM );
690 
691 // Transform (x, y, 0, 1) by matrix, project result back into w=1.
693  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM );
694 
695 // Transform (x, y, 0, 0) by matrix.
697  ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM );
698 
699 // Transform Array (x, y, 0, 1) by matrix.
701  ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n);
702 
703 // Transform Array (x, y, 0, 1) by matrix, project result back into w=1.
705  ( D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n );
706 
707 // Transform Array (x, y, 0, 0) by matrix.
709  ( D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n );
710 
711 
712 
713 #ifdef __cplusplus
714 }
715 #endif
716 
717 
718 //--------------------------
719 // 3D Vector
720 //--------------------------
721 
722 // inline
723 
725  ( CONST D3DXVECTOR3 *pV );
726 
728  ( CONST D3DXVECTOR3 *pV );
729 
731  ( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 );
732 
734  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 );
735 
737  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 );
738 
740  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 );
741 
742 // Minimize each component. x = min(x1, x2), y = min(y1, y2), ...
744  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 );
745 
746 // Maximize each component. x = max(x1, x2), y = max(y1, y2), ...
748  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 );
749 
751  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s);
752 
753 // Linear interpolation. V1 + s(V2-V1)
755  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2,
756  FLOAT s );
757 
758 // non-inline
759 #ifdef __cplusplus
760 extern "C" {
761 #endif
762 
764  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV );
765 
766 // Hermite interpolation between position V1, tangent T1 (when s == 0)
767 // and position V2, tangent T2 (when s == 1).
769  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pT1,
770  CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pT2, FLOAT s );
771 
772 // CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1)
774  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV0, CONST D3DXVECTOR3 *pV1,
775  CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pV3, FLOAT s );
776 
777 // Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1)
779  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2,
780  CONST D3DXVECTOR3 *pV3, FLOAT f, FLOAT g);
781 
782 // Transform (x, y, z, 1) by matrix.
784  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM );
785 
786 // Transform (x, y, z, 1) by matrix, project result back into w=1.
788  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM );
789 
790 // Transform (x, y, z, 0) by matrix. If you transforming a normal by a
791 // non-affine matrix, the matrix you pass to this function should be the
792 // transpose of the inverse of the matrix you would use to transform a coord.
794  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM );
795 
796 
797 // Transform Array (x, y, z, 1) by matrix.
799  ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n );
800 
801 // Transform Array (x, y, z, 1) by matrix, project result back into w=1.
803  ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n );
804 
805 // Transform (x, y, z, 0) by matrix. If you transforming a normal by a
806 // non-affine matrix, the matrix you pass to this function should be the
807 // transpose of the inverse of the matrix you would use to transform a coord.
809  ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n );
810 
811 // Project vector from object space into screen space
813  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT *pViewport,
814  CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld);
815 
816 // Project vector from screen space into object space
818  ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT *pViewport,
819  CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld);
820 
821 // Project vector Array from object space into screen space
823  ( D3DXVECTOR3 *pOut, UINT OutStride,CONST D3DXVECTOR3 *pV, UINT VStride,CONST D3D10_VIEWPORT *pViewport,
824  CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n);
825 
826 // Project vector Array from screen space into object space
828  ( D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3D10_VIEWPORT *pViewport,
829  CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n);
830 
831 
832 #ifdef __cplusplus
833 }
834 #endif
835 
836 
837 
838 //--------------------------
839 // 4D Vector
840 //--------------------------
841 
842 // inline
843 
845  ( CONST D3DXVECTOR4 *pV );
846 
848  ( CONST D3DXVECTOR4 *pV );
849 
851  ( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 );
852 
854  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2);
855 
857  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2);
858 
859 // Minimize each component. x = min(x1, x2), y = min(y1, y2), ...
861  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2);
862 
863 // Maximize each component. x = max(x1, x2), y = max(y1, y2), ...
865  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2);
866 
868  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s);
869 
870 // Linear interpolation. V1 + s(V2-V1)
872  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2,
873  FLOAT s );
874 
875 // non-inline
876 #ifdef __cplusplus
877 extern "C" {
878 #endif
879 
880 // Cross-product in 4 dimensions.
882  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2,
883  CONST D3DXVECTOR4 *pV3);
884 
886  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV );
887 
888 // Hermite interpolation between position V1, tangent T1 (when s == 0)
889 // and position V2, tangent T2 (when s == 1).
891  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pT1,
892  CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pT2, FLOAT s );
893 
894 // CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1)
896  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV0, CONST D3DXVECTOR4 *pV1,
897  CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pV3, FLOAT s );
898 
899 // Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1)
901  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2,
902  CONST D3DXVECTOR4 *pV3, FLOAT f, FLOAT g);
903 
904 // Transform vector by matrix.
906  ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, CONST D3DXMATRIX *pM );
907 
908 // Transform vector array by matrix.
910  ( D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR4 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n );
911 
912 #ifdef __cplusplus
913 }
914 #endif
915 
916 
917 //--------------------------
918 // 4D Matrix
919 //--------------------------
920 
921 // inline
922 
924  ( D3DXMATRIX *pOut );
925 
927  ( CONST D3DXMATRIX *pM );
928 
929 
930 // non-inline
931 #ifdef __cplusplus
932 extern "C" {
933 #endif
934 
936  ( CONST D3DXMATRIX *pM );
937 
939  ( D3DXVECTOR3 *pOutScale, D3DXQUATERNION *pOutRotation,
940  D3DXVECTOR3 *pOutTranslation, CONST D3DXMATRIX *pM );
941 
943  ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM );
944 
945 // Matrix multiplication. The result represents the transformation M2
946 // followed by the transformation M1. (Out = M1 * M2)
948  ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 );
949 
950 // Matrix multiplication, followed by a transpose. (Out = T(M1 * M2))
952  ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 );
953 
954 // Calculate inverse of matrix. Inversion my fail, in which case NULL will
955 // be returned. The determinant of pM is also returned it pfDeterminant
956 // is non-NULL.
958  ( D3DXMATRIX *pOut, FLOAT *pDeterminant, CONST D3DXMATRIX *pM );
959 
960 // Build a matrix which scales by (sx, sy, sz)
962  ( D3DXMATRIX *pOut, FLOAT sx, FLOAT sy, FLOAT sz );
963 
964 // Build a matrix which translates by (x, y, z)
966  ( D3DXMATRIX *pOut, FLOAT x, FLOAT y, FLOAT z );
967 
968 // Build a matrix which rotates around the X axis
970  ( D3DXMATRIX *pOut, FLOAT Angle );
971 
972 // Build a matrix which rotates around the Y axis
974  ( D3DXMATRIX *pOut, FLOAT Angle );
975 
976 // Build a matrix which rotates around the Z axis
978  ( D3DXMATRIX *pOut, FLOAT Angle );
979 
980 // Build a matrix which rotates around an arbitrary axis
982  ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle );
983 
984 // Build a matrix from a quaternion
986  ( D3DXMATRIX *pOut, CONST D3DXQUATERNION *pQ);
987 
988 // Yaw around the Y axis, a pitch around the X axis,
989 // and a roll around the Z axis.
991  ( D3DXMATRIX *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll );
992 
993 // Build transformation matrix. NULL arguments are treated as identity.
994 // Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt
996  ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pScalingCenter,
997  CONST D3DXQUATERNION *pScalingRotation, CONST D3DXVECTOR3 *pScaling,
998  CONST D3DXVECTOR3 *pRotationCenter, CONST D3DXQUATERNION *pRotation,
999  CONST D3DXVECTOR3 *pTranslation);
1000 
1001 // Build 2D transformation matrix in XY plane. NULL arguments are treated as identity.
1002 // Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt
1004  ( D3DXMATRIX *pOut, CONST D3DXVECTOR2* pScalingCenter,
1005  FLOAT ScalingRotation, CONST D3DXVECTOR2* pScaling,
1006  CONST D3DXVECTOR2* pRotationCenter, FLOAT Rotation,
1007  CONST D3DXVECTOR2* pTranslation);
1008 
1009 // Build affine transformation matrix. NULL arguments are treated as identity.
1010 // Mout = Ms * Mrc-1 * Mr * Mrc * Mt
1012  ( D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR3 *pRotationCenter,
1013  CONST D3DXQUATERNION *pRotation, CONST D3DXVECTOR3 *pTranslation);
1014 
1015 // Build 2D affine transformation matrix in XY plane. NULL arguments are treated as identity.
1016 // Mout = Ms * Mrc-1 * Mr * Mrc * Mt
1018  ( D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR2* pRotationCenter,
1019  FLOAT Rotation, CONST D3DXVECTOR2* pTranslation);
1020 
1021 // Build a lookat matrix. (right-handed)
1023  ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt,
1024  CONST D3DXVECTOR3 *pUp );
1025 
1026 // Build a lookat matrix. (left-handed)
1028  ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt,
1029  CONST D3DXVECTOR3 *pUp );
1030 
1031 // Build a perspective projection matrix. (right-handed)
1033  ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf );
1034 
1035 // Build a perspective projection matrix. (left-handed)
1037  ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf );
1038 
1039 // Build a perspective projection matrix. (right-handed)
1041  ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf );
1042 
1043 // Build a perspective projection matrix. (left-handed)
1045  ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf );
1046 
1047 // Build a perspective projection matrix. (right-handed)
1049  ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn,
1050  FLOAT zf );
1051 
1052 // Build a perspective projection matrix. (left-handed)
1054  ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn,
1055  FLOAT zf );
1056 
1057 // Build an ortho projection matrix. (right-handed)
1059  ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf );
1060 
1061 // Build an ortho projection matrix. (left-handed)
1063  ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf );
1064 
1065 // Build an ortho projection matrix. (right-handed)
1067  ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn,
1068  FLOAT zf );
1069 
1070 // Build an ortho projection matrix. (left-handed)
1072  ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn,
1073  FLOAT zf );
1074 
1075 // Build a matrix which flattens geometry into a plane, as if casting
1076 // a shadow from a light.
1078  ( D3DXMATRIX *pOut, CONST D3DXVECTOR4 *pLight,
1079  CONST D3DXPLANE *pPlane );
1080 
1081 // Build a matrix which reflects the coordinate system about a plane
1083  ( D3DXMATRIX *pOut, CONST D3DXPLANE *pPlane );
1084 
1085 #ifdef __cplusplus
1086 }
1087 #endif
1088 
1089 
1090 //--------------------------
1091 // Quaternion
1092 //--------------------------
1093 
1094 // inline
1095 
1097  ( CONST D3DXQUATERNION *pQ );
1098 
1099 // Length squared, or "norm"
1101  ( CONST D3DXQUATERNION *pQ );
1102 
1104  ( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 );
1105 
1106 // (0, 0, 0, 1)
1108  ( D3DXQUATERNION *pOut );
1109 
1111  ( CONST D3DXQUATERNION *pQ );
1112 
1113 // (-x, -y, -z, w)
1115  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ );
1116 
1117 
1118 // non-inline
1119 #ifdef __cplusplus
1120 extern "C" {
1121 #endif
1122 
1123 // Compute a quaternin's axis and angle of rotation. Expects unit quaternions.
1124 void WINAPI D3DXQuaternionToAxisAngle
1125  ( CONST D3DXQUATERNION *pQ, D3DXVECTOR3 *pAxis, FLOAT *pAngle );
1126 
1127 // Build a quaternion from a rotation matrix.
1129  ( D3DXQUATERNION *pOut, CONST D3DXMATRIX *pM);
1130 
1131 // Rotation about arbitrary axis.
1133  ( D3DXQUATERNION *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle );
1134 
1135 // Yaw around the Y axis, a pitch around the X axis,
1136 // and a roll around the Z axis.
1138  ( D3DXQUATERNION *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll );
1139 
1140 // Quaternion multiplication. The result represents the rotation Q2
1141 // followed by the rotation Q1. (Out = Q2 * Q1)
1143  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1,
1144  CONST D3DXQUATERNION *pQ2 );
1145 
1147  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ );
1148 
1149 // Conjugate and re-norm
1151  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ );
1152 
1153 // Expects unit quaternions.
1154 // if q = (cos(theta), sin(theta) * v); ln(q) = (0, theta * v)
1156  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ );
1157 
1158 // Expects pure quaternions. (w == 0) w is ignored in calculation.
1159 // if q = (0, theta * v); exp(q) = (cos(theta), sin(theta) * v)
1161  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ );
1162 
1163 // Spherical linear interpolation between Q1 (t == 0) and Q2 (t == 1).
1164 // Expects unit quaternions.
1166  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1,
1167  CONST D3DXQUATERNION *pQ2, FLOAT t );
1168 
1169 // Spherical quadrangle interpolation.
1170 // Slerp(Slerp(Q1, C, t), Slerp(A, B, t), 2t(1-t))
1172  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1,
1174  CONST D3DXQUATERNION *pC, FLOAT t );
1175 
1176 // Setup control points for spherical quadrangle interpolation
1177 // from Q1 to Q2. The control points are chosen in such a way
1178 // to ensure the continuity of tangents with adjacent segments.
1179 void WINAPI D3DXQuaternionSquadSetup
1180  ( D3DXQUATERNION *pAOut, D3DXQUATERNION *pBOut, D3DXQUATERNION *pCOut,
1183 
1184 // Barycentric interpolation.
1185 // Slerp(Slerp(Q1, Q2, f+g), Slerp(Q1, Q3, f+g), g/(f+g))
1187  ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1,
1189  FLOAT f, FLOAT g );
1190 
1191 #ifdef __cplusplus
1192 }
1193 #endif
1194 
1195 
1196 //--------------------------
1197 // Plane
1198 //--------------------------
1199 
1200 // inline
1201 
1202 // ax + by + cz + dw
1204  ( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV);
1205 
1206 // ax + by + cz + d
1208  ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV);
1209 
1210 // ax + by + cz
1212  ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV);
1213 
1215  (D3DXPLANE *pOut, CONST D3DXPLANE *pP, FLOAT s);
1216 
1217 // non-inline
1218 #ifdef __cplusplus
1219 extern "C" {
1220 #endif
1221 
1222 // Normalize plane (so that |a,b,c| == 1)
1224  ( D3DXPLANE *pOut, CONST D3DXPLANE *pP);
1225 
1226 // Find the intersection between a plane and a line. If the line is
1227 // parallel to the plane, NULL is returned.
1229  ( D3DXVECTOR3 *pOut, CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV1,
1230  CONST D3DXVECTOR3 *pV2);
1231 
1232 // Construct a plane from a point and a normal
1234  ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pPoint, CONST D3DXVECTOR3 *pNormal);
1235 
1236 // Construct a plane from 3 points
1238  ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2,
1239  CONST D3DXVECTOR3 *pV3);
1240 
1241 // Transform a plane by a matrix. The vector (a,b,c) must be normal.
1242 // M should be the inverse transpose of the transformation desired.
1244  ( D3DXPLANE *pOut, CONST D3DXPLANE *pP, CONST D3DXMATRIX *pM );
1245 
1246 // Transform an array of planes by a matrix. The vectors (a,b,c) must be normal.
1247 // M should be the inverse transpose of the transformation desired.
1249  ( D3DXPLANE *pOut, UINT OutStride, CONST D3DXPLANE *pP, UINT PStride, CONST D3DXMATRIX *pM, UINT n );
1250 
1251 #ifdef __cplusplus
1252 }
1253 #endif
1254 
1255 
1256 //--------------------------
1257 // Color
1258 //--------------------------
1259 
1260 // inline
1261 
1262 // (1-r, 1-g, 1-b, a)
1264  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC);
1265 
1267  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2);
1268 
1270  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2);
1271 
1273  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s);
1274 
1275 // (r1*r2, g1*g2, b1*b2, a1*a2)
1277  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2);
1278 
1279 // Linear interpolation of r,g,b, and a. C1 + s(C2-C1)
1281  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s);
1282 
1283 // non-inline
1284 #ifdef __cplusplus
1285 extern "C" {
1286 #endif
1287 
1288 // Interpolate r,g,b between desaturated color and color.
1289 // DesaturatedColor + s(Color - DesaturatedColor)
1291  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s);
1292 
1293 // Interpolate r,g,b between 50% grey and color. Grey + s(Color - Grey)
1295  (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT c);
1296 
1297 #ifdef __cplusplus
1298 }
1299 #endif
1300 
1301 
1302 
1303 
1304 //--------------------------
1305 // Misc
1306 //--------------------------
1307 
1308 #ifdef __cplusplus
1309 extern "C" {
1310 #endif
1311 
1312 // Calculate Fresnel term given the cosine of theta (likely obtained by
1313 // taking the dot of two normals), and the refraction index of the material.
1314 FLOAT WINAPI D3DXFresnelTerm
1315  (FLOAT CosTheta, FLOAT RefractionIndex);
1316 
1317 #ifdef __cplusplus
1318 }
1319 #endif
1320 
1321 
1322 
1323 //===========================================================================
1324 //
1325 // Matrix Stack
1326 //
1327 //===========================================================================
1328 
1331 
1332 // {C7885BA7-F990-4fe7-922D-8515E477DD85}
1333 DEFINE_GUID(IID_ID3DXMatrixStack,
1334 0xc7885ba7, 0xf990, 0x4fe7, 0x92, 0x2d, 0x85, 0x15, 0xe4, 0x77, 0xdd, 0x85);
1335 
1336 
1337 #undef INTERFACE
1338 #define INTERFACE ID3DXMatrixStack
1339 
1341 {
1342  //
1343  // IUnknown methods
1344  //
1345  STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
1346  STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1347  STDMETHOD_(ULONG,Release)(THIS) PURE;
1348 
1349  //
1350  // ID3DXMatrixStack methods
1351  //
1352 
1353  // Pops the top of the stack, returns the current top
1354  // *after* popping the top.
1355  STDMETHOD(Pop)(THIS) PURE;
1356 
1357  // Pushes the stack by one, duplicating the current matrix.
1358  STDMETHOD(Push)(THIS) PURE;
1359 
1360  // Loads identity in the current matrix.
1361  STDMETHOD(LoadIdentity)(THIS) PURE;
1362 
1363  // Loads the given matrix into the current matrix
1364  STDMETHOD(LoadMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE;
1365 
1366  // Right-Multiplies the given matrix to the current matrix.
1367  // (transformation is about the current world origin)
1368  STDMETHOD(MultMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE;
1369 
1370  // Left-Multiplies the given matrix to the current matrix
1371  // (transformation is about the local origin of the object)
1372  STDMETHOD(MultMatrixLocal)(THIS_ CONST D3DXMATRIX* pM ) PURE;
1373 
1374  // Right multiply the current matrix with the computed rotation
1375  // matrix, counterclockwise about the given axis with the given angle.
1376  // (rotation is about the current world origin)
1377  STDMETHOD(RotateAxis)
1378  (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE;
1379 
1380  // Left multiply the current matrix with the computed rotation
1381  // matrix, counterclockwise about the given axis with the given angle.
1382  // (rotation is about the local origin of the object)
1383  STDMETHOD(RotateAxisLocal)
1384  (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE;
1385 
1386  // Right multiply the current matrix with the computed rotation
1387  // matrix. All angles are counterclockwise. (rotation is about the
1388  // current world origin)
1389 
1390  // The rotation is composed of a yaw around the Y axis, a pitch around
1391  // the X axis, and a roll around the Z axis.
1392  STDMETHOD(RotateYawPitchRoll)
1393  (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE;
1394 
1395  // Left multiply the current matrix with the computed rotation
1396  // matrix. All angles are counterclockwise. (rotation is about the
1397  // local origin of the object)
1398 
1399  // The rotation is composed of a yaw around the Y axis, a pitch around
1400  // the X axis, and a roll around the Z axis.
1401  STDMETHOD(RotateYawPitchRollLocal)
1402  (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE;
1403 
1404  // Right multiply the current matrix with the computed scale
1405  // matrix. (transformation is about the current world origin)
1406  STDMETHOD(Scale)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE;
1407 
1408  // Left multiply the current matrix with the computed scale
1409  // matrix. (transformation is about the local origin of the object)
1410  STDMETHOD(ScaleLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE;
1411 
1412  // Right multiply the current matrix with the computed translation
1413  // matrix. (transformation is about the current world origin)
1414  STDMETHOD(Translate)(THIS_ FLOAT x, FLOAT y, FLOAT z ) PURE;
1415 
1416  // Left multiply the current matrix with the computed translation
1417  // matrix. (transformation is about the local origin of the object)
1418  STDMETHOD(TranslateLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE;
1419 
1420  // Obtain the current matrix at the top of the stack
1421  STDMETHOD_(D3DXMATRIX*, GetTop)(THIS) PURE;
1422 };
1423 
1424 #ifdef __cplusplus
1425 extern "C" {
1426 #endif
1427 
1428 HRESULT WINAPI
1430  UINT Flags,
1431  LPD3DXMATRIXSTACK* ppStack);
1432 
1433 #ifdef __cplusplus
1434 }
1435 #endif
1436 
1437 // non-inline
1438 #ifdef __cplusplus
1439 extern "C" {
1440 #endif
1441 
1442 //============================================================================
1443 //
1444 // Basic Spherical Harmonic math routines
1445 //
1446 //============================================================================
1447 
1448 #define D3DXSH_MINORDER 2
1449 #define D3DXSH_MAXORDER 6
1450 
1451 //============================================================================
1452 //
1453 // D3DXSHEvalDirection:
1454 // --------------------
1455 // Evaluates the Spherical Harmonic basis functions
1456 //
1457 // Parameters:
1458 // pOut
1459 // Output SH coefficients - basis function Ylm is stored at l*l + m+l
1460 // This is the pointer that is returned.
1461 // Order
1462 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1463 // pDir
1464 // Direction to evaluate in - assumed to be normalized
1465 //
1466 //============================================================================
1467 
1468 FLOAT* WINAPI D3DXSHEvalDirection
1469  ( FLOAT *pOut, UINT Order, CONST D3DXVECTOR3 *pDir );
1470 
1471 //============================================================================
1472 //
1473 // D3DXSHRotate:
1474 // --------------------
1475 // Rotates SH vector by a rotation matrix
1476 //
1477 // Parameters:
1478 // pOut
1479 // Output SH coefficients - basis function Ylm is stored at l*l + m+l
1480 // This is the pointer that is returned (should not alias with pIn.)
1481 // Order
1482 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1483 // pMatrix
1484 // Matrix used for rotation - rotation sub matrix should be orthogonal
1485 // and have a unit determinant.
1486 // pIn
1487 // Input SH coeffs (rotated), incorect results if this is also output.
1488 //
1489 //============================================================================
1490 
1491 FLOAT* WINAPI D3DXSHRotate
1492  ( __out_ecount(Order*Order) FLOAT *pOut, UINT Order, CONST D3DXMATRIX *pMatrix, CONST FLOAT *pIn );
1493 
1494 //============================================================================
1495 //
1496 // D3DXSHRotateZ:
1497 // --------------------
1498 // Rotates the SH vector in the Z axis by an angle
1499 //
1500 // Parameters:
1501 // pOut
1502 // Output SH coefficients - basis function Ylm is stored at l*l + m+l
1503 // This is the pointer that is returned (should not alias with pIn.)
1504 // Order
1505 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1506 // Angle
1507 // Angle in radians to rotate around the Z axis.
1508 // pIn
1509 // Input SH coeffs (rotated), incorect results if this is also output.
1510 //
1511 //============================================================================
1512 
1513 
1514 FLOAT* WINAPI D3DXSHRotateZ
1515  ( FLOAT *pOut, UINT Order, FLOAT Angle, CONST FLOAT *pIn );
1516 
1517 //============================================================================
1518 //
1519 // D3DXSHAdd:
1520 // --------------------
1521 // Adds two SH vectors, pOut[i] = pA[i] + pB[i];
1522 //
1523 // Parameters:
1524 // pOut
1525 // Output SH coefficients - basis function Ylm is stored at l*l + m+l
1526 // This is the pointer that is returned.
1527 // Order
1528 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1529 // pA
1530 // Input SH coeffs.
1531 // pB
1532 // Input SH coeffs (second vector.)
1533 //
1534 //============================================================================
1535 
1536 FLOAT* WINAPI D3DXSHAdd
1537  ( __out_ecount(Order*Order) FLOAT *pOut, UINT Order, CONST FLOAT *pA, CONST FLOAT *pB );
1538 
1539 //============================================================================
1540 //
1541 // D3DXSHScale:
1542 // --------------------
1543 // Adds two SH vectors, pOut[i] = pA[i]*Scale;
1544 //
1545 // Parameters:
1546 // pOut
1547 // Output SH coefficients - basis function Ylm is stored at l*l + m+l
1548 // This is the pointer that is returned.
1549 // Order
1550 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1551 // pIn
1552 // Input SH coeffs.
1553 // Scale
1554 // Scale factor.
1555 //
1556 //============================================================================
1557 
1558 FLOAT* WINAPI D3DXSHScale
1559  ( __out_ecount(Order*Order) FLOAT *pOut, UINT Order, CONST FLOAT *pIn, CONST FLOAT Scale );
1560 
1561 //============================================================================
1562 //
1563 // D3DXSHDot:
1564 // --------------------
1565 // Computes the dot product of two SH vectors
1566 //
1567 // Parameters:
1568 // Order
1569 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1570 // pA
1571 // Input SH coeffs.
1572 // pB
1573 // Second set of input SH coeffs.
1574 //
1575 //============================================================================
1576 
1577 FLOAT WINAPI D3DXSHDot
1578  ( UINT Order, CONST FLOAT *pA, CONST FLOAT *pB );
1579 
1580 //============================================================================
1581 //
1582 // D3DXSHMultiply[O]:
1583 // --------------------
1584 // Computes the product of two functions represented using SH (f and g), where:
1585 // pOut[i] = int(y_i(s) * f(s) * g(s)), where y_i(s) is the ith SH basis
1586 // function, f(s) and g(s) are SH functions (sum_i(y_i(s)*c_i)). The order O
1587 // determines the lengths of the arrays, where there should always be O^2
1588 // coefficients. In general the product of two SH functions of order O generates
1589 // and SH function of order 2*O - 1, but we truncate the result. This means
1590 // that the product commutes (f*g == g*f) but doesn't associate
1591 // (f*(g*h) != (f*g)*h.
1592 //
1593 // Parameters:
1594 // pOut
1595 // Output SH coefficients - basis function Ylm is stored at l*l + m+l
1596 // This is the pointer that is returned.
1597 // pF
1598 // Input SH coeffs for first function.
1599 // pG
1600 // Second set of input SH coeffs.
1601 //
1602 //============================================================================
1603 
1609 
1610 
1611 //============================================================================
1612 //
1613 // Basic Spherical Harmonic lighting routines
1614 //
1615 //============================================================================
1616 
1617 //============================================================================
1618 //
1619 // D3DXSHEvalDirectionalLight:
1620 // --------------------
1621 // Evaluates a directional light and returns spectral SH data. The output
1622 // vector is computed so that if the intensity of R/G/B is unit the resulting
1623 // exit radiance of a point directly under the light on a diffuse object with
1624 // an albedo of 1 would be 1.0. This will compute 3 spectral samples, pROut
1625 // has to be specified, while pGout and pBout are optional.
1626 //
1627 // Parameters:
1628 // Order
1629 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1630 // pDir
1631 // Direction light is coming from (assumed to be normalized.)
1632 // RIntensity
1633 // Red intensity of light.
1634 // GIntensity
1635 // Green intensity of light.
1636 // BIntensity
1637 // Blue intensity of light.
1638 // pROut
1639 // Output SH vector for Red.
1640 // pGOut
1641 // Output SH vector for Green (optional.)
1642 // pBOut
1643 // Output SH vector for Blue (optional.)
1644 //
1645 //============================================================================
1646 
1648  ( UINT Order, CONST D3DXVECTOR3 *pDir,
1649  FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity,
1650  __out_ecount_opt(Order*Order) FLOAT *pROut,
1651  __out_ecount_opt(Order*Order) FLOAT *pGOut,
1652  __out_ecount_opt(Order*Order) FLOAT *pBOut );
1653 
1654 //============================================================================
1655 //
1656 // D3DXSHEvalSphericalLight:
1657 // --------------------
1658 // Evaluates a spherical light and returns spectral SH data. There is no
1659 // normalization of the intensity of the light like there is for directional
1660 // lights, care has to be taken when specifiying the intensities. This will
1661 // compute 3 spectral samples, pROut has to be specified, while pGout and
1662 // pBout are optional.
1663 //
1664 // Parameters:
1665 // Order
1666 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1667 // pPos
1668 // Position of light - reciever is assumed to be at the origin.
1669 // Radius
1670 // Radius of the spherical light source.
1671 // RIntensity
1672 // Red intensity of light.
1673 // GIntensity
1674 // Green intensity of light.
1675 // BIntensity
1676 // Blue intensity of light.
1677 // pROut
1678 // Output SH vector for Red.
1679 // pGOut
1680 // Output SH vector for Green (optional.)
1681 // pBOut
1682 // Output SH vector for Blue (optional.)
1683 //
1684 //============================================================================
1685 
1687  ( UINT Order, CONST D3DXVECTOR3 *pPos, FLOAT Radius,
1688  FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity,
1689  __out_ecount_opt(Order*Order) FLOAT *pROut,
1690  __out_ecount_opt(Order*Order) FLOAT *pGOut,
1691  __out_ecount_opt(Order*Order) FLOAT *pBOut );
1692 
1693 //============================================================================
1694 //
1695 // D3DXSHEvalConeLight:
1696 // --------------------
1697 // Evaluates a light that is a cone of constant intensity and returns spectral
1698 // SH data. The output vector is computed so that if the intensity of R/G/B is
1699 // unit the resulting exit radiance of a point directly under the light oriented
1700 // in the cone direction on a diffuse object with an albedo of 1 would be 1.0.
1701 // This will compute 3 spectral samples, pROut has to be specified, while pGout
1702 // and pBout are optional.
1703 //
1704 // Parameters:
1705 // Order
1706 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1707 // pDir
1708 // Direction light is coming from (assumed to be normalized.)
1709 // Radius
1710 // Radius of cone in radians.
1711 // RIntensity
1712 // Red intensity of light.
1713 // GIntensity
1714 // Green intensity of light.
1715 // BIntensity
1716 // Blue intensity of light.
1717 // pROut
1718 // Output SH vector for Red.
1719 // pGOut
1720 // Output SH vector for Green (optional.)
1721 // pBOut
1722 // Output SH vector for Blue (optional.)
1723 //
1724 //============================================================================
1725 
1727  ( UINT Order, CONST D3DXVECTOR3 *pDir, FLOAT Radius,
1728  FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity,
1729  __out_ecount_opt(Order*Order) FLOAT *pROut,
1730  __out_ecount_opt(Order*Order) FLOAT *pGOut,
1731  __out_ecount_opt(Order*Order) FLOAT *pBOut );
1732 
1733 //============================================================================
1734 //
1735 // D3DXSHEvalHemisphereLight:
1736 // --------------------
1737 // Evaluates a light that is a linear interpolant between two colors over the
1738 // sphere. The interpolant is linear along the axis of the two points, not
1739 // over the surface of the sphere (ie: if the axis was (0,0,1) it is linear in
1740 // Z, not in the azimuthal angle.) The resulting spherical lighting function
1741 // is normalized so that a point on a perfectly diffuse surface with no
1742 // shadowing and a normal pointed in the direction pDir would result in exit
1743 // radiance with a value of 1 if the top color was white and the bottom color
1744 // was black. This is a very simple model where Top represents the intensity
1745 // of the "sky" and Bottom represents the intensity of the "ground".
1746 //
1747 // Parameters:
1748 // Order
1749 // Order of the SH evaluation, generates Order^2 coefs, degree is Order-1
1750 // pDir
1751 // Axis of the hemisphere.
1752 // Top
1753 // Color of the upper hemisphere.
1754 // Bottom
1755 // Color of the lower hemisphere.
1756 // pROut
1757 // Output SH vector for Red.
1758 // pGOut
1759 // Output SH vector for Green
1760 // pBOut
1761 // Output SH vector for Blue
1762 //
1763 //============================================================================
1764 
1766  ( UINT Order, CONST D3DXVECTOR3 *pDir, D3DXCOLOR Top, D3DXCOLOR Bottom,
1767  __out_ecount_opt(Order*Order) FLOAT *pROut,
1768  __out_ecount_opt(Order*Order) FLOAT *pGOut,
1769  __out_ecount_opt(Order*Order) FLOAT *pBOut );
1770 
1771 // Math intersection functions
1772 
1773 BOOL WINAPI D3DXIntersectTri
1774 (
1775  CONST D3DXVECTOR3 *p0, // Triangle vertex 0 position
1776  CONST D3DXVECTOR3 *p1, // Triangle vertex 1 position
1777  CONST D3DXVECTOR3 *p2, // Triangle vertex 2 position
1778  CONST D3DXVECTOR3 *pRayPos, // Ray origin
1779  CONST D3DXVECTOR3 *pRayDir, // Ray direction
1780  FLOAT *pU, // Barycentric Hit Coordinates
1781  FLOAT *pV, // Barycentric Hit Coordinates
1782  FLOAT *pDist); // Ray-Intersection Parameter Distance
1783 
1784 BOOL WINAPI
1786  CONST D3DXVECTOR3 *pCenter,
1787  FLOAT Radius,
1788  CONST D3DXVECTOR3 *pRayPosition,
1789  CONST D3DXVECTOR3 *pRayDirection);
1790 
1791 BOOL WINAPI
1793  CONST D3DXVECTOR3 *pMin,
1794  CONST D3DXVECTOR3 *pMax,
1795  CONST D3DXVECTOR3 *pRayPosition,
1796  CONST D3DXVECTOR3 *pRayDirection);
1797 
1798 HRESULT WINAPI
1800  CONST D3DXVECTOR3 *pFirstPosition, // pointer to first position
1801  DWORD NumVertices,
1802  DWORD dwStride, // count in bytes to subsequent position vectors
1803  D3DXVECTOR3 *pCenter,
1804  FLOAT *pRadius);
1805 
1806 HRESULT WINAPI
1808  CONST D3DXVECTOR3 *pFirstPosition, // pointer to first position
1809  DWORD NumVertices,
1810  DWORD dwStride, // count in bytes to subsequent position vectors
1811  D3DXVECTOR3 *pMin,
1812  D3DXVECTOR3 *pMax);
1813 
1814 
1816 // CPU Optimization:
1818 
1819 //-------------------------------------------------------------------------
1820 // D3DX_CPU_OPTIMIZATION flags:
1821 // ----------------------------
1822 // D3DX_NOT_OPTIMIZED Use Intel Pentium optimizations
1823 // D3DX_3DNOW_OPTIMIZED Use AMD 3DNow optimizations
1824 // D3DX_SSE_OPTIMIZED Use Intel Pentium III SSE optimizations
1825 // D3DX_SSE2_OPTIMIZED Use Intel Pentium IV SSE2 optimizations
1826 //-------------------------------------------------------------------------
1827 
1828 
1830 {
1836 
1837 
1838 //-------------------------------------------------------------------------
1839 // D3DXCpuOptimizations:
1840 // ---------------------
1841 // Enables or disables CPU optimizations. Returns the type of CPU, which
1842 // was detected, and for which optimizations exist.
1843 //
1844 // Parameters:
1845 // Enable
1846 // TRUE to enable CPU optimizations. FALSE to disable.
1847 //-------------------------------------------------------------------------
1848 
1849 D3DX_CPU_OPTIMIZATION WINAPI
1850  D3DXCpuOptimizations(BOOL Enable);
1851 
1852 #ifdef __cplusplus
1853 }
1854 #endif
1855 
1856 
1857 #include "d3dx10math.inl"
1858 
1859 #if _MSC_VER >= 1200
1860 #pragma warning(pop)
1861 #else
1862 #pragma warning(default:4201)
1863 #endif
1864 
1865 #endif // __D3DX9MATH_H__
1866 
float x
Definition: d3d8types.h:49
HRESULT WINAPI D3DXMatrixDecompose(D3DXVECTOR3 *pOutScale, D3DXQUATERNION *pOutRotation, D3DXVECTOR3 *pOutTranslation, CONST D3DXMATRIX *pM)
FLOAT D3DXPlaneDotCoord(CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV)
Definition: d3dx8math.inl:1619
D3DXQUATERNION * D3DXQuaternionConjugate(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ)
Definition: d3dx8math.inl:1588
D3DXMATRIX *WINAPI D3DXMatrixTranslation(D3DXMATRIX *pOut, FLOAT x, FLOAT y, FLOAT z)
FLOAT D3DXVec3LengthSq(CONST D3DXVECTOR3 *pV)
Definition: d3dx8math.inl:1225
struct D3DXPLANE * LPD3DXPLANE
D3DXMATRIX *WINAPI D3DXMatrixPerspectiveLH(D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf)
void WINAPI D3DXQuaternionSquadSetup(D3DXQUATERNION *pAOut, D3DXQUATERNION *pBOut, D3DXQUATERNION *pCOut, CONST D3DXQUATERNION *pQ0, CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3)
D3DXMATRIX *WINAPI D3DXMatrixAffineTransformation2D(D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR2 *pRotationCenter, FLOAT Rotation, CONST D3DXVECTOR2 *pTranslation)
D3DXVECTOR4 * D3DXVec4Minimize(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
Definition: d3dx8math.inl:1422
D3DXVECTOR4 *WINAPI D3DXVec3TransformArray(D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n)
struct _D3DVECTOR * LPD3DXVECTOR3
Definition: d3dx10math.h:232
D3DXMATRIX *WINAPI D3DXMatrixMultiply(D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2)
struct _D3DMATRIX * LPD3DXMATRIX
Definition: d3dx10math.h:392
DECLARE_INTERFACE_(ID3DXMatrixStack, IUnknown)
Definition: d3dx10math.h:1340
WORD value
Definition: d3dx9math.h:65
D3DXCOLOR * D3DXColorModulate(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2)
Definition: d3dx8math.inl:1706
float _44
Definition: d3d8types.h:83
D3DXVECTOR2 * D3DXVec2Lerp(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, FLOAT s)
Definition: d3dx8math.inl:1191
FLOAT x
Definition: d3dx8math.h:362
__in_ecount(4) CONST FLOAT *pF
FLOAT D3DXVec3Length(CONST D3DXVECTOR3 *pV)
Definition: d3dx8math.inl:1210
Definition: d3d8types.h:77
D3DXVECTOR3 *WINAPI D3DXVec3Project(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT *pViewport, CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld)
D3DXVECTOR4 * D3DXVec4Lerp(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, FLOAT s)
Definition: d3dx8math.inl:1467
FLOAT D3DXVec4Length(CONST D3DXVECTOR4 *pV)
Definition: d3dx8math.inl:1355
FLOAT *WINAPI D3DXFloat16To32Array(__out_ecount(n) FLOAT *pOut, __in_ecount(n) CONST D3DXFLOAT16 *pIn, UINT n)
float _23
Definition: d3d8types.h:81
D3DXFLOAT16 x
Definition: d3dx9math.h:291
Definition: d3d8types.h:48
FLOAT D3DXPlaneDotNormal(CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV)
Definition: d3dx8math.inl:1630
float _21
Definition: d3d8types.h:81
D3DXVECTOR2 * D3DXVec2Scale(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s)
Definition: d3dx8math.inl:1178
FLOAT r
Definition: d3dx8math.h:446
D3DXVECTOR3 *WINAPI D3DXPlaneIntersectLine(D3DXVECTOR3 *pOut, CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2)
Definition: glslang_tab.cpp:129
D3DXVECTOR2 * D3DXVec2Subtract(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2)
Definition: d3dx8math.inl:1139
D3DXFLOAT16 z
Definition: d3dx9math.h:291
D3DXFLOAT16 *WINAPI D3DXFloat32To16Array(D3DXFLOAT16 *pOut, CONST FLOAT *pIn, UINT n)
D3DXMATRIX *WINAPI D3DXMatrixRotationX(D3DXMATRIX *pOut, FLOAT Angle)
D3DXFLOAT16 w
Definition: d3dx9math.h:291
struct D3DXVECTOR3_16F D3DXVECTOR3_16F
__cplusplus
D3DXMATRIX *WINAPI D3DXMatrixTransformation(D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pScalingCenter, CONST D3DXQUATERNION *pScalingRotation, CONST D3DXVECTOR3 *pScaling, CONST D3DXVECTOR3 *pRotationCenter, CONST D3DXQUATERNION *pRotation, CONST D3DXVECTOR3 *pTranslation)
D3DXQUATERNION *WINAPI D3DXQuaternionRotationMatrix(D3DXQUATERNION *pOut, CONST D3DXMATRIX *pM)
FLOAT *WINAPI D3DXSHMultiply2(FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG)
D3DXVECTOR4 *WINAPI D3DXVec4Hermite(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pT1, CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pT2, FLOAT s)
FLOAT D3DXVec2Length(CONST D3DXVECTOR2 *pV)
Definition: d3dx8math.inl:1078
HRESULT WINAPI D3DXCreateMatrixStack(UINT Flags, LPD3DXMATRIXSTACK *ppStack)
float _12
Definition: d3d8types.h:80
GLdouble GLdouble GLdouble r
Definition: glext.h:6406
D3DXMATRIX *WINAPI D3DXMatrixPerspectiveFovLH(D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf)
float y
Definition: d3d8types.h:50
__out_ecount(4) FLOAT *WINAPI D3DXSHMultiply2(__out_ecount(4) FLOAT *pOut
FLOAT y
Definition: d3dx8math.h:362
D3DXVECTOR4 *WINAPI D3DXVec3Transform(D3DXVECTOR4 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM)
GLdouble GLdouble t
Definition: glext.h:6398
FLOAT D3DXVec4LengthSq(CONST D3DXVECTOR4 *pV)
Definition: d3dx8math.inl:1370
struct D3DXQUATERNION * LPD3DXQUATERNION
D3DXQUATERNION *WINAPI D3DXQuaternionLn(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ)
D3DXMATRIX *WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR3 *pRotationCenter, CONST D3DXQUATERNION *pRotation, CONST D3DXVECTOR3 *pTranslation)
D3DXVECTOR2 *WINAPI D3DXVec2BaryCentric(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pV3, FLOAT f, FLOAT g)
D3DXVECTOR3 * D3DXVec3Lerp(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, FLOAT s)
Definition: d3dx8math.inl:1335
D3DXVECTOR3 *WINAPI D3DXVec3TransformNormal(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM)
D3DXVECTOR4 *WINAPI D3DXVec4Transform(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, CONST D3DXMATRIX *pM)
GLfloat f
Definition: glext.h:8207
D3DXVECTOR2 *WINAPI D3DXVec2TransformCoord(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM)
D3DXVECTOR2 *WINAPI D3DXVec2CatmullRom(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV0, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pV3, FLOAT s)
D3DXMATRIX *WINAPI D3DXMatrixOrthoLH(D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf)
D3DXMATRIX *WINAPI D3DXMatrixMultiplyTranspose(D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2)
float z
Definition: d3d8types.h:51
float _31
Definition: d3d8types.h:82
D3DXPLANE *WINAPI D3DXPlaneFromPointNormal(D3DXPLANE *pOut, CONST D3DXVECTOR3 *pPoint, CONST D3DXVECTOR3 *pNormal)
FLOAT D3DXPlaneDot(CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV)
Definition: d3dx8math.inl:1608
GLdouble s
Definition: glext.h:6390
D3DXVECTOR3 *WINAPI D3DXVec3TransformNormalArray(D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n)
D3DXQUATERNION * D3DXQuaternionIdentity(D3DXQUATERNION *pOut)
Definition: d3dx8math.inl:1563
GLdouble GLdouble z
Definition: glext.h:6514
D3DXMATRIX *WINAPI D3DXMatrixRotationYawPitchRoll(D3DXMATRIX *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll)
float _11
Definition: d3d8types.h:80
HRESULT WINAPI D3DXSHEvalConeLight(UINT Order, CONST D3DXVECTOR3 *pDir, FLOAT Radius, FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, __out_ecount_opt(Order *Order) FLOAT *pROut, __out_ecount_opt(Order *Order) FLOAT *pGOut, __out_ecount_opt(Order *Order) FLOAT *pBOut)
D3DXVECTOR4 *WINAPI D3DXVec4Cross(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pV3)
float _32
Definition: d3d8types.h:82
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3 *pFirstPosition, DWORD NumVertices, DWORD dwStride, D3DXVECTOR3 *pCenter, FLOAT *pRadius)
BOOL WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *p0, CONST D3DXVECTOR3 *p1, CONST D3DXVECTOR3 *p2, CONST D3DXVECTOR3 *pRayPos, CONST D3DXVECTOR3 *pRayDir, FLOAT *pU, FLOAT *pV, FLOAT *pDist)
D3DXFLOAT16 x
Definition: d3dx9math.h:144
D3DXMATRIX *WINAPI D3DXMatrixLookAtRH(D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, CONST D3DXVECTOR3 *pUp)
struct D3DXVECTOR2 D3DXVECTOR2
D3DXVECTOR2 *WINAPI D3DXVec2TransformNormal(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM)
D3DXVECTOR4 *WINAPI D3DXVec4BaryCentric(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pV3, FLOAT f, FLOAT g)
D3DXVECTOR2 * D3DXVec2Add(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2)
Definition: d3dx8math.inl:1126
FLOAT y
Definition: d3dx8math.h:162
D3DXMATRIX *WINAPI D3DXMatrixRotationAxis(D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle)
BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *pCenter, FLOAT Radius, CONST D3DXVECTOR3 *pRayPosition, CONST D3DXVECTOR3 *pRayDirection)
D3DXFLOAT16 x
Definition: d3dx9math.h:218
struct _D3DMATRIX D3DXMATRIX
__cplusplus
Definition: d3dx10math.h:392
DEFINE_GUID(IID_ID3DXMatrixStack, 0xc7885ba7, 0xf990, 0x4fe7, 0x92, 0x2d, 0x85, 0x15, 0xe4, 0x77, 0xdd, 0x85)
D3DXCOLOR * D3DXColorLerp(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s)
Definition: d3dx8math.inl:1721
interface ID3DXMatrixStack * LPD3DXMATRIXSTACK
Definition: d3dx8math.h:1094
float _42
Definition: d3d8types.h:83
const GLubyte * c
Definition: glext.h:9812
struct _D3DVECTOR D3DXVECTOR3
__cplusplus
Definition: d3dx10math.h:232
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
struct _D3DMATRIX D3DMATRIX
D3DXMATRIX *WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pOut, CONST D3DXVECTOR2 *pScalingCenter, FLOAT ScalingRotation, CONST D3DXVECTOR2 *pScaling, CONST D3DXVECTOR2 *pRotationCenter, FLOAT Rotation, CONST D3DXVECTOR2 *pTranslation)
float _43
Definition: d3d8types.h:83
FLOAT WINAPI D3DXFresnelTerm(FLOAT CosTheta, FLOAT RefractionIndex)
float _13
Definition: d3d8types.h:80
D3DXVECTOR4 *WINAPI D3DXVec4Normalize(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV)
D3DXFLOAT16 z
Definition: d3dx9math.h:218
D3DXQUATERNION *WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ)
D3DXMATRIX * D3DXMatrixIdentity(D3DXMATRIX *pOut)
Definition: d3dx8math.inl:1488
D3DXVECTOR4 *WINAPI D3DXVec2TransformArray(D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n)
FLOAT *WINAPI D3DXSHRotateZ(FLOAT *pOut, UINT Order, FLOAT Angle, CONST FLOAT *pIn)
D3DXQUATERNION *WINAPI D3DXQuaternionInverse(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ)
Definition: d3dx8math.h:127
D3DXVECTOR3 *WINAPI D3DXVec3Unproject(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT *pViewport, CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld)
Definition: d3dx9math.h:125
FLOAT z
Definition: d3dx8math.h:162
D3DXQUATERNION *WINAPI D3DXQuaternionSquad(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pA, CONST D3DXQUATERNION *pB, CONST D3DXQUATERNION *pC, FLOAT t)
D3DX_ALIGN16 _D3DXMATRIXA16 D3DXMATRIXA16
Definition: d3dx10math.h:449
D3DXCOLOR * D3DXColorAdd(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2)
Definition: d3dx8math.inl:1661
interface ID3DXMatrixStack ID3DXMatrixStack
Definition: d3dx8math.h:1093
D3DXVECTOR2 * D3DXVec2Maximize(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2)
Definition: d3dx8math.inl:1165
BOOL D3DXMatrixIsIdentity(CONST D3DXMATRIX *pM)
Definition: d3dx8math.inl:1506
D3DXVECTOR4 * D3DXVec4Maximize(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
Definition: d3dx8math.inl:1437
FLOAT b
Definition: d3dx8math.h:392
D3DXVECTOR4 *WINAPI D3DXVec4CatmullRom(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV0, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pV3, FLOAT s)
FLOAT D3DXQuaternionDot(CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2)
Definition: d3dx8math.inl:1551
D3DXPLANE *WINAPI D3DXPlaneNormalize(D3DXPLANE *pOut, CONST D3DXPLANE *pP)
bool l
Definition: connect_wiiupro.c:37
D3DXVECTOR3 *WINAPI D3DXVec3BaryCentric(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pV3, FLOAT f, FLOAT g)
D3DXVECTOR3 * D3DXVec3Add(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2)
Definition: d3dx8math.inl:1265
D3DXPLANE *WINAPI D3DXPlaneTransform(D3DXPLANE *pOut, CONST D3DXPLANE *pP, CONST D3DXMATRIX *pM)
struct D3DXVECTOR3_16F * LPD3DXVECTOR3_16F
D3DXVECTOR2 *WINAPI D3DXVec2Normalize(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV)
D3DXCOLOR *WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s)
struct D3DXQUATERNION D3DXQUATERNION
D3DXVECTOR3 *WINAPI D3DXVec3TransformCoord(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM)
BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *pMin, CONST D3DXVECTOR3 *pMax, CONST D3DXVECTOR3 *pRayPosition, CONST D3DXVECTOR3 *pRayDirection)
D3DXVECTOR4 *WINAPI D3DXVec2Transform(D3DXVECTOR4 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM)
FLOAT d
Definition: d3dx8math.h:392
D3DXMATRIX *WINAPI D3DXMatrixRotationZ(D3DXMATRIX *pOut, FLOAT Angle)
D3DX_CPU_OPTIMIZATION WINAPI D3DXCpuOptimizations(BOOL Enable)
D3DXMATRIX *WINAPI D3DXMatrixLookAtLH(D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, CONST D3DXVECTOR3 *pUp)
D3DXCOLOR * D3DXColorScale(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s)
Definition: d3dx8math.inl:1691
D3DXCOLOR * D3DXColorNegative(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC)
Definition: d3dx8math.inl:1646
FLOAT x
Definition: d3dx8math.h:162
HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *pFirstPosition, DWORD NumVertices, DWORD dwStride, D3DXVECTOR3 *pMin, D3DXVECTOR3 *pMax)
D3DXMATRIX _D3DXMATRIXA16
__cplusplus
Definition: d3dx10math.h:438
float _33
Definition: d3d8types.h:82
FLOAT z
Definition: d3dx8math.h:362
float4 p1
Definition: notHere.h:1
Definition: d3dx10math.h:1833
Definition: d3dx10math.h:1832
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
D3DXVECTOR2 *WINAPI D3DXVec2TransformCoordArray(D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n)
FLOAT w
Definition: d3dx8math.h:362
D3DXCOLOR * D3DXColorSubtract(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2)
Definition: d3dx8math.inl:1676
D3DXQUATERNION *WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2)
float _34
Definition: d3d8types.h:82
D3DXMATRIX *WINAPI D3DXMatrixPerspectiveOffCenterLH(D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf)
FLOAT D3DXVec2LengthSq(CONST D3DXVECTOR2 *pV)
Definition: d3dx8math.inl:1093
D3DXMATRIX *WINAPI D3DXMatrixShadow(D3DXMATRIX *pOut, CONST D3DXVECTOR4 *pLight, CONST D3DXPLANE *pPlane)
D3DXMATRIX *WINAPI D3DXMatrixRotationQuaternion(D3DXMATRIX *pOut, CONST D3DXQUATERNION *pQ)
void WINAPI D3DXQuaternionToAxisAngle(CONST D3DXQUATERNION *pQ, D3DXVECTOR3 *pAxis, FLOAT *pAngle)
D3DXPLANE *WINAPI D3DXPlaneFromPoints(D3DXPLANE *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pV3)
FLOAT *WINAPI D3DXSHMultiply5(FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG)
D3DX_ALIGN16 _D3DXMATRIXA16 * LPD3DXMATRIXA16
Definition: d3dx10math.h:449
D3DXVECTOR3 *WINAPI D3DXVec3TransformCoordArray(D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n)
struct D3DXFLOAT16 D3DXFLOAT16
FLOAT D3DXVec2Dot(CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2)
Definition: d3dx8math.inl:1104
float _14
Definition: d3d8types.h:80
D3DXVECTOR4 * D3DXVec4Subtract(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
Definition: d3dx8math.inl:1407
interface ID3DXMatrixStack * LPD3DXMATRIXSTACK
Definition: d3dx10math.h:1330
FLOAT WINAPI D3DXSHDot(UINT Order, CONST FLOAT *pA, CONST FLOAT *pB)
FLOAT a
Definition: d3dx8math.h:446
D3DXMATRIX *WINAPI D3DXMatrixPerspectiveFovRH(D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf)
Definition: d3dx8math.h:371
Definition: d3dx9math.h:271
struct D3DXVECTOR4 * LPD3DXVECTOR4
float _22
Definition: d3d8types.h:81
D3DXQUATERNION *WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle)
D3DXVECTOR3 * D3DXVec3Minimize(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2)
Definition: d3dx8math.inl:1293
FLOAT *WINAPI D3DXSHEvalDirection(FLOAT *pOut, UINT Order, CONST D3DXVECTOR3 *pDir)
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
FLOAT *WINAPI D3DXSHMultiply6(FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG)
HRESULT WINAPI D3DXSHEvalHemisphereLight(UINT Order, CONST D3DXVECTOR3 *pDir, D3DXCOLOR Top, D3DXCOLOR Bottom, __out_ecount_opt(Order *Order) FLOAT *pROut, __out_ecount_opt(Order *Order) FLOAT *pGOut, __out_ecount_opt(Order *Order) FLOAT *pBOut)
D3DXMATRIX *WINAPI D3DXMatrixOrthoOffCenterRH(D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf)
Definition: d3dx8math.h:40
struct D3DXVECTOR2_16F * LPD3DXVECTOR2_16F
Definition: d3dx9math.h:48
D3DXQUATERNION *WINAPI D3DXQuaternionExp(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ)
bool operator==(const FloatProxy< T > &first, const FloatProxy< T > &second)
Definition: hex_float.h:162
unsigned int BOOL
Definition: gctypes.h:51
FLOAT D3DXVec2CCW(CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2)
Definition: d3dx8math.inl:1115
D3DXVECTOR3 *WINAPI D3DXVec3ProjectArray(D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3D10_VIEWPORT *pViewport, CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n)
FLOAT D3DXQuaternionLengthSq(CONST D3DXQUATERNION *pQ)
Definition: d3dx8math.inl:1540
struct D3DXCOLOR * LPD3DXCOLOR
D3DXVECTOR3 * D3DXVec3Maximize(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2)
Definition: d3dx8math.inl:1307
FLOAT D3DXVec3Dot(CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2)
Definition: d3dx8math.inl:1236
D3DXVECTOR2 * D3DXVec2Minimize(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2)
Definition: d3dx8math.inl:1152
struct D3DXCOLOR D3DXCOLOR
struct D3DXPLANE D3DXPLANE
D3DXFLOAT16 y
Definition: d3dx9math.h:218
GLboolean GLboolean g
Definition: glext.h:6844
FLOAT *WINAPI D3DXSHMultiply3(FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG)
D3DXPLANE *WINAPI D3DXPlaneTransformArray(D3DXPLANE *pOut, UINT OutStride, CONST D3DXPLANE *pP, UINT PStride, CONST D3DXMATRIX *pM, UINT n)
D3DXPLANE * D3DXPlaneScale(D3DXPLANE *pOut, CONST D3DXPLANE *pP, FLOAT s)
Definition: d3dx9math.inl:1783
FLOAT D3DXQuaternionLength(CONST D3DXQUATERNION *pQ)
Definition: d3dx8math.inl:1525
float4 p2
Definition: local.h:1
D3DXFLOAT16 y
Definition: d3dx9math.h:144
FLOAT y
Definition: d3dx8math.h:76
D3DXVECTOR3 *WINAPI D3DXVec3UnprojectArray(D3DXVECTOR3 *pOut, UINT OutStride, CONST D3DXVECTOR3 *pV, UINT VStride, CONST D3D10_VIEWPORT *pViewport, CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld, UINT n)
HRESULT WINAPI D3DXSHEvalDirectionalLight(UINT Order, CONST D3DXVECTOR3 *pDir, FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, __out_ecount_opt(Order *Order) FLOAT *pROut, __out_ecount_opt(Order *Order) FLOAT *pGOut, __out_ecount_opt(Order *Order) FLOAT *pBOut)
D3DXMATRIX *WINAPI D3DXMatrixOrthoRH(D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf)
D3DXMATRIX *WINAPI D3DXMatrixInverse(D3DXMATRIX *pOut, FLOAT *pDeterminant, CONST D3DXMATRIX *pM)
FLOAT b
Definition: d3dx8math.h:446
D3DXQUATERNION *WINAPI D3DXQuaternionRotationYawPitchRoll(D3DXQUATERNION *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll)
D3DXVECTOR4 * D3DXVec4Scale(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s)
Definition: d3dx8math.inl:1452
D3DXMATRIX *WINAPI D3DXMatrixRotationY(D3DXMATRIX *pOut, FLOAT Angle)
D3DXVECTOR3 * D3DXVec3Scale(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s)
Definition: d3dx8math.inl:1321
D3DXFLOAT16 y
Definition: d3dx9math.h:291
D3DXVECTOR3 *WINAPI D3DXVec3CatmullRom(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV0, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pV3, FLOAT s)
Definition: glslang_tab.cpp:136
Definition: d3dx8math.h:326
__cplusplus
Definition: d3dx9math.h:198
FLOAT c
Definition: d3dx8math.h:392
D3DXMATRIX *WINAPI D3DXMatrixPerspectiveOffCenterRH(D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf)
FLOAT D3DXVec4Dot(CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
Definition: d3dx8math.inl:1381
BOOL D3DXQuaternionIsIdentity(CONST D3DXQUATERNION *pQ)
Definition: d3dx8math.inl:1576
Definition: glslang_tab.cpp:133
D3DXQUATERNION *WINAPI D3DXQuaternionBaryCentric(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3, FLOAT f, FLOAT g)
D3DXVECTOR3 * D3DXVec3Cross(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2)
Definition: d3dx8math.inl:1247
D3DXVECTOR3 *WINAPI D3DXVec3Normalize(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV)
#define D3DX_ALIGN16
__cplusplus
Definition: d3dx10math.h:446
struct D3DXFLOAT16 * LPD3DXFLOAT16
D3DXVECTOR2 *WINAPI D3DXVec2Hermite(D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pT1, CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pT2, FLOAT s)
FLOAT *WINAPI D3DXSHAdd(__out_ecount(Order *Order) FLOAT *pOut, UINT Order, CONST FLOAT *pA, CONST FLOAT *pB)
D3DXMATRIX *WINAPI D3DXMatrixTranspose(D3DXMATRIX *pOut, CONST D3DXMATRIX *pM)
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
FLOAT w
Definition: d3dx8math.h:162
Definition: d3d10.h:683
D3DXVECTOR3 *WINAPI D3DXVec3Hermite(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pT1, CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pT2, FLOAT s)
float _24
Definition: d3d8types.h:81
struct D3DXVECTOR2 * LPD3DXVECTOR2
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:8390
struct _D3DVECTOR D3DVECTOR
struct D3DXVECTOR4_16F D3DXVECTOR4_16F
D3DXVECTOR4 * D3DXVec4Add(D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2)
Definition: d3dx8math.inl:1392
FLOAT g
Definition: d3dx8math.h:446
FLOAT *WINAPI D3DXSHRotate(__out_ecount(Order *Order) FLOAT *pOut, UINT Order, CONST D3DXMATRIX *pMatrix, CONST FLOAT *pIn)
HRESULT WINAPI D3DXSHEvalSphericalLight(UINT Order, CONST D3DXVECTOR3 *pPos, FLOAT Radius, FLOAT RIntensity, FLOAT GIntensity, FLOAT BIntensity, __out_ecount_opt(Order *Order) FLOAT *pROut, __out_ecount_opt(Order *Order) FLOAT *pGOut, __out_ecount_opt(Order *Order) FLOAT *pBOut)
Definition: d3dx8math.h:402
FLOAT a
Definition: d3dx8math.h:392
FLOAT *WINAPI D3DXSHScale(__out_ecount(Order *Order) FLOAT *pOut, UINT Order, CONST FLOAT *pIn, CONST FLOAT Scale)
D3DXCOLOR *WINAPI D3DXColorAdjustContrast(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT c)
FLOAT WINAPI D3DXMatrixDeterminant(CONST D3DXMATRIX *pM)
GLdouble n
Definition: glext.h:8396
const GLfloat * m
Definition: glext.h:11755
D3DXVECTOR3 * D3DXVec3Subtract(D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2)
Definition: d3dx8math.inl:1279
D3DXMATRIX *WINAPI D3DXMatrixScaling(D3DXMATRIX *pOut, FLOAT sx, FLOAT sy, FLOAT sz)
struct D3DXVECTOR4_16F * LPD3DXVECTOR4_16F
D3DXVECTOR4 *WINAPI D3DXVec4TransformArray(D3DXVECTOR4 *pOut, UINT OutStride, CONST D3DXVECTOR4 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n)
float _41
Definition: d3d8types.h:83
Definition: d3dx10math.h:1831
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
D3DXVECTOR2 *WINAPI D3DXVec2TransformNormalArray(D3DXVECTOR2 *pOut, UINT OutStride, CONST D3DXVECTOR2 *pV, UINT VStride, CONST D3DXMATRIX *pM, UINT n)
struct D3DXVECTOR2_16F D3DXVECTOR2_16F
D3DXMATRIX *WINAPI D3DXMatrixPerspectiveRH(D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf)
D3DXMATRIX *WINAPI D3DXMatrixOrthoOffCenterLH(D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf)
D3DXMATRIX *WINAPI D3DXMatrixReflect(D3DXMATRIX *pOut, CONST D3DXPLANE *pPlane)
FLOAT *WINAPI D3DXSHMultiply4(FLOAT *pOut, CONST FLOAT *pF, CONST FLOAT *pG)
enum _D3DX_CPU_OPTIMIZATION D3DX_CPU_OPTIMIZATION
_D3DX_CPU_OPTIMIZATION
Definition: d3dx10math.h:1829
FLOAT x
Definition: d3dx8math.h:76
struct D3DXVECTOR4 D3DXVECTOR4
D3DXQUATERNION *WINAPI D3DXQuaternionSlerp(D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2, FLOAT t)
Definition: d3dx10math.h:1834