d3dx8: Implement D3DXPlaneDotCoord.
This commit is contained in:
parent
10259cd87c
commit
3247fa0d67
|
@ -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)
|
||||
|
|
|
@ -264,6 +264,12 @@ static inline FLOAT D3DXPlaneDot( CONST D3DXPLANE *pp, CONST D3DXVECTOR4 *pv)
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue