made convexity test work for the case when the polyhedron is a single triangular

face
This commit is contained in:
Susan Hert 2001-11-26 17:16:46 +00:00
parent 261a48460f
commit 40dc4a43cf
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2.31 (26 Nov 2001)
- made convexity test work for the case when the polyhedron is a single
triangular face
2.30 (26 Nov 2001)
- fixed convexity testing so a tetrahedron now correctly passes the test

View File

@ -51,6 +51,23 @@ void test_tetrahedron_convexity()
assert( CGAL::is_strongly_convex_3(P) );
}
void test_triangle_convexity()
{
Polyhedron_3 P;
P.make_triangle( Point_3(1,0,0),
Point_3(-1,1,0),
Point_3(0,0,1));
for( Polyhedron_3::Facet_iterator f = P.facets_begin();
f != P.facets_end(); ++f )
{
CGAL::compute_plane_equation(f);
}
assert( CGAL::is_strongly_convex_3(P) );
}
void test_small_hull()
{
std::vector<Point_3> points;
@ -76,8 +93,13 @@ void test_small_hull()
int main()
{
std::cerr << "Testing triangle" << std::endl;
test_triangle_convexity();
std::cerr << "Testing tetrahedron" << std::endl;
test_tetrahedron_convexity();
std::cerr << "Testing small hull" << std::endl;
test_small_hull();
std::vector<Point_3> points;
Generator g(500);
CGAL::copy_n( g, num, std::back_inserter(points));