mirror of https://github.com/CGAL/cgal
rename named parameter
This commit is contained in:
parent
05d6e2ede9
commit
c1165a79aa
|
|
@ -258,7 +258,7 @@ CGAL_add_named_parameter(minimum_region_size_t, minimum_region_size, minimum_reg
|
|||
CGAL_add_named_parameter(sphere_radius_t, sphere_radius, sphere_radius)
|
||||
CGAL_add_named_parameter(k_neighbors_t, k_neighbors, k_neighbors)
|
||||
CGAL_add_named_parameter(item_map_t, item_map, item_map)
|
||||
CGAL_add_named_parameter(cosine_value_t, cosine_value, cosine_value)
|
||||
CGAL_add_named_parameter(cosine_of_maxium_angle_t, cosine_of_maxium_angle, cosine_of_maxium_angle)
|
||||
CGAL_add_named_parameter(minimum_radius_t, minimum_radius, minimum_radius)
|
||||
CGAL_add_named_parameter(maximum_radius_t, maximum_radius, maximum_radius)
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ namespace Polygon_mesh_processing {
|
|||
such that they are considered part of the same region}
|
||||
\cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamExtra{this parameter and `cosine_value` are exclusive}
|
||||
\cgalParamExtra{this parameter and `cosine_of_maxium_angle` are exclusive}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{The maximum angle, given as a cosine, between the normal of the supporting planes of adjacent faces
|
||||
such that they are considered part of the same region}
|
||||
\cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`}
|
||||
|
|
@ -157,7 +157,7 @@ region_growing_of_planes_on_faces(const PolygonMesh& mesh,
|
|||
\cgalParamDescription{the maximum distance from a point to a line such that it is considered part of the region of the line}
|
||||
\cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`}
|
||||
\cgalParamDefault{1}
|
||||
\cgalParamExtra{this parameter and `cosine_value` are exclusive}
|
||||
\cgalParamExtra{this parameter and `cosine_of_maxium_angle` are exclusive}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{maximum_angle}
|
||||
\cgalParamDescription{the maximum angle in degrees between two adjacent segments
|
||||
|
|
@ -165,7 +165,7 @@ region_growing_of_planes_on_faces(const PolygonMesh& mesh,
|
|||
\cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{The maximum angle, given as a cosine, between two adjacent segments
|
||||
such that they are considered part of the same region}
|
||||
\cgalParamType{`GeomTraits::FT` with `GeomTraits` being the type of the parameter `geom_traits`}
|
||||
|
|
@ -204,8 +204,7 @@ detect_corners_of_regions(
|
|||
using parameters::get_parameter;
|
||||
using parameters::is_default_parameter;
|
||||
|
||||
typedef typename GetGeomTraits<PolygonMesh, CGAL_NP_CLASS>::type Traits;
|
||||
|
||||
using Traits = typename GetGeomTraits<PolygonMesh, CGAL_NP_CLASS>::type;
|
||||
using Graph_traits = boost::graph_traits<PolygonMesh>;
|
||||
using halfedge_descriptor = typename Graph_traits::halfedge_descriptor;
|
||||
using edge_descriptor = typename Graph_traits::edge_descriptor;
|
||||
|
|
@ -213,7 +212,7 @@ detect_corners_of_regions(
|
|||
using vertex_descriptor = typename Graph_traits::vertex_descriptor;
|
||||
|
||||
using Default_ecm = typename boost::template property_map<PolygonMesh, CGAL::dynamic_edge_property_t<bool> >::type;
|
||||
using Ecm = internal_np::Lookup_named_param_def <
|
||||
using Ecm = typename internal_np::Lookup_named_param_def <
|
||||
internal_np::edge_is_constrained_t,
|
||||
CGAL_NP_CLASS,
|
||||
Default_ecm
|
||||
|
|
@ -238,6 +237,7 @@ detect_corners_of_regions(
|
|||
halfedge_descriptor h = halfedge(e, mesh);
|
||||
face_descriptor f1 = face(h, mesh);
|
||||
face_descriptor f2 = face(opposite(h, mesh), mesh);
|
||||
// an edge is constrained if it is a border edge or if the regions assigned to the two faces are different
|
||||
if (f1 == Graph_traits::null_face() || f2 == Graph_traits::null_face() || get(region_map,f1)!=get(region_map,f2))
|
||||
put(ecm, e, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ namespace Point_set {
|
|||
\cgalParamType{`GeomTraits::FT`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`,
|
||||
this parameter can be used instead of the `maximum_angle`}
|
||||
\cgalParamType{`GeomTraits::FT`}
|
||||
|
|
@ -168,7 +168,7 @@ namespace Point_set {
|
|||
|
||||
\pre `maximum_distance >= 0`
|
||||
\pre `maximum_angle >= 0 && maximum_angle <= 90`
|
||||
\pre `cosine_value >= 0 && cosine_value <= 1`
|
||||
\pre `cosine_of_maxium_angle >= 0 && cosine_of_maxium_angle <= 1`
|
||||
\pre `minimum_region_size > 0`
|
||||
\pre `minimum_radius >= 0`
|
||||
\pre `maximum_radius >= minimum_radius`
|
||||
|
|
@ -198,7 +198,7 @@ namespace Point_set {
|
|||
const FT default_cos_value = static_cast<FT>(std::cos(CGAL::to_double(
|
||||
(max_angle * static_cast<FT>(CGAL_PI)) / FT(180))));
|
||||
const FT cos_value = parameters::choose_parameter(
|
||||
parameters::get_parameter(np, internal_np::cosine_value), default_cos_value);
|
||||
parameters::get_parameter(np, internal_np::cosine_of_maxium_angle), default_cos_value);
|
||||
CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1));
|
||||
m_cos_value_threshold = cos_value;
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace Point_set {
|
|||
\cgalParamType{`GeomTraits::FT`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`,
|
||||
this parameter can be used instead of the `maximum_angle`}
|
||||
\cgalParamType{`GeomTraits::FT`}
|
||||
|
|
@ -167,7 +167,7 @@ namespace Point_set {
|
|||
|
||||
\pre `maximum_distance >= 0`
|
||||
\pre `maximum_angle >= 0 && maximum_angle <= 90`
|
||||
\pre `cosine_value >= 0 && cosine_value <= 1`
|
||||
\pre `cosine_of_maxium_angle >= 0 && cosine_of_maxium_angle <= 1`
|
||||
\pre `minimum_region_size > 0`
|
||||
\pre `minimum_radius >= 0`
|
||||
\pre `maximum_radius >= minimum_radius`
|
||||
|
|
@ -197,7 +197,7 @@ namespace Point_set {
|
|||
const FT default_cos_value = static_cast<FT>(std::cos(CGAL::to_double(
|
||||
(max_angle * static_cast<FT>(CGAL_PI)) / FT(180))));
|
||||
const FT cos_value = parameters::choose_parameter(
|
||||
parameters::get_parameter(np, internal_np::cosine_value), default_cos_value);
|
||||
parameters::get_parameter(np, internal_np::cosine_of_maxium_angle), default_cos_value);
|
||||
CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1));
|
||||
m_cos_value_threshold = cos_value;
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Point_set {
|
|||
\cgalParamType{`GeomTraits::FT`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`,
|
||||
this parameter can be used instead of the `maximum_angle`}
|
||||
\cgalParamType{`GeomTraits::FT`}
|
||||
|
|
@ -145,7 +145,7 @@ namespace Point_set {
|
|||
|
||||
\pre `maximum_distance >= 0`
|
||||
\pre `maximum_angle >= 0 && maximum_angle <= 90`
|
||||
\pre `cosine_value >= 0 && cosine_value <= 1`
|
||||
\pre `cosine_of_maxium_angle >= 0 && cosine_of_maxium_angle <= 1`
|
||||
\pre `minimum_region_size > 0`
|
||||
*/
|
||||
template<typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
|
|
@ -174,7 +174,7 @@ namespace Point_set {
|
|||
const FT default_cos_value = static_cast<FT>(std::cos(CGAL::to_double(
|
||||
(max_angle * static_cast<FT>(CGAL_PI)) / FT(180))));
|
||||
const FT cos_value = parameters::choose_parameter(
|
||||
parameters::get_parameter(np, internal_np::cosine_value), default_cos_value);
|
||||
parameters::get_parameter(np, internal_np::cosine_of_maxium_angle), default_cos_value);
|
||||
CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1));
|
||||
m_cos_value_threshold = cos_value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ namespace Point_set {
|
|||
\cgalParamType{`GeomTraits::FT`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`,
|
||||
this parameter can be used instead of the `maximum_angle`}
|
||||
\cgalParamType{`GeomTraits::FT`}
|
||||
|
|
@ -146,7 +146,7 @@ namespace Point_set {
|
|||
|
||||
\pre `maximum_distance >= 0`
|
||||
\pre `maximum_angle >= 0 && maximum_angle <= 90`
|
||||
\pre `cosine_value >= 0 && cosine_value <= 1`
|
||||
\pre `cosine_of_maxium_angle >= 0 && cosine_of_maxium_angle <= 1`
|
||||
\pre `minimum_region_size > 0`
|
||||
*/
|
||||
template<typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
|
|
@ -175,7 +175,7 @@ namespace Point_set {
|
|||
const FT default_cos_value = static_cast<FT>(std::cos(CGAL::to_double(
|
||||
(max_angle * static_cast<FT>(CGAL_PI)) / FT(180))));
|
||||
const FT cos_value = parameters::choose_parameter(
|
||||
parameters::get_parameter(np, internal_np::cosine_value), default_cos_value);
|
||||
parameters::get_parameter(np, internal_np::cosine_of_maxium_angle), default_cos_value);
|
||||
CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1));
|
||||
m_cos_value_threshold = cos_value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Point_set {
|
|||
\cgalParamType{`GeomTraits::FT`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`,
|
||||
this parameter can be used instead of the `maximum_angle`}
|
||||
\cgalParamType{`GeomTraits::FT`}
|
||||
|
|
@ -157,7 +157,7 @@ namespace Point_set {
|
|||
|
||||
\pre `maximum_distance >= 0`
|
||||
\pre `maximum_angle >= 0 && maximum_angle <= 90`
|
||||
\pre `cosine_value >= 0 && cosine_value <= 1`
|
||||
\pre `cosine_of_maxium_angle >= 0 && cosine_of_maxium_angle <= 1`
|
||||
\pre `minimum_region_size > 0`
|
||||
\pre `minimum_radius >= 0`
|
||||
\pre `maximum_radius >= minimum_radius`
|
||||
|
|
@ -187,7 +187,7 @@ namespace Point_set {
|
|||
const FT default_cos_value = static_cast<FT>(std::cos(CGAL::to_double(
|
||||
(max_angle * static_cast<FT>(CGAL_PI)) / FT(180))));
|
||||
const FT cos_value = parameters::choose_parameter(
|
||||
parameters::get_parameter(np, internal_np::cosine_value), default_cos_value);
|
||||
parameters::get_parameter(np, internal_np::cosine_of_maxium_angle), default_cos_value);
|
||||
CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1));
|
||||
m_cos_value_threshold = cos_value;
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Polygon_mesh {
|
|||
\cgalParamType{`GeomTraits::FT`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`,
|
||||
this parameter can be used instead of the `maximum_angle`}
|
||||
\cgalParamType{`GeomTraits::FT`}
|
||||
|
|
@ -143,7 +143,7 @@ namespace Polygon_mesh {
|
|||
\pre `faces(tmesh).size() > 0`
|
||||
\pre `maximum_distance >= 0`
|
||||
\pre `maximum_angle >= 0 && maximum_angle <= 90`
|
||||
\pre `cosine_value >= 0 && cosine_value <= 1`
|
||||
\pre `cosine_of_maxium_angle >= 0 && cosine_of_maxium_angle <= 1`
|
||||
\pre `minimum_region_size > 0`
|
||||
*/
|
||||
template<typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
|
|
@ -176,7 +176,7 @@ namespace Polygon_mesh {
|
|||
const FT default_cos_value = static_cast<FT>(std::cos(CGAL::to_double(
|
||||
(max_angle * static_cast<FT>(CGAL_PI)) / FT(180))));
|
||||
const FT cos_value = parameters::choose_parameter(
|
||||
parameters::get_parameter(np, internal_np::cosine_value), default_cos_value);
|
||||
parameters::get_parameter(np, internal_np::cosine_of_maxium_angle), default_cos_value);
|
||||
CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1));
|
||||
m_cos_value_threshold = cos_value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace Segment_set {
|
|||
\cgalParamType{`GeomTraits::FT`}
|
||||
\cgalParamDefault{25 degrees}
|
||||
\cgalParamNEnd
|
||||
\cgalParamNBegin{cosine_value}
|
||||
\cgalParamNBegin{cosine_of_maxium_angle}
|
||||
\cgalParamDescription{the cos value computed as `cos(maximum_angle * PI / 180)`,
|
||||
this parameter can be used instead of the `maximum_angle`}
|
||||
\cgalParamType{`GeomTraits::FT`}
|
||||
|
|
@ -152,7 +152,7 @@ namespace Segment_set {
|
|||
|
||||
\pre `maximum_distance >= 0`
|
||||
\pre `maximum_angle >= 0 && maximum_angle <= 90`
|
||||
\pre `cosine_value >= 0 && cosine_value <= 1`
|
||||
\pre `cosine_of_maxium_angle >= 0 && cosine_of_maxium_angle <= 1`
|
||||
\pre `minimum_region_size > 0`
|
||||
*/
|
||||
template<typename NamedParameters = parameters::Default_named_parameters>
|
||||
|
|
@ -182,7 +182,7 @@ namespace Segment_set {
|
|||
const FT default_cos_value = static_cast<FT>(std::cos(CGAL::to_double(
|
||||
(max_angle * static_cast<FT>(CGAL_PI)) / FT(180))));
|
||||
const FT cos_value = parameters::choose_parameter(
|
||||
parameters::get_parameter(np, internal_np::cosine_value), default_cos_value);
|
||||
parameters::get_parameter(np, internal_np::cosine_of_maxium_angle), default_cos_value);
|
||||
CGAL_precondition(cos_value >= FT(0) && cos_value <= FT(1));
|
||||
m_cos_value_threshold = cos_value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ void test_copied_point_cloud (const Point_set& original_points, std::size_t nb)
|
|||
RG_region rg_region (
|
||||
CGAL::parameters::
|
||||
maximum_distance(parameters.epsilon).
|
||||
cosine_value(parameters.normal_threshold).
|
||||
cosine_of_maxium_angle(parameters.normal_threshold).
|
||||
minimum_region_size(parameters.min_points));
|
||||
Region_growing region_growing (points, rg_query, rg_region);
|
||||
std::size_t nb_detected = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue