diff --git a/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.h b/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.h index d9d548db927..fba2eb7602c 100644 --- a/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.h +++ b/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.h @@ -46,7 +46,7 @@ typedef Poisson_dt3 Dt3; typedef CGAL::Poisson_implicit_function Poisson_implicit_function; // APSS implicit function -typedef CGAL::APSS_implicit_function APSS_implicit_function; +typedef CGAL::APSS_implicit_function APSS_implicit_function; // Surface mesh generator typedef CGAL::Surface_mesh_vertex_base_3 SVb; diff --git a/Surface_reconstruction_3/examples/Surface_reconstruction_3/APSS_reconstruction.cpp b/Surface_reconstruction_3/examples/Surface_reconstruction_3/APSS_reconstruction.cpp index 7a56c2bb86a..1745a84c2fd 100644 --- a/Surface_reconstruction_3/examples/Surface_reconstruction_3/APSS_reconstruction.cpp +++ b/Surface_reconstruction_3/examples/Surface_reconstruction_3/APSS_reconstruction.cpp @@ -55,7 +55,7 @@ typedef Kernel::Sphere_3 Sphere; typedef std::vector PointList; // APSS implicit function -typedef CGAL::APSS_implicit_function APSS_implicit_function; +typedef CGAL::APSS_implicit_function APSS_implicit_function; // Surface mesher typedef CGAL::Surface_mesh_default_triangulation_3 STr; diff --git a/Surface_reconstruction_3/include/CGAL/APSS_implicit_function.h b/Surface_reconstruction_3/include/CGAL/APSS_implicit_function.h index 49657dde313..6512b3a0cce 100644 --- a/Surface_reconstruction_3/include/CGAL/APSS_implicit_function.h +++ b/Surface_reconstruction_3/include/CGAL/APSS_implicit_function.h @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -49,9 +50,8 @@ CGAL_BEGIN_NAMESPACE /// /// @heading Parameters: /// @param Gt Geometric traits class. -/// @param PointWithNormal_3 Model of PointWithNormal_3 concept. -template +template class APSS_implicit_function { // Public types @@ -64,27 +64,28 @@ public: typedef typename Geom_traits::Iso_cuboid_3 Iso_cuboid; typedef typename Geom_traits::Sphere_3 Sphere; - typedef PointWithNormal_3 Point_with_normal; ///< Model of PointWithNormal_3 concept. - typedef typename Point_with_normal::Normal Normal; ///< Model of Kernel::Vector_3 concept. + typedef Point_with_normal_3 Point_with_normal; // Point_with_normal_3 is the most compact representation + typedef typename Point_with_normal::Normal Normal; // == Vector_3 typedef typename Geom_traits::Vector_3 Vector; // Private types private: // Item in the Kd-tree: position (Point_3) + normal + index - class KdTreeElement : public PointWithNormal_3 + class KdTreeElement : public Point_with_normal { public: unsigned int index; KdTreeElement(const Origin& o = ORIGIN, unsigned int id=0) - : PointWithNormal_3(o), index(id) + : Point_with_normal(o), index(id) {} - KdTreeElement(const PointWithNormal_3& pwn, unsigned int id=0) - : PointWithNormal_3(pwn), index(id) + template + KdTreeElement(const Point_with_normal_3& pwn, unsigned int id=0) + : Point_with_normal(pwn), index(id) {} KdTreeElement(const Point& p, unsigned int id=0) - : PointWithNormal_3(p), index(id) + : Point_with_normal(p), index(id) {} }; @@ -106,7 +107,7 @@ public: /// Create an APSS implicit function from a point set. /// - /// Precondition: the value type of InputIterator must be convertible to Point_with_normal. + /// Precondition: the value type of InputIterator must be convertible to Point_with_normal_3. /// /// @param first First point of point set. /// @param beyond Past-the-end point of point set. diff --git a/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp b/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp index 4a285ac5ea2..80672d643a6 100644 --- a/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp +++ b/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp @@ -54,7 +54,7 @@ typedef Kernel::Sphere_3 Sphere; typedef std::vector PointList; // APSS implicit function -typedef CGAL::APSS_implicit_function APSS_implicit_function; +typedef CGAL::APSS_implicit_function APSS_implicit_function; // Surface mesher typedef CGAL::Surface_mesh_default_triangulation_3 STr;