2 * Copyright (C) 2007 David Adam
3 * Copyright (C) 2007 Tony Wasserka
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __D3DX9MATH_H__
23 #define __D3DX9MATH_H__
27 #define D3DX_PI ((FLOAT)3.141592654)
28 #define D3DX_1BYPI ((FLOAT)0.318309886)
30 #define D3DXToRadian(degree) ((degree) * (D3DX_PI / 180.0f))
31 #define D3DXToDegree(radian) ((radian) * (180.0f / D3DX_PI))
33 typedef struct D3DXVECTOR2
37 D3DXVECTOR2(CONST FLOAT
*pf
);
38 D3DXVECTOR2(FLOAT fx
, FLOAT fy
);
41 operator CONST FLOAT
* () const;
43 D3DXVECTOR2
& operator += (CONST D3DXVECTOR2
&);
44 D3DXVECTOR2
& operator -= (CONST D3DXVECTOR2
&);
45 D3DXVECTOR2
& operator *= (FLOAT
);
46 D3DXVECTOR2
& operator /= (FLOAT
);
48 D3DXVECTOR2
operator + () const;
49 D3DXVECTOR2
operator - () const;
51 D3DXVECTOR2
operator + (CONST D3DXVECTOR2
&) const;
52 D3DXVECTOR2
operator - (CONST D3DXVECTOR2
&) const;
53 D3DXVECTOR2
operator * (FLOAT
) const;
54 D3DXVECTOR2
operator / (FLOAT
) const;
56 friend D3DXVECTOR2
operator * (FLOAT
, CONST D3DXVECTOR2
&);
58 BOOL
operator == (CONST D3DXVECTOR2
&) const;
59 BOOL
operator != (CONST D3DXVECTOR2
&) const;
60 #endif /* __cplusplus */
62 } D3DXVECTOR2
, *LPD3DXVECTOR2
;
65 typedef struct D3DXVECTOR3
: public D3DVECTOR
68 D3DXVECTOR3(CONST FLOAT
*pf
);
69 D3DXVECTOR3(CONST D3DVECTOR
& v
);
70 D3DXVECTOR3(FLOAT fx
, FLOAT fy
, FLOAT fz
);
73 operator CONST FLOAT
* () const;
75 D3DXVECTOR3
& operator += (CONST D3DXVECTOR3
&);
76 D3DXVECTOR3
& operator -= (CONST D3DXVECTOR3
&);
77 D3DXVECTOR3
& operator *= (FLOAT
);
78 D3DXVECTOR3
& operator /= (FLOAT
);
80 D3DXVECTOR3
operator + () const;
81 D3DXVECTOR3
operator - () const;
83 D3DXVECTOR3
operator + (CONST D3DXVECTOR3
&) const;
84 D3DXVECTOR3
operator - (CONST D3DXVECTOR3
&) const;
85 D3DXVECTOR3
operator * (FLOAT
) const;
86 D3DXVECTOR3
operator / (FLOAT
) const;
88 friend D3DXVECTOR3
operator * (FLOAT
, CONST
struct D3DXVECTOR3
&);
90 BOOL
operator == (CONST D3DXVECTOR3
&) const;
91 BOOL
operator != (CONST D3DXVECTOR3
&) const;
92 } D3DXVECTOR3
, *LPD3DXVECTOR3
;
93 #else /* !__cplusplus */
94 typedef struct _D3DVECTOR D3DXVECTOR3
, *LPD3DXVECTOR3
;
95 #endif /* !__cplusplus */
97 typedef struct D3DXVECTOR4
101 D3DXVECTOR4(CONST FLOAT
*pf
);
102 D3DXVECTOR4(FLOAT fx
, FLOAT fy
, FLOAT fz
, FLOAT fw
);
105 operator CONST FLOAT
* () const;
107 D3DXVECTOR4
& operator += (CONST D3DXVECTOR4
&);
108 D3DXVECTOR4
& operator -= (CONST D3DXVECTOR4
&);
109 D3DXVECTOR4
& operator *= (FLOAT
);
110 D3DXVECTOR4
& operator /= (FLOAT
);
112 D3DXVECTOR4
operator + () const;
113 D3DXVECTOR4
operator - () const;
115 D3DXVECTOR4
operator + (CONST D3DXVECTOR4
&) const;
116 D3DXVECTOR4
operator - (CONST D3DXVECTOR4
&) const;
117 D3DXVECTOR4
operator * (FLOAT
) const;
118 D3DXVECTOR4
operator / (FLOAT
) const;
120 friend D3DXVECTOR4
operator * (FLOAT
, CONST D3DXVECTOR4
&);
122 BOOL
operator == (CONST D3DXVECTOR4
&) const;
123 BOOL
operator != (CONST D3DXVECTOR4
&) const;
124 #endif /* __cplusplus */
126 } D3DXVECTOR4
, *LPD3DXVECTOR4
;
129 typedef struct D3DXMATRIX
: public D3DMATRIX
132 D3DXMATRIX(CONST FLOAT
*pf
);
133 D3DXMATRIX(CONST D3DMATRIX
& mat
);
134 D3DXMATRIX(FLOAT f11
, FLOAT f12
, FLOAT f13
, FLOAT f14
,
135 FLOAT f21
, FLOAT f22
, FLOAT f23
, FLOAT f24
,
136 FLOAT f31
, FLOAT f32
, FLOAT f33
, FLOAT f34
,
137 FLOAT f41
, FLOAT f42
, FLOAT f43
, FLOAT f44
);
139 FLOAT
& operator () (UINT row
, UINT col
);
140 FLOAT
operator () (UINT row
, UINT col
) const;
143 operator CONST FLOAT
* () const;
145 D3DXMATRIX
& operator *= (CONST D3DXMATRIX
&);
146 D3DXMATRIX
& operator += (CONST D3DXMATRIX
&);
147 D3DXMATRIX
& operator -= (CONST D3DXMATRIX
&);
148 D3DXMATRIX
& operator *= (FLOAT
);
149 D3DXMATRIX
& operator /= (FLOAT
);
151 D3DXMATRIX
operator + () const;
152 D3DXMATRIX
operator - () const;
154 D3DXMATRIX
operator * (CONST D3DXMATRIX
&) const;
155 D3DXMATRIX
operator + (CONST D3DXMATRIX
&) const;
156 D3DXMATRIX
operator - (CONST D3DXMATRIX
&) const;
157 D3DXMATRIX
operator * (FLOAT
) const;
158 D3DXMATRIX
operator / (FLOAT
) const;
160 friend D3DXMATRIX
operator * (FLOAT
, CONST D3DXMATRIX
&);
162 BOOL
operator == (CONST D3DXMATRIX
&) const;
163 BOOL
operator != (CONST D3DXMATRIX
&) const;
164 } D3DXMATRIX
, *LPD3DXMATRIX
;
165 #else /* !__cplusplus */
166 typedef struct _D3DMATRIX D3DXMATRIX
, *LPD3DXMATRIX
;
167 #endif /* !__cplusplus */
169 typedef struct D3DXQUATERNION
173 D3DXQUATERNION(CONST FLOAT
*pf
);
174 D3DXQUATERNION(FLOAT fx
, FLOAT fy
, FLOAT fz
, FLOAT fw
);
177 operator CONST FLOAT
* () const;
179 D3DXQUATERNION
& operator += (CONST D3DXQUATERNION
&);
180 D3DXQUATERNION
& operator -= (CONST D3DXQUATERNION
&);
181 D3DXQUATERNION
& operator *= (CONST D3DXQUATERNION
&);
182 D3DXQUATERNION
& operator *= (FLOAT
);
183 D3DXQUATERNION
& operator /= (FLOAT
);
185 D3DXQUATERNION
operator + () const;
186 D3DXQUATERNION
operator - () const;
188 D3DXQUATERNION
operator + (CONST D3DXQUATERNION
&) const;
189 D3DXQUATERNION
operator - (CONST D3DXQUATERNION
&) const;
190 D3DXQUATERNION
operator * (CONST D3DXQUATERNION
&) const;
191 D3DXQUATERNION
operator * (FLOAT
) const;
192 D3DXQUATERNION
operator / (FLOAT
) const;
194 friend D3DXQUATERNION
operator * (FLOAT
, CONST D3DXQUATERNION
&);
196 BOOL
operator == (CONST D3DXQUATERNION
&) const;
197 BOOL
operator != (CONST D3DXQUATERNION
&) const;
198 #endif /* __cplusplus */
200 } D3DXQUATERNION
, *LPD3DXQUATERNION
;
202 typedef struct D3DXPLANE
206 D3DXPLANE(CONST FLOAT
*pf
);
207 D3DXPLANE(FLOAT fa
, FLOAT fb
, FLOAT fc
, FLOAT fd
);
210 operator CONST FLOAT
* () const;
212 D3DXPLANE
operator + () const;
213 D3DXPLANE
operator - () const;
215 BOOL
operator == (CONST D3DXPLANE
&) const;
216 BOOL
operator != (CONST D3DXPLANE
&) const;
217 #endif /* __cplusplus */
219 } D3DXPLANE
, *LPD3DXPLANE
;
221 typedef struct D3DXCOLOR
225 D3DXCOLOR(DWORD col
);
226 D3DXCOLOR(CONST FLOAT
*pf
);
227 D3DXCOLOR(CONST D3DCOLORVALUE
& col
);
228 D3DXCOLOR(FLOAT fr
, FLOAT fg
, FLOAT fb
, FLOAT fa
);
230 operator DWORD () const;
233 operator CONST FLOAT
* () const;
235 operator D3DCOLORVALUE
* ();
236 operator CONST D3DCOLORVALUE
* () const;
238 operator D3DCOLORVALUE
& ();
239 operator CONST D3DCOLORVALUE
& () const;
241 D3DXCOLOR
& operator += (CONST D3DXCOLOR
&);
242 D3DXCOLOR
& operator -= (CONST D3DXCOLOR
&);
243 D3DXCOLOR
& operator *= (FLOAT
);
244 D3DXCOLOR
& operator /= (FLOAT
);
246 D3DXCOLOR
operator + () const;
247 D3DXCOLOR
operator - () const;
249 D3DXCOLOR
operator + (CONST D3DXCOLOR
&) const;
250 D3DXCOLOR
operator - (CONST D3DXCOLOR
&) const;
251 D3DXCOLOR
operator * (FLOAT
) const;
252 D3DXCOLOR
operator / (FLOAT
) const;
254 friend D3DXCOLOR
operator * (FLOAT
, CONST D3DXCOLOR
&);
256 BOOL
operator == (CONST D3DXCOLOR
&) const;
257 BOOL
operator != (CONST D3DXCOLOR
&) const;
258 #endif /* __cplusplus */
260 } D3DXCOLOR
, *LPD3DXCOLOR
;
266 D3DXCOLOR
* WINAPI
D3DXColorAdjustContrast(D3DXCOLOR
*pout
, CONST D3DXCOLOR
*pc
, FLOAT s
);
267 D3DXCOLOR
* WINAPI
D3DXColorAdjustSaturation(D3DXCOLOR
*pout
, CONST D3DXCOLOR
*pc
, FLOAT s
);
269 D3DXMATRIX
* WINAPI
D3DXMatrixAffineTransformation(D3DXMATRIX
*pout
, float scaling
, D3DXVECTOR3
*rotationcenter
, D3DXQUATERNION
*rotation
, D3DXVECTOR3
*translation
);
270 FLOAT WINAPI
D3DXMatrixDeterminant(CONST D3DXMATRIX
*pm
);
271 D3DXMATRIX
* WINAPI
D3DXMatrixInverse(D3DXMATRIX
*pout
, FLOAT
*pdeterminant
, CONST D3DXMATRIX
*pm
);
272 D3DXMATRIX
* WINAPI
D3DXMatrixLookAtLH(D3DXMATRIX
*pout
, CONST D3DXVECTOR3
*peye
, CONST D3DXVECTOR3
*pat
, CONST D3DXVECTOR3
*pup
);
273 D3DXMATRIX
* WINAPI
D3DXMatrixLookAtRH(D3DXMATRIX
*pout
, CONST D3DXVECTOR3
*peye
, CONST D3DXVECTOR3
*pat
, CONST D3DXVECTOR3
*pup
);
274 D3DXMATRIX
* WINAPI
D3DXMatrixMultiply(D3DXMATRIX
*pout
, CONST D3DXMATRIX
*pm1
, CONST D3DXMATRIX
*pm2
);
275 D3DXMATRIX
* WINAPI
D3DXMatrixMultiplyTranspose(D3DXMATRIX
*pout
, CONST D3DXMATRIX
*pm1
, CONST D3DXMATRIX
*pm2
);
276 D3DXMATRIX
* WINAPI
D3DXMatrixOrthoLH(D3DXMATRIX
*pout
, FLOAT w
, FLOAT h
, FLOAT zn
, FLOAT zf
);
277 D3DXMATRIX
* WINAPI
D3DXMatrixOrthoOffCenterLH(D3DXMATRIX
*pout
, FLOAT l
, FLOAT r
, FLOAT b
, FLOAT t
, FLOAT zn
, FLOAT zf
);
278 D3DXMATRIX
* WINAPI
D3DXMatrixOrthoOffCenterRH(D3DXMATRIX
*pout
, FLOAT l
, FLOAT r
, FLOAT b
, FLOAT t
, FLOAT zn
, FLOAT zf
);
279 D3DXMATRIX
* WINAPI
D3DXMatrixOrthoLH(D3DXMATRIX
*pout
, FLOAT w
, FLOAT h
, FLOAT zn
, FLOAT zf
);
280 D3DXMATRIX
* WINAPI
D3DXMatrixOrthoRH(D3DXMATRIX
*pout
, FLOAT w
, FLOAT h
, FLOAT zn
, FLOAT zf
);
281 D3DXMATRIX
* WINAPI
D3DXMatrixPerspectiveFovLH(D3DXMATRIX
*pout
, FLOAT fovy
, FLOAT aspect
, FLOAT zn
, FLOAT zf
);
282 D3DXMATRIX
* WINAPI
D3DXMatrixPerspectiveFovRH(D3DXMATRIX
*pout
, FLOAT fovy
, FLOAT aspect
, FLOAT zn
, FLOAT zf
);
283 D3DXMATRIX
* WINAPI
D3DXMatrixPerspectiveLH(D3DXMATRIX
*pout
, FLOAT w
, FLOAT h
, FLOAT zn
, FLOAT zf
);
284 D3DXMATRIX
* WINAPI
D3DXMatrixPerspectiveOffCenterLH(D3DXMATRIX
*pout
, FLOAT l
, FLOAT r
, FLOAT b
, FLOAT t
, FLOAT zn
, FLOAT zf
);
285 D3DXMATRIX
* WINAPI
D3DXMatrixPerspectiveOffCenterRH(D3DXMATRIX
*pout
, FLOAT l
, FLOAT r
, FLOAT b
, FLOAT t
, FLOAT zn
, FLOAT zf
);
286 D3DXMATRIX
* WINAPI
D3DXMatrixPerspectiveRH(D3DXMATRIX
*pout
, FLOAT w
, FLOAT h
, FLOAT zn
, FLOAT zf
);
287 D3DXMATRIX
* WINAPI
D3DXMatrixReflect(D3DXMATRIX
*pout
, CONST D3DXPLANE
*pplane
);
288 D3DXMATRIX
* WINAPI
D3DXMatrixRotationAxis(D3DXMATRIX
*pout
, CONST D3DXVECTOR3
*pv
, FLOAT angle
);
289 D3DXMATRIX
* WINAPI
D3DXMatrixRotationQuaternion(D3DXMATRIX
*pout
, CONST D3DXQUATERNION
*pq
);
290 D3DXMATRIX
* WINAPI
D3DXMatrixRotationX(D3DXMATRIX
*pout
, FLOAT angle
);
291 D3DXMATRIX
* WINAPI
D3DXMatrixRotationY(D3DXMATRIX
*pout
, FLOAT angle
);
292 D3DXMATRIX
* WINAPI
D3DXMatrixRotationYawPitchRoll(D3DXMATRIX
*pout
, FLOAT yaw
, FLOAT pitch
, FLOAT roll
);
293 D3DXMATRIX
* WINAPI
D3DXMatrixRotationZ(D3DXMATRIX
*pout
, FLOAT angle
);
294 D3DXMATRIX
* WINAPI
D3DXMatrixScaling(D3DXMATRIX
*pout
, FLOAT sx
, FLOAT sy
, FLOAT sz
);
295 D3DXMATRIX
* WINAPI
D3DXMatrixShadow(D3DXMATRIX
*pout
, CONST D3DXVECTOR4
*plight
, CONST D3DXPLANE
*pPlane
);
296 D3DXMATRIX
* WINAPI
D3DXMatrixTransformation(D3DXMATRIX
*pout
, CONST D3DXVECTOR3
*pscalingcenter
, CONST D3DXQUATERNION
*pscalingrotation
, CONST D3DXVECTOR3
*pscaling
, CONST D3DXVECTOR3
*protationcenter
, CONST D3DXQUATERNION
*protation
, CONST D3DXVECTOR3
*ptranslation
);
297 D3DXMATRIX
* WINAPI
D3DXMatrixTranslation(D3DXMATRIX
*pout
, FLOAT x
, FLOAT y
, FLOAT z
);
298 D3DXMATRIX
* WINAPI
D3DXMatrixTranspose(D3DXMATRIX
*pout
, CONST D3DXMATRIX
*pm
);
300 D3DXPLANE
* WINAPI
D3DXPlaneFromPointNormal(D3DXPLANE
*pout
, CONST D3DXVECTOR3
*pvpoint
, CONST D3DXVECTOR3
*pvnormal
);
301 D3DXPLANE
* WINAPI
D3DXPlaneFromPoints(D3DXPLANE
*pout
, CONST D3DXVECTOR3
*pv1
, CONST D3DXVECTOR3
*pv2
, CONST D3DXVECTOR3
*pv3
);
302 D3DXVECTOR3
* WINAPI
D3DXPlaneIntersectLine(D3DXVECTOR3
*pout
, CONST D3DXPLANE
*pp
, CONST D3DXVECTOR3
*pv1
, CONST D3DXVECTOR3
*pv2
);
303 D3DXPLANE
* WINAPI
D3DXPlaneNormalize(D3DXPLANE
*pout
, CONST D3DXPLANE
*pp
);
304 D3DXPLANE
* WINAPI
D3DXPlaneTransform(D3DXPLANE
*pout
, CONST D3DXPLANE
*pplane
, CONST D3DXMATRIX
*pm
);
306 D3DXQUATERNION
* WINAPI
D3DXQuaternionBaryCentric(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq1
, CONST D3DXQUATERNION
*pq2
, CONST D3DXQUATERNION
*pq3
, FLOAT f
, FLOAT g
);
307 D3DXQUATERNION
* WINAPI
D3DXQuaternionExp(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq
);
308 D3DXQUATERNION
* WINAPI
D3DXQuaternionInverse(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq
);
309 D3DXQUATERNION
* WINAPI
D3DXQuaternionLn(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq
);
310 D3DXQUATERNION
* WINAPI
D3DXQuaternionMultiply(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq1
, CONST D3DXQUATERNION
*pq2
);
311 D3DXQUATERNION
* WINAPI
D3DXQuaternionNormalize(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq
);
312 D3DXQUATERNION
* WINAPI
D3DXQuaternionRotationAxis(D3DXQUATERNION
*pout
, CONST D3DXVECTOR3
*pv
, FLOAT angle
);
313 D3DXQUATERNION
* WINAPI
D3DXQuaternionRotationMatrix(D3DXQUATERNION
*pout
, CONST D3DXMATRIX
*pm
);
314 D3DXQUATERNION
* WINAPI
D3DXQuaternionRotationYawPitchRoll(D3DXQUATERNION
*pout
, FLOAT yaw
, FLOAT pitch
, FLOAT roll
);
315 D3DXQUATERNION
* WINAPI
D3DXQuaternionSlerp(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq1
, CONST D3DXQUATERNION
*pq2
, FLOAT t
);
316 D3DXQUATERNION
* WINAPI
D3DXQuaternionSquad(D3DXQUATERNION
*pout
, CONST D3DXQUATERNION
*pq1
, CONST D3DXQUATERNION
*pq2
, CONST D3DXQUATERNION
*pq3
, CONST D3DXQUATERNION
*pq4
, FLOAT t
);
317 void WINAPI
D3DXQuaternionToAxisAngle(CONST D3DXQUATERNION
*pq
, D3DXVECTOR3
*paxis
, FLOAT
*pangle
);
319 D3DXVECTOR2
* WINAPI
D3DXVec2BaryCentric(D3DXVECTOR2
*pout
, CONST D3DXVECTOR2
*pv1
, CONST D3DXVECTOR2
*pv2
, CONST D3DXVECTOR2
*pv3
, FLOAT f
, FLOAT g
);
320 D3DXVECTOR2
* WINAPI
D3DXVec2CatmullRom(D3DXVECTOR2
*pout
, CONST D3DXVECTOR2
*pv0
, CONST D3DXVECTOR2
*pv1
, CONST D3DXVECTOR2
*pv2
, CONST D3DXVECTOR2
*pv3
, FLOAT s
);
321 D3DXVECTOR2
* WINAPI
D3DXVec2Hermite(D3DXVECTOR2
*pout
, CONST D3DXVECTOR2
*pv1
, CONST D3DXVECTOR2
*pt1
, CONST D3DXVECTOR2
*pv2
, CONST D3DXVECTOR2
*pt2
, FLOAT s
);
322 D3DXVECTOR2
* WINAPI
D3DXVec2Normalize(D3DXVECTOR2
*pout
, CONST D3DXVECTOR2
*pv
);
323 D3DXVECTOR4
* WINAPI
D3DXVec2Transform(D3DXVECTOR4
*pout
, CONST D3DXVECTOR2
*pv
, CONST D3DXMATRIX
*pm
);
324 D3DXVECTOR2
* WINAPI
D3DXVec2TransformCoord(D3DXVECTOR2
*pout
, CONST D3DXVECTOR2
*pv
, CONST D3DXMATRIX
*pm
);
325 D3DXVECTOR2
* WINAPI
D3DXVec2TransformNormal(D3DXVECTOR2
*pout
, CONST D3DXVECTOR2
*pv
, CONST D3DXMATRIX
*pm
);
327 D3DXVECTOR3
* WINAPI
D3DXVec3BaryCentric(D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv1
, CONST D3DXVECTOR3
*pv2
, CONST D3DXVECTOR3
*pv3
, FLOAT f
, FLOAT g
);
328 D3DXVECTOR3
* WINAPI
D3DXVec3CatmullRom( D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv0
, CONST D3DXVECTOR3
*pv1
, CONST D3DXVECTOR3
*pv2
, CONST D3DXVECTOR3
*pv3
, FLOAT s
);
329 D3DXVECTOR3
* WINAPI
D3DXVec3Hermite(D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv1
, CONST D3DXVECTOR3
*pt1
, CONST D3DXVECTOR3
*pv2
, CONST D3DXVECTOR3
*pt2
, FLOAT s
);
330 D3DXVECTOR3
* WINAPI
D3DXVec3Normalize(D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv
);
331 D3DXVECTOR3
* WINAPI
D3DXVec3Project(D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv
, CONST D3DVIEWPORT9
*pviewport
, CONST D3DXMATRIX
*pprojection
, CONST D3DXMATRIX
*pview
, CONST D3DXMATRIX
*pworld
);
332 D3DXVECTOR4
* WINAPI
D3DXVec3Transform(D3DXVECTOR4
*pout
, CONST D3DXVECTOR3
*pv
, CONST D3DXMATRIX
*pm
);
333 D3DXVECTOR3
* WINAPI
D3DXVec3TransformCoord(D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv
, CONST D3DXMATRIX
*pm
);
334 D3DXVECTOR3
* WINAPI
D3DXVec3TransformNormal(D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv
, CONST D3DXMATRIX
*pm
);
335 D3DXVECTOR3
* WINAPI
D3DXVec3Unproject(D3DXVECTOR3
*pout
, CONST D3DXVECTOR3
*pv
, CONST D3DVIEWPORT9
*pviewport
, CONST D3DXMATRIX
*pprojection
, CONST D3DXMATRIX
*pview
, CONST D3DXMATRIX
*pworld
);
337 D3DXVECTOR4
* WINAPI
D3DXVec4BaryCentric(D3DXVECTOR4
*pout
, CONST D3DXVECTOR4
*pv1
, CONST D3DXVECTOR4
*pv2
, CONST D3DXVECTOR4
*pv3
, FLOAT f
, FLOAT g
);
338 D3DXVECTOR4
* WINAPI
D3DXVec4CatmullRom(D3DXVECTOR4
*pout
, CONST D3DXVECTOR4
*pv0
, CONST D3DXVECTOR4
*pv1
, CONST D3DXVECTOR4
*pv2
, CONST D3DXVECTOR4
*pv3
, FLOAT s
);
339 D3DXVECTOR4
* WINAPI
D3DXVec4Cross(D3DXVECTOR4
*pout
, CONST D3DXVECTOR4
*pv1
, CONST D3DXVECTOR4
*pv2
, CONST D3DXVECTOR4
*pv3
);
340 D3DXVECTOR4
* WINAPI
D3DXVec4Hermite(D3DXVECTOR4
*pout
, CONST D3DXVECTOR4
*pv1
, CONST D3DXVECTOR4
*pt1
, CONST D3DXVECTOR4
*pv2
, CONST D3DXVECTOR4
*pt2
, FLOAT s
);
341 D3DXVECTOR4
* WINAPI
D3DXVec4Normalize(D3DXVECTOR4
*pout
, CONST D3DXVECTOR4
*pv
);
342 D3DXVECTOR4
* WINAPI
D3DXVec4Transform(D3DXVECTOR4
*pout
, CONST D3DXVECTOR4
*pv
, CONST D3DXMATRIX
*pm
);
348 #include <d3dx9math.inl>
350 #endif /* __D3DX9MATH_H__ */