correct some errors

This commit is contained in:
Guillaume Damiand 2022-10-07 20:45:01 +02:00
parent 455c1d3b75
commit 9033e598ca
2 changed files with 22 additions and 15 deletions

View File

@ -8,7 +8,7 @@
#include <CGAL/draw_linear_cell_complex.h> #include <CGAL/draw_linear_cell_complex.h>
template<typename ALCC> template<typename ALCC>
struct Facewidth_draw_functor : public CGAL::DefaultDrawingFunctorLCC struct Facewidth_draw_functor //: public CGAL::DefaultDrawingFunctorLCC
{ {
Facewidth_draw_functor(typename ALCC::size_type amark1, typename ALCC::size_type amark2) : Facewidth_draw_functor(typename ALCC::size_type amark1, typename ALCC::size_type amark2) :
m_vertex_mark(amark1), m_face_mark(amark2) m_vertex_mark(amark1), m_face_mark(amark2)

View File

@ -32,15 +32,13 @@
namespace CGAL { namespace CGAL {
namespace draw_function_for_face_graph_with_paths
namespace draw_function_for_lcc
{ {
// We need to re-use the namespace draw_function_for_lcc because we want to specialize
typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel; // the previous struct LCC_geom_utils
typedef Local_kernel::Point_3 Local_point; // template <class LCC, class Local_kernel, int dim = LCC::ambient_dimension>
typedef Local_kernel::Vector_3 Local_vector; // struct LCC_geom_utils;
template <class LCC, class Local_kernel, int dim = LCC::ambient_dimension>
struct LCC_geom_utils;
// Specialisation for face graph; otherwise use the LCC_geom_utils of LCC. // Specialisation for face graph; otherwise use the LCC_geom_utils of LCC.
template<class Mesh, class Local_kernel> template<class Mesh, class Local_kernel>
@ -88,17 +86,26 @@ struct LCC_geom_utils<CGAL::Face_graph_wrapper<Mesh>, Local_kernel, 3>
++nb; ++nb;
} }
if ( nb<2 ) return internal::Geom_utils if ( nb<2 ) return draw_function_for_lcc::LCC_geom_utils
<typename Get_traits<Mesh>::Kernel, Local_kernel>:: <typename Get_traits<Mesh>::Kernel, Local_kernel>::
get_local_vector(normal); get_local_vector(normal);
return internal::Geom_utils return draw_function_for_lcc::LCC_geom_utils
<typename Get_traits<Mesh>::Kernel, Local_kernel>:: <typename Get_traits<Mesh>::Kernel, Local_kernel>::
get_local_vector(typename Get_traits<Mesh>::Kernel:: get_local_vector(typename Get_traits<Mesh>::Kernel::
Construct_scaled_vector_3()(normal, 1.0/nb)); Construct_scaled_vector_3()(normal, 1.0/nb));
} }
}; };
} // namespace draw_function_for_lcc
namespace draw_function_for_face_graph_with_paths
{
typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel;
typedef Local_kernel::Point_3 Local_point;
typedef Local_kernel::Vector_3 Local_vector;
// Destructor. // Destructor.
// lcc.free_mark(m_oriented_mark); // lcc.free_mark(m_oriented_mark);
@ -148,7 +155,7 @@ void compute_face(typename Get_map<Mesh, Mesh>::type::Dart_const_handle dh,
do do
{ {
graphic_buffer.add_point_in_face(draw_function_for_face_graph_with_paths::get_point(cur, mesh), graphic_buffer.add_point_in_face(draw_function_for_face_graph_with_paths::get_point(cur, mesh),
LCC_geom_utils<LCC, Local_kernel>:: draw_function_for_lcc::LCC_geom_utils<LCC, Local_kernel>::
get_vertex_normal(lcc, cur)); get_vertex_normal(lcc, cur));
cur=lcc.next(cur); cur=lcc.next(cur);
} }
@ -365,9 +372,9 @@ void add_in_graphic_buffer(const Mesh &mesh,
// Default functor; user can add his own functor. // Default functor; user can add his own functor.
Drawing_functor<Mesh, Drawing_functor<Mesh,
typename Mesh::Dart_const_handle /*vh*/, typename CGAL::Face_graph_wrapper<Mesh>::Dart_const_handle /*vh*/,
typename Mesh::Dart_const_handle /*eh*/, typename CGAL::Face_graph_wrapper<Mesh>::Dart_const_handle /*eh*/,
typename Mesh::Dart_const_handle /*fh*/> typename CGAL::Face_graph_wrapper<Mesh>::Dart_const_handle /*fh*/>
drawing_functor; drawing_functor;
add_in_graphic_buffer(mesh, graphic_buffer, drawing_functor, lcc, m_paths, amark, m_nofaces); add_in_graphic_buffer(mesh, graphic_buffer, drawing_functor, lcc, m_paths, amark, m_nofaces);