mirror of https://github.com/CGAL/cgal
replace CGAL::Random& by mutable CGAL::Random for member variable type
and make use of const everywhere else
This commit is contained in:
parent
1916ecf872
commit
1c1b65ae39
|
|
@ -67,7 +67,7 @@ public:
|
|||
*/
|
||||
Implicit_mesh_domain_3(const Function& f,
|
||||
const Sphere_3& bounding_sphere,
|
||||
CGAL::Random& rng = CGAL::Random(0),
|
||||
const CGAL::Random& rng = CGAL::Random(0),
|
||||
const FT& error_bound = FT(1e-3))
|
||||
: Base(Wrapper(f), bounding_sphere, rng, error_bound) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
/// Constructor
|
||||
Labeled_image_mesh_domain_3(const Image& image,
|
||||
CGAL::Random& rng = CGAL::Random(0),
|
||||
const CGAL::Random& rng = CGAL::Random(0),
|
||||
const FT& error_bound = FT(1e-3))
|
||||
: Base(Wrapper(image),
|
||||
compute_bounding_box(image),
|
||||
|
|
|
|||
|
|
@ -96,12 +96,12 @@ public:
|
|||
*/
|
||||
Labeled_mesh_domain_3(const Function& f,
|
||||
const Sphere_3& bounding_sphere,
|
||||
CGAL::Random& rng = CGAL::Random(0),
|
||||
const CGAL::Random& rng = CGAL::Random(0),
|
||||
const FT& error_bound = FT(1e-3));
|
||||
|
||||
Labeled_mesh_domain_3(const Function& f,
|
||||
const Bbox_3& bbox,
|
||||
CGAL::Random& rng = CGAL::Random(0),
|
||||
const CGAL::Random& rng = CGAL::Random(0),
|
||||
const FT& error_bound = FT(1e-3));
|
||||
|
||||
/// Destructor
|
||||
|
|
@ -466,7 +466,7 @@ private:
|
|||
/// The bounding box
|
||||
const Iso_cuboid_3 bbox_;
|
||||
/// The random number generator used by Construct_initial_points
|
||||
CGAL::Random& rng_;
|
||||
mutable CGAL::Random rng_;
|
||||
/// Error bound relative to sphere radius
|
||||
FT squared_error_bound_;
|
||||
|
||||
|
|
@ -489,7 +489,7 @@ template<class F, class BGT>
|
|||
Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
|
||||
const F& f,
|
||||
const Sphere_3& bounding_sphere,
|
||||
CGAL::Random& rng,
|
||||
const CGAL::Random& rng,
|
||||
const FT& error_bound )
|
||||
: function_(f)
|
||||
, bbox_(iso_cuboid(bounding_sphere.bbox()))
|
||||
|
|
@ -503,7 +503,7 @@ template<class F, class BGT>
|
|||
Labeled_mesh_domain_3<F,BGT>::Labeled_mesh_domain_3(
|
||||
const F& f,
|
||||
const Bbox_3& bbox,
|
||||
CGAL::Random& rng,
|
||||
const CGAL::Random& rng,
|
||||
const FT& error_bound )
|
||||
: function_(f)
|
||||
, bbox_(iso_cuboid(bbox))
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ public:
|
|||
* @param polyhedron the polyhedron describing the polyhedral surface
|
||||
*/
|
||||
Polyhedral_mesh_domain_3(const Polyhedron& p,
|
||||
CGAL::Random& rng = CGAL::Random(0))
|
||||
const CGAL::Random& rng = CGAL::Random(0))
|
||||
: tree_(TriangleAccessor().triangles_begin(p),
|
||||
TriangleAccessor().triangles_end(p)),
|
||||
bounding_tree_(&tree_) // the bounding tree is tree_
|
||||
|
|
@ -230,7 +230,7 @@ public:
|
|||
|
||||
Polyhedral_mesh_domain_3(const Polyhedron& p,
|
||||
const Polyhedron& bounding_polyhedron,
|
||||
CGAL::Random& rng = CGAL::Random(0))
|
||||
const CGAL::Random& rng = CGAL::Random(0))
|
||||
: tree_(TriangleAccessor().triangles_begin(p),
|
||||
TriangleAccessor().triangles_end(p))
|
||||
, bounding_tree_(new AABB_tree_(TriangleAccessor().triangles_begin(bounding_polyhedron),
|
||||
|
|
@ -259,7 +259,7 @@ public:
|
|||
Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin,
|
||||
InputPolyhedraPtrIterator end,
|
||||
const Polyhedron& bounding_polyhedron,
|
||||
CGAL::Random& rng = CGAL::Random(0))
|
||||
const CGAL::Random& rng = CGAL::Random(0))
|
||||
: has_cache(false)
|
||||
, rng_(rng)
|
||||
{
|
||||
|
|
@ -296,7 +296,7 @@ public:
|
|||
template <typename InputPolyhedraPtrIterator>
|
||||
Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin,
|
||||
InputPolyhedraPtrIterator end,
|
||||
CGAL::Random& rng = CGAL::Random(0))
|
||||
const CGAL::Random& rng = CGAL::Random(0))
|
||||
: has_cache(false)
|
||||
, rng_(rng)
|
||||
{
|
||||
|
|
@ -609,7 +609,7 @@ private:
|
|||
mutable AABB_primitive_id cached_primitive_id;
|
||||
|
||||
//random number generator for Construct_initial_points
|
||||
CGAL::Random& rng_;
|
||||
mutable CGAL::Random rng_;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -627,7 +627,7 @@ public:
|
|||
return has_cache && (cached_query == Cached_query(q));
|
||||
}
|
||||
|
||||
void set_random_generator(CGAL::Random& rng)
|
||||
void set_random_generator(const CGAL::Random& rng)
|
||||
{
|
||||
rng_ = rng;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,13 +95,10 @@ public:
|
|||
|
||||
/// Constructors
|
||||
Polyhedral_mesh_domain_with_features_3(const Polyhedron& p,
|
||||
CGAL::Random& rng = CGAL::Random(0));
|
||||
const CGAL::Random& rng = CGAL::Random(0));
|
||||
Polyhedral_mesh_domain_with_features_3(const std::string& filename,
|
||||
CGAL::Random& rng = CGAL::Random(0));
|
||||
const CGAL::Random& rng = CGAL::Random(0));
|
||||
|
||||
template <typename T1, typename T2>
|
||||
Polyhedral_mesh_domain_with_features_3(const T1& a, const T2& b)
|
||||
: Base(a, b) {}
|
||||
|
||||
template <typename T1, typename T2, typename T3>
|
||||
Polyhedral_mesh_domain_with_features_3(const T1& a, const T2& b, const T3& c)
|
||||
|
|
@ -132,7 +129,7 @@ template < typename GT_, typename P_, typename TA_,
|
|||
typename Tag_, typename E_tag_>
|
||||
Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
|
||||
Polyhedral_mesh_domain_with_features_3(const Polyhedron& p,
|
||||
CGAL::Random& rng)
|
||||
const CGAL::Random& rng)
|
||||
: Base()
|
||||
, polyhedron_(p)
|
||||
{
|
||||
|
|
@ -144,7 +141,7 @@ template < typename GT_, typename P_, typename TA_,
|
|||
typename Tag_, typename E_tag_>
|
||||
Polyhedral_mesh_domain_with_features_3<GT_,P_,TA_,Tag_,E_tag_>::
|
||||
Polyhedral_mesh_domain_with_features_3(const std::string& filename,
|
||||
CGAL::Random& rng)
|
||||
const CGAL::Random& rng)
|
||||
: Base()
|
||||
, polyhedron_()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue