[PATCH] Implement D3DXMatrixIdentity

David Adam David.Adam at math.cnrs.fr
Tue Oct 23 06:28:52 CDT 2007


---
 include/d3dx8math.inl |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/include/d3dx8math.inl b/include/d3dx8math.inl
index d9f0b3d..59d0012 100644
--- a/include/d3dx8math.inl
+++ b/include/d3dx8math.inl
@@ -318,7 +318,32 @@ static inline D3DXVECTOR4* D3DXVec4Subtract(D3DXVECTOR4=
 *pout, CONST D3DXVECTOR4
     return pout;
 }
=20
-/*__________________D3DXQUATERNION____________________*/
+/*__________________D3DXMatrix____________________*/
+
+static inline D3DXMATRIX* D3DXMatrixIdentity(D3DXMATRIX *pout )
+{
+    if ( !pout ) return NULL;
+    pout->m[0][1] =3D 0.0f;
+    pout->m[0][2] =3D 0.0f;
+    pout->m[0][3] =3D 0.0f;
+    pout->m[1][0] =3D 0.0f;
+    pout->m[1][2] =3D 0.0f;
+    pout->m[1][3] =3D 0.0f;
+    pout->m[2][0] =3D 0.0f;
+    pout->m[2][1] =3D 0.0f;
+    pout->m[2][3] =3D 0.0f;
+    pout->m[3][0] =3D 0.0f;
+    pout->m[3][1] =3D 0.0f;
+    pout->m[3][2] =3D 0.0f;
+    pout->m[0][0] =3D 1.0f;
+    pout->m[1][1] =3D 1.0f;
+    pout->m[2][2] =3D 1.0f;
+    pout->m[3][3] =3D 1.0f;
+    return pout;
+}
+
+
+/*__________________D3DXPLANE____________________*/
=20
 static inline FLOAT D3DXPlaneDot(CONST D3DXPLANE *pp, CONST D3DXVECTOR4 *pv=
)
 {
--=20
1.5.3.2


--=_u60o3g81bxw--



More information about the wine-patches mailing list