diff --git a/Generator/include/CGAL/internal/Generic_random_point_generator.h b/Generator/include/CGAL/internal/Generic_random_point_generator.h index 5bf29cd15d9..fb16bde5dc1 100644 --- a/Generator/include/CGAL/internal/Generic_random_point_generator.h +++ b/Generator/include/CGAL/internal/Generic_random_point_generator.h @@ -84,6 +84,12 @@ public: ++(*this); return tmp; } + double sum_of_weights() const + { + if (weights.empty()) + return 0; + return weights.back(); + } }; template < typename Id, class ObjectFromIdMap, class GeneratorOnObject, class P > diff --git a/Generator/include/CGAL/point_generators_3.h b/Generator/include/CGAL/point_generators_3.h index bf5b523dd4b..586f3a6b46b 100644 --- a/Generator/include/CGAL/point_generators_3.h +++ b/Generator/include/CGAL/point_generators_3.h @@ -347,6 +347,10 @@ public: ++(*this); return tmp; } + double mesh_area() const + { + this->sum_of_weights(); + } }; namespace internal