removed all warnings (-Wall -Wextra).

IMPORTANT THINGS

- We need to add Compute_squared_distance_3 (at least for Point_3, Point_3) to the traits requirements

- Since we use the (decorated) Traits as a template parameter for the Search_traits_3, we need to add
this as a requirement. Currently, the Search_traits_3 requests that the template parameter be a CGAL
kernel. This is much too strong!
This commit is contained in:
Camille Wormser 2009-05-10 16:05:48 +00:00
parent 0f376fb294
commit 74beff3b13
11 changed files with 12 additions and 11 deletions

View File

@ -34,7 +34,7 @@ namespace CGALi {
template <class K>
bool do_intersect(const CGAL::Bbox_3& c1,
const CGAL::Bbox_3& c2,
const K& kernel)
const K&)
{
for(int i = 0; i < 3; ++i)
if(c1.max(i) < c2.min(i) || c1.min(i) > c2.max(i))

View File

@ -33,7 +33,7 @@ namespace CGALi {
template <class K>
bool do_intersect(const typename K::Line_3& line,
const CGAL::Bbox_3& bbox,
const K& kernel)
const K&)
{
typedef typename K::FT FT;
typedef typename K::Point_3 Point;

View File

@ -31,7 +31,7 @@ namespace CGALi {
template <class K>
bool do_intersect(const typename K::Ray_3& ray,
const CGAL::Bbox_3& bbox,
const K& kernel)
const K&)
{
typedef typename K::FT FT;
typedef typename K::Point_3 Point;

View File

@ -33,7 +33,7 @@ namespace CGALi {
template <class K>
bool do_intersect(const typename K::Segment_3& segment,
const CGAL::Bbox_3& bbox,
const K& kernel)
const K&)
{
typedef typename K::FT FT;
typedef typename K::Point_3 Point;

View File

@ -172,7 +172,7 @@ namespace CGALi {
template <class K>
bool do_intersect(const typename K::Triangle_3& triangle,
const CGAL::Bbox_3& bbox,
const K& kernel)
const K&)
{
if(! do_bbox_intersect<K>(triangle, bbox))
return false;

View File

@ -35,7 +35,7 @@ template <class K>
Object
intersection(const typename K::Triangle_3 &t,
const typename K::Line_3 &l,
const K& k)
const K&)
{
return CGAL::intersection(t.supporting_plane(),
l);

View File

@ -29,7 +29,7 @@ template <class K>
Object
intersection(const typename K::Triangle_3 &t,
const typename K::Ray_3 &r,
const K& k)
const K&)
{
// TOFIX: here we assume that we have already tested
// do_intersection between the triangle and the ray

View File

@ -29,7 +29,7 @@ template <class K>
Object
intersection(const typename K::Triangle_3 &t,
const typename K::Segment_3 &s,
const K& k)
const K&)
{
// TOFIX: here we assume that we have already tested
// do_intersection between the triangle and the segment

View File

@ -70,6 +70,7 @@ public:
typedef typename GeomTraits::Construct_min_vertex_3 Construct_min_vertex_3;
typedef typename GeomTraits::Construct_max_vertex_3 Construct_max_vertex_3;
typedef typename GeomTraits::Compute_squared_radius_3 Compute_squared_radius_3;
typedef typename GeomTraits::Compute_squared_distance_3 Compute_squared_distance_3;
typedef typename GeomTraits::Cartesian_const_iterator_3 Cartesian_const_iterator_3;
typedef typename GeomTraits::Construct_cartesian_const_iterator_3
Construct_cartesian_const_iterator_3;

View File

@ -592,7 +592,7 @@ namespace CGAL {
const Point& hint) const
{
const Point closest = this->closest_point(query, hint);
return CGAL::squared_distance(query, closest);
return typename Tr::Compute_squared_distance_3()(query, closest);
}
// squared distance without user-specified hint
@ -601,7 +601,7 @@ namespace CGAL {
AABB_tree<Tr>::squared_distance(const Point& query) const
{
const Point closest = this->closest_point(query);
return CGAL::squared_distance(query, closest);
return typename Tr::Compute_squared_distance_3()(query, closest);
}
// closest point with user-specified hint

View File

@ -71,7 +71,7 @@ void test_kernels(const char *filename)
std::cout << std::endl;
std::cout << "Simple cartesian float kernel" << std::endl;
test<CGAL::Simple_cartesian<float> >(filename);
// test<CGAL::Simple_cartesian<float> >(filename);
std::cout << std::endl;
std::cout << "Cartesian float kernel" << std::endl;