mirror of https://github.com/CGAL/cgal
Use boost::lambda::constant() - thank you Philipp
This commit is contained in:
parent
6b8421a048
commit
b56c436ee6
|
|
@ -59,7 +59,7 @@ int main(int argc, char* argv[])
|
|||
Vector v = CGAL::Polygon_mesh_processing::compute_face_normal(fd,mesh);
|
||||
|
||||
Ray ray(p,d * v);
|
||||
Ray_intersection intersection = tree.first_intersection(ray, Skip(fd));
|
||||
Ray_intersection intersection = tree.first_intersection(ray);
|
||||
if(intersection){
|
||||
if(boost::get<Point>(&(intersection->first))){
|
||||
const Point* p = boost::get<Point>(&(intersection->first) );
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include <CGAL/internal/AABB_tree/Has_nested_type_Shared_data.h>
|
||||
#include <CGAL/internal/AABB_tree/Primitive_helper.h>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
|
||||
#ifdef CGAL_HAS_THREADS
|
||||
#include <CGAL/mutex.h>
|
||||
|
|
@ -395,11 +396,6 @@ public:
|
|||
any_intersection(const Query& query) const;
|
||||
|
||||
|
||||
struct False_functor {
|
||||
template <typename T>
|
||||
bool operator()(const T&) const
|
||||
{ return false;}
|
||||
};
|
||||
|
||||
/// Returns the intersection and primitive id closest to the source point of the ray
|
||||
/// query.
|
||||
|
|
@ -421,7 +417,7 @@ public:
|
|||
boost::optional< typename Intersection_and_primitive_id<Ray>::Type >
|
||||
first_intersection(const Ray& query) const
|
||||
{
|
||||
return first_intersection(query, False_functor());
|
||||
return first_intersection(query, boost::lambda::constant(false));
|
||||
}
|
||||
|
||||
/// Returns the primitive id closest to the source point of the ray
|
||||
|
|
@ -444,7 +440,7 @@ public:
|
|||
boost::optional<Primitive_id>
|
||||
first_intersected_primitive(const Ray& query) const
|
||||
{
|
||||
return first_intersected_primitive(query, False_functor());
|
||||
return first_intersected_primitive(query, boost::lambda::constant(false));
|
||||
}
|
||||
///@}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue