push 9758e6fe7ae8fbab538c98c718d6619029bb3457
[wine/hacks.git] / dlls / d3dx8 / tests / mesh.c
blob8f07b079d8f1abe9b4140f5b463eaccc975eb395
1 /*
2 * Copyright 2008 David Adam
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "d3dx8.h"
21 #include "wine/test.h"
23 static void D3DXBoundProbeTest(void)
25 /*____________Test the Sphere case________________________*/
27 BOOL result;
28 D3DXVECTOR3 center, raydirection, rayposition;
29 FLOAT radius;
31 radius = sqrt(77.0f);
32 center.x = 1.0f; center.y = 2.0f; center.z = 3.0f;
33 raydirection.x = 2.0f; raydirection.y = -4.0f; raydirection.z = 2.0f;
35 rayposition.x = 5.0f; rayposition.y = 5.0f; rayposition.z = 9.0f;
36 result = D3DXSphereBoundProbe(&center, radius, &rayposition, &raydirection);
37 ok(result == TRUE, "expected TRUE, received FALSE\n");
39 rayposition.x = 5.0f; rayposition.y = 7.0f; rayposition.z = 9.0f;
40 result = D3DXSphereBoundProbe(&center, radius, &rayposition, &raydirection);
41 ok(result == FALSE, "expected FALSE, received TRUE\n");
43 rayposition.x = 5.0f; rayposition.y = 11.0f; rayposition.z = 9.0f;
44 result = D3DXSphereBoundProbe(&center, radius, &rayposition, &raydirection);
45 ok(result == FALSE, "expected FALSE, received TRUE\n");
48 START_TEST(mesh)
50 D3DXBoundProbeTest();