Commit 3247fa0d authored by David Adam's avatar David Adam Committed by Alexandre Julliard

d3dx8: Implement D3DXPlaneDotCoord.

parent 10259cd8
......@@ -49,6 +49,17 @@ static void D3DXPlaneTest(void)
expected = 0.0f;
got = D3DXPlaneDot(NULL,NULL),
ok( expected == got, "Expected : %f, Got : %f\n",expected, got);
/*_______________D3DXPlaneDotCoord________________*/
expected = -28.0f;
got = D3DXPlaneDotCoord(&plane,&vec),
ok( expected == got, "Expected : %f, Got : %f\n",expected, got);
expected = 0.0f;
got = D3DXPlaneDotCoord(NULL,&vec),
ok( expected == got, "Expected : %f, Got : %f\n",expected, got);
expected = 0.0f;
got = D3DXPlaneDotCoord(NULL,NULL),
ok( expected == got, "Expected : %f, Got : %f\n",expected, got);
}
static void D3X8QuaternionTest(void)
......
......@@ -258,12 +258,18 @@ static inline D3DXVECTOR4* D3DXVec4Subtract(D3DXVECTOR4 *pout, CONST D3DXVECTOR4
/*__________________D3DXQUATERNION____________________*/
static inline FLOAT D3DXPlaneDot( CONST D3DXPLANE *pp, CONST D3DXVECTOR4 *pv)
static inline FLOAT D3DXPlaneDot(CONST D3DXPLANE *pp, CONST D3DXVECTOR4 *pv)
{
if ( !pp || !pv ) return 0.0f;
return ( (pp->a) * (pv->x) + (pp->b) * (pv->y) + (pp->c) * (pv->z) + (pp->d) * (pv->w) );
}
static inline FLOAT D3DXPlaneDotCoord(CONST D3DXPLANE *pp, CONST D3DXVECTOR4 *pv)
{
if ( !pp || !pv ) return 0.0f;
return ( (pp->a) * (pv->x) + (pp->b) * (pv->y) + (pp->c) * (pv->z) + (pp->d) );
}
/*__________________D3DXQUATERNION____________________*/
static inline D3DXQUATERNION* D3DXQuaternionConjugate(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment