From 63fb2988356996136f6c27e43801a844535ab1e4 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Tue, 5 Oct 2010 11:01:32 +0200 Subject: [PATCH] got rid of triangle testcase --- src/tests/test_tri.cpp | 57 ------------------------------------------ 1 file changed, 57 deletions(-) delete mode 100644 src/tests/test_tri.cpp diff --git a/src/tests/test_tri.cpp b/src/tests/test_tri.cpp deleted file mode 100644 index 5db458d9..00000000 --- a/src/tests/test_tri.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - This file is part of Mitsuba, a physically based rendering system. - - Copyright (c) 2007-2010 by Wenzel Jakob and others. - - Mitsuba is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License Version 3 - as published by the Free Software Foundation. - - Mitsuba is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include - -MTS_NAMESPACE_BEGIN - -class TestTriangle : public TestCase { -public: - MTS_BEGIN_TESTCASE() - MTS_DECLARE_TEST(test01_sutherlandHodgman) - MTS_END_TESTCASE() - - void test01_sutherlandHodgman() { - /* Test the triangle clipping algorithm */ - Vertex vertices[3]; - vertices[0].p = Point(0, 0, 0); - vertices[1].p = Point(1, 0, 0); - vertices[2].p = Point(1, 1, 0); - - AABB clipAABB( - Point(0, .5, -1), - Point(1, 1, 1) - ); - - AABB expectedResult( - Point(.5, .5, 0), - Point(1, 1, 0) - ); - - Triangle t; - t.idx[0] = 0; t.idx[1] = 1; t.idx[2] = 2; - - AABB clippedAABB = t.getClippedAABB(vertices, clipAABB); - - assertEquals(clippedAABB.min, expectedResult.min); - assertEquals(clippedAABB.max, expectedResult.max); - } -}; - -MTS_EXPORT_TESTCASE(TestTriangle, "Testcase for Triangle-related code") -MTS_NAMESPACE_END