Test the simple wedge.

This commit is contained in:
Bill Currie 2011-11-28 17:03:56 +09:00
parent 2c9b07b257
commit 45d55d7e9a

View file

@ -15,7 +15,7 @@
# include "../trace.c"
#endif
#define FloatCompare(a, b) (fabs (a - b) < 1e-6)
#define FloatCompare(a, b) (fabs (a - b) < 1e-5)
#undef VectorCompare
#define VectorCompare(x, y) \
(FloatCompare (x[0], y[0]) && FloatCompare (x[1], y[1]) \
@ -366,6 +366,15 @@ test_t tests[] = {
{-16, 0, 8}, {16, 0, 8}, { 1, 0, 0, 1, 0, 4}},
{"Box, Ramp", &box, &hull_ramp,
{-16, 0, 5}, {16, 0, 5}, { 0.125, 0, 0, 1, 0, 4}},
{"Box, Simple Wedge", &box, &hull_simple_wedge,
{ 0, 0, 16}, {0, 0, 0}, { 0.5, 0, 0, 1, 0, 3}},
{"Box, Simple Wedge", &box, &hull_simple_wedge,
{-16, 0, 8}, {16, 0, 8}, { 1, 0, 0, 1, 0, 3}},
{"Box, Simple Wedge", &box, &hull_simple_wedge,
{-16, 0, 5}, {16, 0, 5}, { 0.25, 0, 0, 1, 0, 3}},
{"Box, Simple Wedge", &box, &hull_simple_wedge,
{-16, 0, 12}, {16, 0, 4}, { 0.5, 0, 0, 1, 0, 3}},
};
#define num_tests (sizeof (tests) / sizeof (tests[0]))