Skip to content

Commit

Permalink
repair the poisson reconstruction plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lrineau committed Jun 5, 2024
1 parent 9f0cda6 commit 6547f64
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright (c) 2006-2007, 2024 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Laurent Rineau, Jane Tournois

#ifndef CGAL_MESH_3_POISSON_MESH_TRAITS_GENERATOR_3_H
#define CGAL_MESH_3_POISSON_MESH_TRAITS_GENERATOR_3_H

#include <CGAL/license/Poisson_surface_reconstruction_3.h>


#include <CGAL/Surface_mesher/Poisson_sphere_oracle_3.h>

namespace CGAL {

template <class K>
class Sphere_3;

/** Default traits class.
* Partial specialization will be in other headers
*/
template <typename Surface>
struct Poisson_mesh_traits_generator_3
{
typedef typename Surface::Surface_mesher_traits_3 Type;
typedef Type type; // for Boost compatibility (meta-programming)
};

// specialization for Kernel::Sphere_3
template <typename Kernel>
struct Poisson_mesh_traits_generator_3<CGAL::Sphere_3<Kernel> >
{
typedef Surface_mesher::Poisson_sphere_oracle_3<Kernel> Type;
typedef Type type; // for Boost compatibility (meta-programming)
};

} // end namespace CGAL

#endif // CGAL_MESH_3_POISSON_MESH_TRAITS_GENERATOR_3_H
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
#include <CGAL/license/Poisson_surface_reconstruction_3.h>


#include <CGAL/Surface_mesher/Null_oracle_visitor.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/Surface_mesher/Sphere_oracle_3.h>
#include <CGAL/Surface_mesher/Poisson_sphere_oracle_3.h>
#include <CGAL/Surface_mesher/Implicit_surface_oracle_3.h>
#include <CGAL/Real_embeddable_traits.h>
#include <CGAL/squared_distance_3.h>
Expand Down Expand Up @@ -56,7 +55,7 @@ namespace CGAL {
Return_min<typename Transform_functor_::result_type>,
class Point_creator = Creator_uniform_3<typename GT::FT,
typename GT::Point_3>,
class Visitor = Null_oracle_visitor
class Visitor = Poisson_null_oracle_visitor
>
class Poisson_implicit_surface_oracle_3
{
Expand All @@ -68,7 +67,7 @@ namespace CGAL {
Point_creator,
Visitor> Self;

typedef Sphere_oracle_3<GT, Point_creator> Sphere_oracle;
typedef Poisson_sphere_oracle_3<GT, Point_creator> Sphere_oracle;

typedef typename GT::Point_3 Point;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <CGAL/Mesh_3/Poisson_refine_cells_3.h>
#include <CGAL/Poisson_mesh_cell_criteria_3.h>
#include <CGAL/assertions.h>
#include <CGAL/Surface_mesh_traits_generator_3.h>
#include <CGAL/Mesh_3/Poisson_mesh_traits_generator_3.h>

namespace CGAL {

Expand Down Expand Up @@ -142,7 +142,7 @@ class Poisson_mesher_level_impl_base :
template <typename Tr,
typename Criteria,
typename Surface,
typename Oracle = typename CGAL::Surface_mesh_traits_generator_3<Surface>::type,
typename Oracle = typename CGAL::Poisson_mesh_traits_generator_3<Surface>::type,
typename PreviousLevel = Null_mesher_level
>
class Poisson_mesher_level :
Expand Down Expand Up @@ -220,7 +220,7 @@ unsigned int poisson_refine_triangulation(
, Sizing_field
, Second_sizing_field
> Tets_criteria;
typedef typename CGAL::Surface_mesh_traits_generator_3<Surface>::type Oracle;
typedef typename CGAL::Poisson_mesh_traits_generator_3<Surface>::type Oracle;
typedef Poisson_mesher_level<Tr, Tets_criteria, Surface, Oracle, Null_mesher_level> Refiner;


Expand Down

0 comments on commit 6547f64

Please sign in to comment.