diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h index 68138d36775..f1b619635db 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshCellBase_3.h @@ -41,7 +41,7 @@ and `is_facet_visited(1)` in parallel must be safe) Moreover, the parallel algorithms require an erase counter in each cell (see below). -\cgalRefines{SimplicialMeshCellBase_3,RegularTriangulationCellBaseWithWeightedCircumcenter_3,CopyConstructible} +\cgalRefines{SimplicialMeshCellBase_3,RegularTriangulationCellBaseWithWeightedCircumcenter_3} \cgalHasModel `CGAL::Compact_mesh_cell_base_3` \cgalHasModel `CGAL::Mesh_cell_base_3` diff --git a/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h b/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h index 44e555b9027..cb5f6cc262f 100644 --- a/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h @@ -67,7 +67,6 @@ with a model of the concept `BisectionGeometricTraits_3`. \tparam Image_word_type is the data type encoded in the `Image` input file - \cgalModels `MeshDomain_3` \sa `BisectionGeometricTraits_3` @@ -149,13 +148,12 @@ public: CGAL_assertion(transform(value_outside) == 0); } - /// Destructor + // Destructor virtual ~Gray_image_mesh_domain_3() {} -}; // end class Gray_image_mesh_domain_3 +}; -} // end namespace CGAL +} // namespace CGAL #include - #endif // CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H diff --git a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h index 8c1c880cb70..c57f4e4d3b3 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -157,15 +157,17 @@ For example, the multidomain described by the three functions [f1,f2,f3] and the The first one matches the locus of points satisfying f1(p)<0 and f2(p)<0 and f3(p)>0.
The second one matches the locus of points satisfying f1(p)>0 and f2(p)<0 and f3(p)>0.
-\tparam ImplicitFunction provides the definition of the function. +\tparam Function provides the definition of the function. This parameter stands for a model of the concept `ImplicitFunction` described in the surface mesh generation package. -The number types `ImplicitFunction::FT` and `BGT::FT` are required to match. +The number types `Function::FT` and `BGT::FT` are required to match. \sa `CGAL::Labeled_mesh_domain_3`. - */ - +#ifdef DOXYGEN_RUNNING +template +#else template +#endif class Implicit_multi_domain_to_labeling_function_wrapper { template @@ -184,20 +186,20 @@ class Implicit_multi_domain_to_labeling_function_wrapper }; public: - typedef int return_type; - typedef ImplicitFunction Function; - typedef typename Implicit_function_traits::Point Point_3; - /// \name Types /// @{ - //! - typedef std::vector Function_vector; -#ifdef DOXYGEN_RUNNING - //! - typedef typename Function::Point Point_3; -#endif - /// @} +#ifdef DOXYGEN_RUNNING + typedef typename Function::Point Point_3; +#else + typedef ImplicitFunction Function; + typedef typename Implicit_function_traits::Point Point_3; + typedef int return_type; +#endif + + typedef std::vector Function_vector; + + /// @} private: std::vector funcs; @@ -205,15 +207,15 @@ private: std::vector bmasks; public: - - /// \name Creation /// @{ /*! * \brief Construction from a vector of implicit functions and a vector of vector of signs. + * * \param implicit_functions the vector of implicit functions. * \param position_vectors the vector of vector of signs. Each vector of positions describes a component. + * * \sa `Sign` */ Implicit_multi_domain_to_labeling_function_wrapper (const Function_vector& implicit_functions, const std::vector >& position_vectors) @@ -246,6 +248,7 @@ public: } /*! * \brief Construction from a vector of implicit functions. + * \param implicit_functions the vector of implicit functions. * * Position vectors are built automatically so that the union of components equals the union of the functions. @@ -278,6 +281,7 @@ public: /*! * \brief Construction from a vector of implicit functions and a vector of strings. + * * \param implicit_functions the vector of implicit functions. * \param position_strings the vector of strings. The strings contained in this vector must contain '+' or '-' only. Each string (vector of positions) describes a component. */ @@ -337,9 +341,7 @@ public: } }; -} // end namespace CGAL - - +} // end namespace CGAL #if defined(BOOST_MSVC) # pragma warning(pop) diff --git a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h index 3782f9d46f4..b273da9af2e 100644 --- a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h @@ -336,7 +336,9 @@ Let `p` be a Point. `CGAL::Implicit_multi_domain_to_labeling_function_wrapper` is a good candidate for this template parameter if there are several components to mesh. -The function type can be any model of the concept `Callable` compatible with the signature `Subdomain_index(const Point_3&)`: it can be a function, a function object, a lambda expression... that takes a `%Point_3` as argument, and returns a type convertible to `Subdomain_index`. +The function type can be any model of the concept `Callable` compatible with the signature +`Subdomain_index(const %Point_3&)`: it can be a function, a function object, a lambda expression... +that takes a `%Point_3` as argument, and returns a type convertible to `Subdomain_index`. \cgalModels `MeshDomain_3` @@ -350,9 +352,9 @@ template > class Labeled_mesh_domain_3 #ifndef DOXYGEN_RUNNING -: protected details::Labeled_mesh_domain_3_impl + : protected details::Labeled_mesh_domain_3_impl #endif { public: @@ -381,7 +383,7 @@ public: /// The number type (a field type) of the geometric traits class typedef typename Geom_traits::FT FT; ///@} -#else +#else // DOXYGEN_RUNNING typedef boost::optional Subdomain; // Type of indexes for cells of the input complex @@ -428,7 +430,7 @@ public: typedef typename BGT::FT FT; typedef BGT Geom_traits; using Impl_details::construct_pair_functor; -#endif +#endif // DOXYGEN_RUNNING /// \name Creation /// @{ @@ -451,16 +453,19 @@ public: * \cgalParamDefault{FT(1e-3)} * \cgalParamNEnd * \cgalNamedParamsEnd + * * \cgalHeading{Example} * From the example (\ref Mesh_3/mesh_implicit_domains_2.cpp): * \snippet Mesh_3/mesh_implicit_domains_2.cpp Domain creation - * */ template Labeled_mesh_domain_3(const Function& function, const Bounding_object& bounding_object, - const CGAL_NP_CLASS& np = parameters::default_values(), - typename std::enable_if>::type* = nullptr) + const CGAL_NP_CLASS& np = parameters::default_values() +#ifndef DOXYGEN_RUNNING + , typename std::enable_if>::type* = nullptr +#endif // DOXYGEN_RUNNING + ) :Impl_details(function, bounding_object, parameters::choose_parameter(parameters::get_parameter(np, internal_np::error_bound), FT(1e-3)), @@ -496,7 +501,7 @@ public: template #if !defined(BOOST_MSVC) CGAL_DEPRECATED -#endif +#endif // BOOST_MSVC Labeled_mesh_domain_3(const Function& function, const Bounding_object& bounding_object, double error_bound, @@ -505,8 +510,8 @@ public: bounding_object, parameters::relative_error_bound(error_bound)) {} -#endif -#endif +#endif // CGAL_NO_DEPRECATED_CODE +#endif // DOXYGEN_RUNNING /// \name Creation of domains from 3D images /// @{ diff --git a/Mesh_3/include/CGAL/Mesh_cell_base_3.h b/Mesh_3/include/CGAL/Mesh_cell_base_3.h index 787124c3ec7..14f18f4a09b 100644 --- a/Mesh_3/include/CGAL/Mesh_cell_base_3.h +++ b/Mesh_3/include/CGAL/Mesh_cell_base_3.h @@ -125,15 +125,14 @@ of the concept `RegularTriangulationCellBaseWithWeightedCircumcenter_3` and defa \sa `CGAL::Compact_mesh_cell_base_3` */ -template< class GT, - class MD, - class Cb= CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3< - GT, CGAL::Regular_triangulation_cell_base_3 > > +template > > class Mesh_cell_base_3 -: public Mesh_3::Mesh_surface_cell_base_3 #ifndef DOXYGEN_RUNNING -, public Mesh_cell_base_3_base< - typename Mesh_3::Mesh_surface_cell_base_3::Tds::Concurrency_tag> + : public Mesh_3::Mesh_surface_cell_base_3, + public Mesh_cell_base_3_base::Tds::Concurrency_tag> #endif { typedef typename GT::FT FT; @@ -163,7 +162,6 @@ public: typedef Mesh_cell_base_3 Other; }; - // Constructors Mesh_cell_base_3() : Base() , subdomain_index_() @@ -225,6 +223,9 @@ public: bool is_cache_valid() const { return sliver_cache_validity_; } void reset_cache_validity() const { sliver_cache_validity_ = false; } + /// \name I/O + ///@{ + static std::string io_signature() { @@ -233,6 +234,8 @@ public: + Get_io_signature()(); } + /// @} + #ifdef CGAL_INTRUSIVE_LIST public: Cell_handle next_intrusive() const { return next_intrusive_; } @@ -248,8 +251,9 @@ public: } #endif // CGAL_INTRUSIVE_LIST - /// For the determinism of Compact_container iterators + /// \name Determinism ///@{ + typedef Tag_true Has_timestamp; std::size_t time_stamp() const { @@ -258,6 +262,7 @@ public: void set_time_stamp(const std::size_t& ts) { time_stamp_ = ts; } + ///@} private: diff --git a/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h b/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h index eab9f794440..b13a9955521 100644 --- a/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h @@ -44,9 +44,7 @@ and a sizing field which may be a uniform or variable field. \sa `MeshCriteria_3` \sa `CGAL::Mesh_criteria_3` \sa `CGAL::make_mesh_3()` - */ - template @@ -63,6 +61,8 @@ public: */ typedef typename Tr::Geom_traits::FT FT; + /// @} + typedef Visitor_ Visitor; typedef typename Visitor::Cell_quality Cell_quality; typedef typename Visitor::Is_cell_bad Is_cell_bad; @@ -75,8 +75,6 @@ private: typedef Mesh_cell_criteria_3 Self; - /// @} - public: /// \name Creation diff --git a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h index 4014f13835c..a8cfa8a2610 100644 --- a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h +++ b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h @@ -62,7 +62,7 @@ public: Polyline() {} ~Polyline() {} - /// Add a point at the end of the polyline + /// adds a point at the end of the polyline void add_point(const Point_3& p) { if( points_.empty() || p != end_point() ) { @@ -70,27 +70,27 @@ public: } } - /// Returns the starting point of the polyline + /// returns the starting point of the polyline const Point_3& start_point() const { CGAL_assertion( ! points_.empty() ); return points_.front(); } - /// Returns the ending point of the polyline + /// returns the ending point of the polyline const Point_3& end_point() const { CGAL_assertion( ! points_.empty() ); return points_.back(); } - /// Returns `true` if the polyline is not degenerated + /// returns `true` if the polyline is not degenerated bool is_valid() const { return points_.size() > 1; } - /// Returns `true` if polyline is a loop + /// returns `true` if polyline is a loop bool is_loop() const { return start_point() == end_point(); @@ -201,7 +201,7 @@ public: } - /// Returns the angle at the first point. + /// returns the angle at the first point. /// \pre The polyline must be a loop. Angle angle_at_first_point() const { CGAL_precondition(is_loop()); @@ -211,7 +211,7 @@ public: return angle(prev, first, next_p); } - /// Returns the length of the polyline + /// returns the length of the polyline FT length() const { //TODO: cache result @@ -227,7 +227,7 @@ public: return result; } - /// Returns signed geodesic distance between `p` and `q`. + /// returns signed geodesic distance between `p` and `q`. FT signed_geodesic_distance(const Point_3& p, const Point_3& q) const { // Locate p & q on polyline @@ -259,7 +259,7 @@ public: } - /// Returns a point at geodesic distance `distance` from p along the + /// returns a point at geodesic distance `distance` from p along the /// polyline. The polyline is oriented from starting point to end point. /// The distance could be negative. Point_3 point_at(const Point_3& p, FT distance) const @@ -332,7 +332,7 @@ private: return (points_.end() - 2); } - /// Returns an iterator on the starting point of the segment of the + /// returns an iterator on the starting point of the segment of the /// polyline which contains p /// if end_point_first is true, then --end is returned instead of begin /// if p is the starting point of a loop. @@ -523,28 +523,25 @@ features into any model of the `MeshDomain_3` concept. The 1-dimensional features are described as polylines whose endpoints are the added corners. -\tparam MD is the type -of the domain which should be extended. -It has to be a model of the `MeshDomain_3` concept. +\tparam MD is the type of the domain which is extended. It has to be a model of the `MeshDomain_3` concept. \cgalModels `MeshDomainWithFeatures_3` -\sa `MeshDomain_3` \sa `MeshPolyline_3` \sa `CGAL::Implicit_mesh_domain_3` \sa `CGAL::Polyhedral_mesh_domain_3` \sa `CGAL::Labeled_image_mesh_domain_3` - */ template < typename MD > class Mesh_domain_with_polyline_features_3 : public MD { - typedef Mesh_domain_with_polyline_features_3 Self; + typedef Mesh_domain_with_polyline_features_3 Self; public: -/// \name Types -/// @{ + /// \name Types + /// @{ + typedef typename MD::Surface_patch_index Surface_patch_index; typedef typename MD::Subdomain_index Subdomain_index; typedef int Curve_index; @@ -562,24 +559,21 @@ public: typedef CGAL::Tag_true Has_features; typedef typename MD::R::FT FT; -/// @} -#ifndef DOXYGEN_RUNNING + /// @} #ifndef CGAL_NO_DEPRECATED_CODE - typedef Curve_index Curve_segment_index; + typedef Curve_index Curve_segment_index; #endif - typedef typename MD::R Gt; - typedef Gt R; - typedef typename MD::Point_3 Point_3; -#endif // DOXYGEN_RUNNING + typedef typename MD::R GT; + typedef GT R; + typedef typename MD::Point_3 Point_3; -/// \name Creation -/// Constructors. Forwards the arguments to the constructor -/// of the base class. -/// @{ + /// \name Creation + /// @{ + // forwards the arguments to the constructor of the base class. template Mesh_domain_with_polyline_features_3(const T& ...o) : MD(o...) @@ -589,15 +583,14 @@ public: Mesh_domain_with_polyline_features_3(const Mesh_domain_with_polyline_features_3&) = default; -/// @} + /// @} -/// \name Operations -/// @{ - - /// @cond DEVELOPERS + /// \name Operations /// @{ - /// Add a 0-dimensional feature in the domain. + /// @cond DEVELOPERS + + /// adds a 0-dimensional feature in the domain. Corner_index add_corner(const Point_3& p); /// Overload where the last parameter `out` is not `CGAL::Emptyset_iterator()`. @@ -607,8 +600,9 @@ public: IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/); /*! - Add 0-dimensional features in the domain. The value type of `InputIterator` must - be `Point_3`. + adds 0-dimensional features in the domain. + + The value type of `InputIterator` must be `Point_3`. */ template void @@ -641,11 +635,13 @@ public: add_features_with_context(InputIterator first, InputIterator end, IndicesOutputIterator out /*= CGAL::Emptyset_iterator()*/); - /// @} - /// \endcond + + /// @endcond + /*! - Add 1-dimensional features in the domain. `InputIterator` value type must - be a model of the concept `MeshPolyline_3`. + adds 1-dimensional features in the domain. + + The value type of `InputIterator` must be a model of the concept `MeshPolyline_3`. */ template void @@ -653,16 +649,17 @@ public: { add_features(first, end, CGAL::Emptyset_iterator()); } /// @cond DEVELOPERS - /// Undocumented function, kept for backward-compatibility with existing - /// code + + /// Undocumented function, kept for backward-compatibility with existing code template void add_features_with_context(InputIterator first, InputIterator end) { add_features_with_context(first, end, CGAL::Emptyset_iterator()); } + /// @endcond /*! - Add 1-dimensional features (curves) from the range `[first, end)` in the domain with their incidences + adds 1-dimensional features (curves) from the range `[first, end)` in the domain with their incidences with 2-dimensional features (patches) of the domain. \tparam InputIterator input iterator over curves @@ -695,57 +692,57 @@ public: incident_patches_indices_pmap, CGAL::Emptyset_iterator()); } -/// @} -/// \name Implementation of the concept MeshDomainWithFeatures_3 -/// The following methods implement the requirement of the concept -/// `MeshDomainWithFeatures_3`. -/// @{ + /// @} - /// Implements `MeshDomainWithFeatures_3::get_corners()`. - /// OutputIterator value type is std::pair + /// \name Implementation of the concept MeshDomainWithFeatures_3 + /// The following methods implement the requirement of the concept + /// `MeshDomainWithFeatures_3`. + /// @{ + + /// implements `MeshDomainWithFeatures_3::get_corners()`. + /// OutputIterator is std::pair template OutputIterator get_corners(OutputIterator out) const; - /// Implements `MeshDomainWithFeatures_3::get_curves()`. + /// implements `MeshDomainWithFeatures_3::get_curves()`. /// OutputIterator value type is std::tuple, std::pair > template OutputIterator get_curves(OutputIterator out) const; - /// Implements `MeshDomainWithFeatures_3::curve_segment_length()`. + /// implements `MeshDomainWithFeatures_3::curve_segment_length()`. FT curve_segment_length(const Point_3& p, const Point_3 q, const Curve_index& curve_index, CGAL::Orientation orientation) const; - /// Implements `MeshDomainWithFeatures_3::curve_length()`. + /// implements `MeshDomainWithFeatures_3::curve_length()`. FT curve_length(const Curve_index& curve_index) const; - /// Implements `MeshDomainWithFeatures_3::construct_point_on_curve()`. + /// implements `MeshDomainWithFeatures_3::construct_point_on_curve()`. Point_3 construct_point_on_curve(const Point_3& starting_point, const Curve_index& curve_index, FT distance) const; - /// Implements `MeshDomainWithFeatures_3::distance_sign_along_loop()`. + /// implements `MeshDomainWithFeatures_3::distance_sign_along_loop()`. CGAL::Sign distance_sign_along_loop(const Point_3& p, const Point_3& q, const Point_3& r, const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::distance_sign()`. + /// implements `MeshDomainWithFeatures_3::distance_sign()`. CGAL::Sign distance_sign(const Point_3& p, const Point_3& q, const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::is_loop()`. + /// implements `MeshDomainWithFeatures_3::is_loop()`. bool is_loop(const Curve_index& index) const; - /// Implements `MeshDomainWithFeatures_3::is_curve_segment_covered()`. + /// implements `MeshDomainWithFeatures_3::is_curve_segment_covered()`. bool is_curve_segment_covered(const Curve_index& index, CGAL::Orientation orientation, const Point_3& c1, const Point_3& c2, const FT sq_r1, const FT sq_r2) const; - /** * Returns the index to be stored in a vertex lying on the surface identified * by `index`. @@ -760,11 +757,11 @@ public: Index index_from_subdomain_index(const Subdomain_index& index) const { return Index(index); } - /// Returns an `Index` from a `Curve_index` + /// returns an `Index` from a `Curve_index` Index index_from_curve_index(const Curve_index& index) const { return Index(index); } - /// Returns an `Index` from a `Corner_index` + /// returns an `Index` from a `Corner_index` Index index_from_corner_index(const Corner_index& index) const { return Index(index); } @@ -782,11 +779,11 @@ public: Subdomain_index subdomain_index(const Index& index) const { return boost::get(index); } - /// Returns a `Curve_index` from an `Index` + /// returns a `Curve_index` from an `Index` Curve_index curve_index(const Index& index) const { return boost::get(index); } - /// Returns a `Corner_index` from an `Index` + /// returns a `Corner_index` from an `Index` Corner_index corner_index(const Index& index) const { return boost::get(index); } @@ -832,12 +829,12 @@ public: Curve_index insert_edge(InputIterator first, InputIterator end); /// @endcond -/// @} + /// @} private: void compute_corners_incidences(); - /// Returns Index associated to p (p must be the coordinates of a corner + /// returns Index associated to p (p must be the coordinates of a corner /// point) Index point_corner_index(const Point_3& p) const; @@ -918,9 +915,11 @@ public: timer.stop(); std::cerr << " done (" << timer.time() * 1000 << " ms)" << std::endl; #endif - } // end build_curves_aabb_tree() + } // build_curves_aabb_tree() + /// @endcond -}; // end class Mesh_domain_with_polyline_features_3 + +}; // class Mesh_domain_with_polyline_features_3 @@ -1548,9 +1547,6 @@ is_curve_segment_covered(const Curve_index& index, c1, c2, sq_r1, sq_r2); } - - } //namespace CGAL - #endif // CGAL_MESH_DOMAIN_WITH_POLYLINE_FEATURES_3_H diff --git a/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h b/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h index cbaf1add111..ca001d12072 100644 --- a/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h @@ -122,7 +122,8 @@ public: /// \name Creation /// @{ /*! - * Returns an object to serve as criteria for edges. + * returns an object to serve as criteria for edges. + * * \param length_bound is an upper bound * for the length of the edges which are used to discretize the curves. * \param min_length_bound is a desired lower bound @@ -132,7 +133,7 @@ public: * break all the surface topology guarantees of the meshing algorithm. * It is not guaranteed to be exactly respected in the output mesh. * - * \note if one parameter is set to 0, then its corresponding criterion is ignored. + * \note If one parameter is set to 0, then its corresponding criterion is ignored. */ Mesh_edge_criteria_3(const FT& length_bound, const FT& min_length_bound = 0) @@ -149,13 +150,12 @@ public: // as int. /*! - * @tparam SizingField a model of `MeshDomainField_3` - * - * Returns an object to serve as criteria for edges. + * returns an object to serve as criteria for edges. * The behavior and semantic of the argument are the same * as above, except that the `length_bound` * parameter is a functional instead of a constant. - + * + * @tparam SizingField a model of `MeshDomainField_3` */ template < typename SizingField > Mesh_edge_criteria_3 diff --git a/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h b/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h index b35a7e78f95..30adfbd26f4 100644 --- a/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h @@ -68,6 +68,8 @@ public: */ typedef typename Tr::Geom_traits::FT FT; + /// @} + typedef Visitor_ Visitor; typedef typename Visitor::Facet_quality Facet_quality; typedef typename Visitor::Is_facet_bad Is_facet_bad; @@ -84,15 +86,13 @@ private: public: typedef CGAL::Tag_true Has_manifold_criterion; -/// @} - - /// \name Creation /// @{ #ifdef DOXYGEN_RUNNING /*! - Returns an object to serve as criteria for facets. + returns an object to serve as criteria for facets. + \param angle_bound is the lower bound for the angle in degrees of the surface mesh facets. \param radius_bound is a uniform upper bound @@ -105,6 +105,7 @@ public: \param min_radius_bound is a uniform lower bound for the radius of the surface Delaunay balls. Only facets with a radius larger than that bound will be refined. + @note If one parameter is set to 0, then its corresponding criterion is ignored. */ @@ -154,6 +155,7 @@ public: /** * @brief returns whether the facet `facet` is bad or not. + * * @param tr the triangulation within which `facet` lives * @param facet the facet */ diff --git a/Mesh_3/include/CGAL/Mesh_polyhedron_3.h b/Mesh_3/include/CGAL/Mesh_polyhedron_3.h index f179ca9233d..8e053945d60 100644 --- a/Mesh_3/include/CGAL/Mesh_polyhedron_3.h +++ b/Mesh_3/include/CGAL/Mesh_polyhedron_3.h @@ -214,34 +214,40 @@ public: The class `Mesh_polyhedron_3` provides a customized `Polyhedron_3` type. This type uses as `PolyhedronItems_3` a customized type which adds data to the Vertex, Face and -Halfedge class. Those data are required to use the detection of sharp features. +Halfedge classes. Those data are required to use the detection of sharp features. \tparam IGT stands for the geometric traits associated to the meshing process. It must be a model of the two concepts `PolyhedronTraits_3` and `IntersectionGeometricTraits_3`. -\sa `CGAL::Polyhedron_3` +\sa `CGAL::Polyhedron_3` \sa `CGAL::Polyhedral_mesh_domain_with_features_3` */ -template +#ifdef DOXYGEN_RUNNING +template struct Mesh_polyhedron_3 { -#ifdef DOXYGEN_RUNNING /// \name Types /// @{ /*! - `CGAL::Polyhedron_3` type with customized `PolyhedronItems_3` + `CGAL::Polyhedron_3` type with customized `PolyhedronItems_3` designed to handle sharp feature detection. */ typedef unspecified_type type; /// @} +}; #else +template +struct Mesh_polyhedron_3 +{ typedef Polyhedron_3 > type; typedef type Type; -#endif }; +#endif + } // end namespace CGAL #endif // CGAL_MESH_POLYHEDRON_3_H diff --git a/Mesh_3/include/CGAL/Mesh_triangulation_3.h b/Mesh_3/include/CGAL/Mesh_triangulation_3.h index 3f3ca673523..3aca8774843 100644 --- a/Mesh_3/include/CGAL/Mesh_triangulation_3.h +++ b/Mesh_3/include/CGAL/Mesh_triangulation_3.h @@ -134,15 +134,15 @@ type to be used for the 3D triangulation embedding the mesh. \tparam GT must be a model of `MeshTriangulationTraits_3` or `Default` and defaults to `Kernel_traits::%Kernel`. -\tparam Concurrency_tag_ enables sequential versus parallel meshing and optimization algorithms. - Possible values are `Sequential_tag` (the default), `Parallel_tag`, - and `Parallel_if_available_tag`. +\tparam ConcurrencyTag enables sequential versus parallel meshing and optimization algorithms. + Possible values are `Sequential_tag` (the default), `Parallel_tag`, + and `Parallel_if_available_tag`. -\tparam Vertex_base__ must be a model of `MeshVertexBase_3` or `Default` -and defaults to `Mesh_vertex_base_3`. +\tparam VertexBase must be a model of `MeshVertexBase_3` or `Default` +and defaults to `Mesh_vertex_base_3`. -\tparam Cell_base_ must be a model of `MeshCellBase_3` or `Default` -and defaults to `Compact_mesh_cell_base_3`. +\tparam CellBase must be a model of `MeshCellBase_3` or `Default` +and defaults to `Compact_mesh_cell_base_3`. \warning To improve the robustness of the meshing process, the input traits `GT` is wrapped with the traits class `Robust_weighted_circumcenter_filtered_traits_3`. @@ -162,7 +162,7 @@ template + class CellBase = Default> struct Mesh_triangulation_3 { private: @@ -190,28 +190,25 @@ private: Mesh_3_regular_triangulation_3_wrapper; public: - #ifndef DOXYGEN_RUNNING using type = Triangulation; using Type = type; #else + /// \name Types + /// @{ -/// \name Types -/// @{ - -/*! -The triangulation type to be used for the 3D triangulation embedding the mesh. -This type is a wrapper around the type `CGAL::Regular_triangulation_3`, whose vertex -and cell base classes are respectively `Vertex_base` and `Cell_base`. -*/ -typedef unspecified_type type; + /*! + The triangulation type to be used for the 3D triangulation embedding the mesh. + This type is a wrapper around the type `CGAL::Regular_triangulation_3`, whose vertex + and cell base classes are respectively `VertexBase` and `CellBase`. + */ + typedef unspecified_type type; /// @} +#endif // DOXYGEN_RUNNING +}; -#endif - -}; // end struct Mesh_triangulation_3 -} // end namespace CGAL +} // end namespace CGAL #include diff --git a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h index 56fabd99813..987acca1567 100644 --- a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -85,7 +85,7 @@ surface, the sub-domain indices on both sides are known. \tparam Polyhedron stands for the type of the input polyhedral surface(s), model of `FaceListGraph`. -\tparam IGT_ stands for a geometric traits class +\tparam IGT stands for a geometric traits class providing the types and functors required to implement the intersection tests and intersection computations for polyhedral boundary surfaces. This parameter has to be instantiated @@ -93,7 +93,6 @@ with a model of the concept `IntersectionGeometricTraits_3`. \cgalModels `MeshDomainWithFeatures_3` -\sa `IntersectionGeometricTraits_3` \sa `CGAL::make_mesh_3()` \sa `CGAL::Mesh_domain_with_polyline_features_3` \sa `CGAL::Polyhedral_mesh_domain_3` @@ -104,53 +103,47 @@ template < class IGT, class Polyhedron = typename Mesh_polyhedron_3::type> class Polyhedral_complex_mesh_domain_3 : public Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< Polyhedron, - IGT> > + Polyhedral_mesh_domain_3 > #else template < class IGT_, class Polyhedron_ = typename Mesh_polyhedron_3::type, - class TriangleAccessor=CGAL::Default> + class TriangleAccessor = CGAL::Default> class Polyhedral_complex_mesh_domain_3 : public Mesh_domain_with_polyline_features_3< Polyhedral_mesh_domain_3< Polyhedron_, IGT_, TriangleAccessor, - int, //Use_patch_id_tag - Tag_true > >//Use_exact_intersection_tag + int, // Use_patch_id_tag + Tag_true > >// Use_exact_intersection_tag #endif { public: - /// The base class + // The base class typedef Polyhedron_ Polyhedron; typedef Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< - Polyhedron, IGT_, TriangleAccessor, - int, Tag_true > > Base; - /// @cond DEVELOPERS -private: + Polyhedral_mesh_domain_3< + Polyhedron, IGT_, TriangleAccessor, int, Tag_true > > Base; +private: + /// @cond DEVELOPERS typedef Polyhedral_mesh_domain_3 BaseBase; typedef Polyhedral_complex_mesh_domain_3 Self; /// @endcond public: - /*! - Numerical type. - */ + // Numerical type typedef typename Base::FT FT; - /// The polyhedron type + // The polyhedron type typedef Polyhedron Polyhedron_type; - /// \name Index types - /// @{ - /// The types are `int` or types compatible with `int`. + // The types are `int` or types compatible with `int`. typedef typename Base::Corner_index Corner_index; typedef typename Base::Curve_index Curve_index; typedef typename Base::Surface_patch_index Surface_patch_index; typedef typename Base::Subdomain_index Subdomain_index; - /// @} /// @cond DEVELOPERS typedef typename Base::Ray_3 Ray_3; @@ -162,6 +155,7 @@ public: typedef typename Base::AABB_primitive AABB_primitive; typedef typename Base::AABB_primitive_id AABB_primitive_id; typedef typename Base::Surface_patch_index Patch_id; + // Backward compatibility #ifndef CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX typedef Surface_patch_index Surface_index; @@ -192,9 +186,12 @@ protected: /// @endcond public: - /// Constructor - /*! Constructs a domain defined by a set of polyhedral surfaces, - describing a polyhedral complex. + /// \name Creation + /// @{ + + /*! + constructs a domain defined by a set of polyhedral surfaces, describing a polyhedral complex. + @param begin first iterator on the input polyhedral surfaces @param end past the end iterator on the input polyhedral surfaces @param indices_begin first iterator on the pairs of subdomain indices @@ -214,15 +211,14 @@ public: */ template - Polyhedral_complex_mesh_domain_3 - ( InputPolyhedraIterator begin, - InputPolyhedraIterator end, - InputPairOfSubdomainIndicesIterator indices_begin, - InputPairOfSubdomainIndicesIterator indices_end + Polyhedral_complex_mesh_domain_3(InputPolyhedraIterator begin, + InputPolyhedraIterator end, + InputPairOfSubdomainIndicesIterator indices_begin, + InputPairOfSubdomainIndicesIterator indices_end #ifndef DOXYGEN_RUNNING - , CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif - ) + ) : Base(p_rng) , patch_indices(indices_begin, indices_end) , borders_detected_(false) @@ -254,7 +250,10 @@ public: this->build(); } + /// @} + /// @cond DEVELOPERS + Polyhedral_complex_mesh_domain_3 ( CGAL::Random* p_rng = nullptr @@ -266,17 +265,15 @@ public: const std::vector& polyhedra() const { return stored_polyhedra; } - /// @endcond - /// @cond DEVELOPERS /*! * construct_initial_points_object() is one of the very first functions called - * when make_mesh_3 starts + * when make_mesh_3 starts. * BEFORE make_mesh_3 starts, we have to make sure that (at least) the borders have * been detected, and the polyhedral complex internal data structures initialized * So, this function is overloaded to make sure they are (checking that - * borders_detected_ is false is enough) - * Then, call the base class function + * borders_detected_ is false is enough). + * Then, call the base class function. */ typename BaseBase::Construct_initial_points construct_initial_points_object() const { @@ -289,9 +286,13 @@ public: void detect_features(FT angle_in_degree, std::vector& p, const bool dont_protect);//if true, features will not be protected + + void detect_borders(std::vector& p, const bool dont_protect); + /// @endcond + /*! - Detects sharp features and boundaries of the polyhedral components of the complex + detects sharp features and boundaries of the polyhedral components of the complex (including potential internal polyhedra), and inserts them as features of the domain. `angle_bound` gives the maximum angle (in degrees) between the two normal vectors of adjacent triangles. @@ -303,13 +304,10 @@ public: detect_features(angle_bound, stored_polyhedra, false/*do protect*/); } - /// @cond DEVELOPERS - void detect_borders(std::vector& p, const bool dont_protect); - /// @endcond /*! - Detects border edges of the polyhedral components of the complex, + detects border edges of the polyhedral components of the complex, and inserts them as features of the domain. - This function should be called alone only, and not before or after `detect_features()`. + This function should only be called alone, and not before or after `detect_features()`. */ void detect_borders() { detect_borders(stored_polyhedra, false/*do protect*/); @@ -373,11 +371,10 @@ public: this->boundary_polyhedra_ids.push_back(poly_id); } } - /// @endcond - /// @cond DEVELOPERS template - void add_vertices_to_c3t3_on_patch_without_feature_edges(C3t3& c3t3) const { + void add_vertices_to_c3t3_on_patch_without_feature_edges(C3t3& c3t3) const + { #ifdef CGAL_MESH_3_VERBOSE std::cout << "add_vertices_to_c3t3_on_patch_without_feature_edges..."; std::cout.flush(); diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 6d50190ac98..2abd37c3d77 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -133,19 +133,17 @@ with a model of the concept `IntersectionGeometricTraits_3`. \sa `IntersectionGeometricTraits_3` \sa `CGAL::make_mesh_3()`. - */ - #ifdef DOXYGEN_RUNNING template -#else -template -#endif +#else // DOXYGEN_RUNNING +template +#endif // DOXYGEN_RUNNING class Polyhedral_mesh_domain_3 { public: @@ -155,7 +153,7 @@ public: typedef Patch_id_ Patch_id; - /// Geometric object types + // Geometric object types typedef typename IGT::Point_3 Point_3; typedef typename IGT::Segment_3 Segment_3; typedef typename IGT::Ray_3 Ray_3; @@ -166,25 +164,25 @@ public: //------------------------------------------------------- // Index Types //------------------------------------------------------- - /// Type of indexes for cells of the input complex + // Type of indexes for cells of the input complex typedef int Subdomain_index; typedef boost::optional Subdomain; - /// Type of indexes for surface patch of the input complex + // Type of indexes for surface patch of the input complex typedef typename boost::property_map >::type Face_patch_id_pmap; typedef typename boost::property_traits< Face_patch_id_pmap>::value_type Surface_patch_index; typedef boost::optional Surface_patch; - /// Type of indexes to characterize the lowest dimensional face of the input - /// complex on which a vertex lie + + // Type of indexes to characterize the lowest dimensional face of the input + // complex on which a vertex lie typedef typename Mesh_3::internal::Index_generator< Subdomain_index, Surface_patch_index>::type Index; typedef std::tuple Intersection; - typedef typename IGT::FT FT; // Kernel_traits compatibility @@ -229,8 +227,6 @@ public: typedef typename AABB_traits::Bounding_box Bounding_box; public: - - /// Default constructor Polyhedral_mesh_domain_3(CGAL::Random* p_rng = nullptr) : tree_() , bounding_tree_(&tree_) @@ -238,15 +234,13 @@ public: { } - -/// \name Creation -/// @{ + /// \name Creation + /// @{ /*! Construction from a bounding polyhedral surface which must be closed, and free of intersections. The inside of `bounding_polyhedron` will be meshed. */ - Polyhedral_mesh_domain_3(const Polyhedron& bounding_polyhedron #ifndef DOXYGEN_RUNNING , CGAL::Random* p_rng = nullptr @@ -270,11 +264,11 @@ public: and free of intersections. Using this constructor allows to mesh a polyhedral surface which is not closed, or has holes. The inside of `bounding_polyhedron` will be meshed. -*/ - Polyhedral_mesh_domain_3(const Polyhedron& p - ,const Polyhedron& bounding_polyhedron + */ + Polyhedral_mesh_domain_3(const Polyhedron& p, + const Polyhedron& bounding_polyhedron #ifndef DOXYGEN_RUNNING - ,CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif ) : tree_() @@ -300,14 +294,14 @@ public: * * @param begin iterator for a sequence of pointers to polyhedra * @param end iterator for a sequence of pointers to polyhedra - * @param bounding_polyhedron reference to the bounding surface + * @param bounding_polyhedron the bounding surface */ template - Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin - ,InputPolyhedraPtrIterator end - ,const Polyhedron& bounding_polyhedron + Polyhedral_mesh_domain_3(InputPolyhedraPtrIterator begin, + InputPolyhedraPtrIterator end, + const Polyhedron& bounding_polyhedron #ifndef DOXYGEN_RUNNING - ,CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif ) : p_rng_(p_rng) @@ -328,7 +322,7 @@ public: } /*! - * Constructor from a sequence of polyhedral surfaces, without bounding + * Constructor from a sequence of polyhedral surfaces, without a bounding * surface. The domain will always answer `false` to `is_in_domain()` * queries. * @@ -356,6 +350,8 @@ public: bounding_tree_ = 0; } + /// @} + // Destructor ~Polyhedral_mesh_domain_3() { if(bounding_tree_ != 0 && bounding_tree_ != &tree_) { @@ -366,11 +362,9 @@ public: void set_surface_only() { bounding_tree_ = 0; } -/// @} - /** - * Constructs a set of `n` points on the surface, and output them to + * constructs a set of `n` points on the surface, and output them to * the output iterator `pts` whose value type is required to be * `std::pair`. */ @@ -422,7 +416,7 @@ public: return tree_.closest_point(p); } - /// Allowed query types + // Allowed query types typedef boost::mpl::vector Allowed_query_types; /** diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h index 7c07b8a5ef2..38c2b9570f1 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h @@ -62,14 +62,14 @@ namespace CGAL { The class `Polyhedral_mesh_domain_with_features_3` implements a domain whose boundary is a simplicial polyhedral surface. -This surface must be free of intersection. -It can either be closed, + +This surface must be free of intersection. It can either be closed, included inside another polyhedral surface which is closed and free of intersection, or open. In the latter case, the meshing process will only take care of the quality of the 1D (features and boundaries) and 2D (surfaces) components of the mesh. -It is a model of the concept `MeshDomainWithFeatures_3`. It also -provides a member function to automatically detect sharp features and boundaries from +It is a model of the concept `MeshDomainWithFeatures_3`. It also provides +a member function to automatically detect sharp features and boundaries from the input polyhedral surface(s). \tparam IGT stands for a geometric traits class providing the types @@ -78,7 +78,6 @@ for polyhedral boundary surfaces. This parameter has to be instantiated with a model of the concept `IntersectionGeometricTraits_3`. - \tparam Polyhedron stands for the type of the input polyhedral surface(s), model of `FaceListGraph`. \cgalModels `MeshDomainWithFeatures_3` @@ -88,25 +87,25 @@ instantiated with a model of the concept \sa `CGAL::Mesh_polyhedron_3` */ #ifdef DOXYGEN_RUNNING -template < class IGT - ,class Polyhedron = typename Mesh_polyhedron_3::type> +template ::type> class Polyhedral_mesh_domain_with_features_3 : public Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< Polyhedron, - IGT> > + Polyhedral_mesh_domain_3 > #else -template < class IGT_ - ,class Polyhedron_ = typename Mesh_polyhedron_3::type - ,class TriangleAccessor= CGAL::Default - ,class Patch_id=int - ,class Use_exact_intersection_construction_tag = Tag_true> +template ::type, + class TriangleAccessor = CGAL::Default, + class Patch_id = int, + class Use_exact_intersection_construction_tag = Tag_true> class Polyhedral_mesh_domain_with_features_3 : public Mesh_domain_with_polyline_features_3< - Polyhedral_mesh_domain_3< Polyhedron_, - IGT_, - TriangleAccessor, - Patch_id, - Use_exact_intersection_construction_tag > > + Polyhedral_mesh_domain_3 > #endif { typedef Mesh_domain_with_polyline_features_3< @@ -131,8 +130,9 @@ public: typedef typename Base::Surface_patch_index Surface_patch_index; typedef typename Base::Subdomain_index Subdomain_index; + // Backward-compatibility #ifndef CGAL_NO_DEPRECATED_CODE - typedef Curve_index Curve_segment_index; ///< Backward-compatibility + typedef Curve_index Curve_segment_index; #endif typedef typename boost::property_map Bare_polyline; typedef Mesh_3::Polyline_with_context Polyline_with_context; -/// \name Creation -/// @{ + /// \name Creation + /// @{ /*! - Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface. + Constructor from a polyhedral surface. No feature detection is done at this level. Note that a copy of `bounding_polyhedron` will be done. The polyhedron `bounding_polyhedron` has to be closed and free of intersections. Its interior of `bounding_polyhedron` will be meshed. */ Polyhedral_mesh_domain_with_features_3(const Polyhedron& bounding_polyhedron #ifndef DOXYGEN_RUNNING - ,CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif ) : Base(p_rng) , borders_detected_(false) @@ -191,14 +182,13 @@ public: #ifndef CGAL_NO_DEPRECATED_CODE /*! - \deprecated Constructs a `Polyhedral_mesh_domain_with_features_3` from an off file. No feature - detection is done at this level. Users must read the file into a `Polyhedron` and call the - constructor above. + \deprecated Constructor from an OFF file. No feature detection is done at this level. + Users must read the file into a `Polyhedron` and call the constructor above. */ CGAL_DEPRECATED Polyhedral_mesh_domain_with_features_3(const std::string& filename #ifndef DOXYGEN_RUNNING - ,CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif ) : Base(p_rng) , borders_detected_(false) @@ -217,20 +207,20 @@ public: { load_from_file(filename); } -#endif +#endif // DOXYGEN_RUNNING #endif // not CGAL_NO_DEPRECATED_CODE /*! - Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface, and a bounding polyhedral surface. + Constructor from a polyhedral surface, and a bounding polyhedral surface. The first polyhedron should be entirely included inside `bounding_polyhedron`, which has to be closed and free of intersections. Using this constructor enables to mesh a polyhedral surface which is not closed, or has holes. The inside of `bounding_polyhedron` will be meshed. */ - Polyhedral_mesh_domain_with_features_3(const Polyhedron& polyhedron - ,const Polyhedron& bounding_polyhedron + Polyhedral_mesh_domain_with_features_3(const Polyhedron& polyhedron, + const Polyhedron& bounding_polyhedron #ifndef DOXYGEN_RUNNING - ,CGAL::Random* p_rng = nullptr + , CGAL::Random* p_rng = nullptr #endif ) : Base(p_rng) , borders_detected_(false) @@ -249,10 +239,24 @@ public: } } + /*! + * Constructor from a sequence of polyhedral surfaces, without a bounding + * surface. The domain will always answer `false` to `is_in_domain()` + * queries. + * + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` and value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + */ template Polyhedral_mesh_domain_with_features_3(InputPolyhedraPtrIterator begin, - InputPolyhedraPtrIterator end, - CGAL::Random* p_rng = nullptr) + InputPolyhedraPtrIterator end +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.reserve(std::distance(begin, end)); @@ -265,11 +269,25 @@ public: this->build(); } + /*! + * Constructor from a sequence of polyhedral surfaces, and a bounding + * polyhedral surface. + * + * @tparam InputPolyhedraPtrIterator must be a model of + * `ForwardIterator` and value type `Polyhedron*` + * + * @param begin iterator for a sequence of pointers to polyhedra + * @param end iterator for a sequence of pointers to polyhedra + * @param bounding_polyhedron the bounding surface + */ template Polyhedral_mesh_domain_with_features_3(InputPolyhedraPtrIterator begin, InputPolyhedraPtrIterator end, - const Polyhedron& bounding_polyhedron, - CGAL::Random* p_rng = nullptr) + const Polyhedron& bounding_polyhedron +#ifndef DOXYGEN_RUNNING + , CGAL::Random* p_rng = nullptr +#endif + ) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.reserve(std::distance(begin, end)+1); @@ -291,26 +309,27 @@ public: this->build(); } - /// Destructor + /// @} + + // Destructor ~Polyhedral_mesh_domain_with_features_3() {} -/// @} - - /// Detect features + // Detect features void initialize_ts(Polyhedron& p); + void detect_borders(std::vector& p); void detect_features(FT angle_in_degree, std::vector& p); -/// \name Operations -/// @{ + /// \name Operations + /// @{ /*! - Detects sharp features and boundaries of the internal bounding polyhedron (and the potential internal polyhedron) - and inserts them as features of the domain. - @param angle_bound gives the maximum - angle (in degrees) between the two normal vectors of adjacent triangles. - For an edge of the polyhedron, if the angle between the two normal vectors of its + detects sharp features and boundaries of the internal bounding polyhedron (and the potential + internal polyhedra) and inserts them as features of the domain. + + @param angle_bound gives the maximum angle (in degrees) between the two normal vectors of adjacent triangles. + For an edge of a polyhedron, if the angle between the two normal vectors of its incident facets is bigger than the given bound, then the edge is considered as a feature edge. */ @@ -319,13 +338,11 @@ public: detect_features(angle_bound, stored_polyhedra); } - void detect_borders(std::vector& p); - /*! - Detects border edges of the bounding polyhedron and inserts them as features of the domain. - This function should be called alone only, and not before or after `detect_features()`. - */ + detects border edges of the bounding polyhedron and inserts them as features of the domain. + This function should only be called alone, and not before or after `detect_features()`. + */ void detect_borders() { detect_borders(stored_polyhedra); }; /// @} diff --git a/Mesh_3/include/CGAL/Triangle_accessor_3.h b/Mesh_3/include/CGAL/Triangle_accessor_3.h index 03c091ccdb4..4e336aea354 100644 --- a/Mesh_3/include/CGAL/Triangle_accessor_3.h +++ b/Mesh_3/include/CGAL/Triangle_accessor_3.h @@ -19,7 +19,6 @@ #include - #include #include #include @@ -40,26 +39,14 @@ template < class K,class Items, class Triangle_accessor_3, K > { typedef Polyhedron_3 Polyhedron; + public: - /// \name Types - /// @{ - /*! - Triangle type. - */ typedef typename K::Triangle_3 Triangle_3; - /*! - Triangle iterator. - */ typedef typename Polyhedron::Facet_const_iterator Triangle_iterator; - /*! - Triangle handle. - */ typedef typename Polyhedron::Facet_const_handle Triangle_handle; - /// @} - Triangle_accessor_3() { } Triangle_iterator triangles_begin(const Polyhedron& p) const @@ -82,8 +69,7 @@ public: } }; - - template +template class Triangle_accessor_3 >, K > { typedef Graph_with_descriptor_with_graph > Polyhedron; @@ -124,5 +110,4 @@ public: } // end namespace CGAL - #endif // POLYHEDRON_TRIANGLE_ACCESSOR_H