mirror of https://github.com/CGAL/cgal
rename plane_plus_line to plane_and_line
This commit is contained in:
parent
2532df1eaf
commit
82e9d4e5b9
|
|
@ -36,11 +36,11 @@ typedef SMS::GarlandHeckbert_plane_policies<Surface_mesh, Kernel>
|
|||
typedef SMS::GarlandHeckbert_probabilistic_plane_policies<Surface_mesh, Kernel> Prob_plane;
|
||||
typedef SMS::GarlandHeckbert_triangle_policies<Surface_mesh, Kernel> Classic_tri;
|
||||
typedef SMS::GarlandHeckbert_probabilistic_triangle_policies<Surface_mesh, Kernel> Prob_tri;
|
||||
typedef SMS::GarlandHeckbert_policies<Surface_mesh, Kernel> Classic_plane_plus_line;
|
||||
typedef SMS::GarlandHeckbert_policies<Surface_mesh, Kernel> Classic_plane_and_line;
|
||||
|
||||
// Old policies composed with line policies
|
||||
typedef SMS::internal::GarlandHeckbert_line_policies<Surface_mesh, Kernel> Line_quadric;
|
||||
typedef SMS::internal::GarlandHeckbert_composed_policies<Surface_mesh, Kernel, Prob_plane, Line_quadric> Proba_plane_plus_line;
|
||||
typedef SMS::internal::GarlandHeckbert_composed_policies<Surface_mesh, Kernel, Prob_plane, Line_quadric> Proba_plane_and_line;
|
||||
typedef SMS::internal::GarlandHeckbert_composed_policies<Surface_mesh, Kernel, Classic_tri, Line_quadric> Classic_tri_plus_line;
|
||||
typedef SMS::internal::GarlandHeckbert_composed_policies<Surface_mesh, Kernel, Prob_tri, Line_quadric> Proba_tri_plus_line;
|
||||
|
||||
|
|
@ -125,15 +125,15 @@ int main(int argc, char** argv)
|
|||
else if(policy == "Prob_triangle")
|
||||
time=collapse_gh(tmesh, ratio, Prob_tri(tmesh));
|
||||
else if(policy == "Plane_plus_line_0.1")
|
||||
time=collapse_gh(tmesh, ratio, Classic_plane_plus_line(tmesh, 100, 0.1));
|
||||
time=collapse_gh(tmesh, ratio, Classic_plane_and_line(tmesh, 100, 0.1));
|
||||
else if(policy == "Plane_plus_line_0.01")
|
||||
time=collapse_gh(tmesh, ratio, Classic_plane_plus_line(tmesh, 100, 0.01));
|
||||
time=collapse_gh(tmesh, ratio, Classic_plane_and_line(tmesh, 100, 0.01));
|
||||
else if(policy == "Plane_plus_line_0.001")
|
||||
time=collapse_gh(tmesh, ratio, Classic_plane_plus_line(tmesh, 100, 0.001));
|
||||
time=collapse_gh(tmesh, ratio, Classic_plane_and_line(tmesh, 100, 0.001));
|
||||
else if(policy == "Classic_tri_line")
|
||||
time=collapse_gh(tmesh, ratio, Classic_tri_plus_line(tmesh, 100));
|
||||
else if(policy == "Proba_plane_line")
|
||||
time=collapse_gh(tmesh, ratio, Proba_plane_plus_line(tmesh, Prob_plane(tmesh), Line_quadric(tmesh), 100));
|
||||
time=collapse_gh(tmesh, ratio, Proba_plane_and_line(tmesh, Prob_plane(tmesh), Line_quadric(tmesh), 100));
|
||||
else if(policy == "Proba_tri_line")
|
||||
time=collapse_gh(tmesh, ratio, Proba_tri_plus_line(tmesh, Prob_tri(tmesh), Line_quadric(tmesh), 100));
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ These policies depend on the third party \ref thirdpartyEigen library.
|
|||
\sa `GarlandHeckbert_probabilistic_plane_policies`
|
||||
\sa `GarlandHeckbert_triangle_policies`
|
||||
\sa `GarlandHeckbert_probabilistic_triangle_policies`
|
||||
\sa `GarlandHeckbert_plane_plus_line_policies`
|
||||
\sa `GarlandHeckbert_plane_and_line_policies`
|
||||
*/
|
||||
template <typename TriangleMesh, typename GeomTraits>
|
||||
class GarlandHeckbert_plane_policies
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Surface_mesh_simplification {
|
|||
|
||||
since \cgal 6.2, this class is an alias for the current state of the art of Garland-Heckbert policies
|
||||
(Section \ref SurfaceMeshSimplificationGarlandHeckbertStrategy).
|
||||
It is currently an alias of `GarlandHeckbert_plane_plus_line_policies`.
|
||||
It is currently an alias of `GarlandHeckbert_plane_and_line_policies`.
|
||||
|
||||
The class `GarlandHeckbert_policies` regroups the cost and placement policies
|
||||
based on the Garland-Heckbert strategy (Section \ref SurfaceMeshSimplificationGarlandHeckbertStrategy),
|
||||
|
|
@ -27,7 +27,7 @@ These policies depend on the third party \ref thirdpartyEigen library.
|
|||
\sa `GarlandHeckbert_probabilistic_plane_policies`
|
||||
\sa `GarlandHeckbert_triangle_policies`
|
||||
\sa `GarlandHeckbert_probabilistic_triangle_policies`
|
||||
\sa `GarlandHeckbert_plane_plus_line_policies`
|
||||
\sa `GarlandHeckbert_plane_and_line_policies`
|
||||
|
||||
*/
|
||||
template <typename TriangleMesh, typename GeomTraits>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ These policies depend on the third party \ref thirdpartyEigen library.
|
|||
\sa `GarlandHeckbert_plane_policies`
|
||||
\sa `GarlandHeckbert_triangle_policies`
|
||||
\sa `GarlandHeckbert_probabilistic_triangle_policies`
|
||||
\sa `GarlandHeckbert_plane_plus_line_policies`
|
||||
\sa `GarlandHeckbert_plane_and_line_policies`
|
||||
*/
|
||||
template <typename TriangleMesh, typename GeomTraits>
|
||||
class GarlandHeckbert_probabilistic_plane_policies
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ These policies depend on the third party \ref thirdpartyEigen library.
|
|||
\sa `GarlandHeckbert_plane_policies`
|
||||
\sa `GarlandHeckbert_probabilistic_plane_policies`
|
||||
\sa `GarlandHeckbert_triangle_policies`
|
||||
\sa `GarlandHeckbert_plane_plus_line_policies`
|
||||
\sa `GarlandHeckbert_plane_and_line_policies`
|
||||
*/
|
||||
template <typename TriangleMesh, typename GeomTraits>
|
||||
class GarlandHeckbert_probabilistic_triangle_policies
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
- `CGAL::Surface_mesh_simplification::GarlandHeckbert_probabilistic_plane_policies<TriangleMesh, GeomTraits>`
|
||||
- `CGAL::Surface_mesh_simplification::GarlandHeckbert_triangle_policies<TriangleMesh, GeomTraits>`
|
||||
- `CGAL::Surface_mesh_simplification::GarlandHeckbert_probabilistic_triangle_policies<TriangleMesh, GeomTraits>`
|
||||
- `CGAL::Surface_mesh_simplification::GarlandHeckbert_plane_plus_line_policies<TriangleMesh, GeomTraits>`
|
||||
- `CGAL::Surface_mesh_simplification::GarlandHeckbert_plane_and_line_policies<TriangleMesh, GeomTraits>`
|
||||
- `CGAL::Surface_mesh_simplification::GarlandHeckbert_policies<TriangleMesh, GeomTraits>`
|
||||
|
||||
\cgalCRPSection{Policy Enhancements}
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ The implementation of the Garland-Heckbert simplification policies is the result
|
|||
of Baskın Şenbaşlar (Google Summer of Code 2019), and Julian Komaromy (Google Summer of Code 2021)
|
||||
They both were mentored by Mael Rouxel-Labbé, who also contributed to the code and to the documentation.
|
||||
|
||||
Valque Léo added the `GarlandHeckbert_plane_plus_line_policies` functionality in \cgal 6.2.
|
||||
Valque Léo added the `GarlandHeckbert_plane_and_line_policies` functionality in \cgal 6.2.
|
||||
|
||||
*/
|
||||
} /* namespace CGAL */
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ typedef SMS::GarlandHeckbert_plane_policies<Surface_mesh, Kernel>
|
|||
typedef SMS::GarlandHeckbert_probabilistic_plane_policies<Surface_mesh, Kernel> Prob_plane;
|
||||
typedef SMS::GarlandHeckbert_triangle_policies<Surface_mesh, Kernel> Classic_tri;
|
||||
typedef SMS::GarlandHeckbert_probabilistic_triangle_policies<Surface_mesh, Kernel> Prob_tri;
|
||||
typedef SMS::GarlandHeckbert_plane_plus_line_policies<Surface_mesh, Kernel> Plane_plus_line;
|
||||
typedef SMS::GarlandHeckbert_plane_and_line_policies<Surface_mesh, Kernel> Plane_and_line;
|
||||
|
||||
template <typename GHPolicies>
|
||||
void collapse_gh(Surface_mesh& mesh,
|
||||
|
|
@ -60,7 +60,7 @@ void collapse_gh(Surface_mesh& mesh,
|
|||
|
||||
// Usage:
|
||||
// ./command [input] [ratio] [policy] [output]
|
||||
// policy can be "cp" (classic plane), "ct" (classic triangle), "pp" (probabilistic plane), "pt" (probabilistic triangle), "pl" (plane plus line)
|
||||
// policy can be "cp" (classic plane), "ct" (classic triangle), "pp" (probabilistic plane), "pt" (probabilistic triangle), "pl" (plane and line)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Surface_mesh mesh;
|
||||
|
|
@ -95,7 +95,7 @@ int main(int argc, char** argv)
|
|||
else if(policy == "pt")
|
||||
collapse_gh<Prob_tri>(mesh, ratio);
|
||||
else
|
||||
collapse_gh<Plane_plus_line>(mesh, ratio);
|
||||
collapse_gh<Plane_and_line>(mesh, ratio);
|
||||
|
||||
CGAL::IO::write_polygon_mesh((argc > 4) ? argv[4] : "out.off", mesh, CGAL::parameters::stream_precision(17));
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
//
|
||||
// Author(s) : Leo Valque
|
||||
|
||||
#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_PLUS_LINE_POLICIES_H
|
||||
#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_PLUS_LINE_POLICIES_H
|
||||
#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_AND_LINE_POLICIES_H
|
||||
#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_AND_LINE_POLICIES_H
|
||||
|
||||
#include <CGAL/license/Surface_mesh_simplification.h>
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ namespace CGAL {
|
|||
namespace Surface_mesh_simplification {
|
||||
|
||||
template<typename TriangleMesh, typename GeomTraits>
|
||||
class GarlandHeckbert_plane_plus_line_policies
|
||||
class GarlandHeckbert_plane_and_line_policies
|
||||
: public internal::GarlandHeckbert_composed_policies<TriangleMesh, GeomTraits,
|
||||
GarlandHeckbert_plane_policies<TriangleMesh, GeomTraits>,
|
||||
internal::GarlandHeckbert_line_policies<TriangleMesh, GeomTraits>,
|
||||
|
|
@ -42,7 +42,7 @@ public:
|
|||
typedef typename GeomTraits::FT FT;
|
||||
|
||||
public:
|
||||
GarlandHeckbert_plane_plus_line_policies(TriangleMesh& tmesh,
|
||||
GarlandHeckbert_plane_and_line_policies(TriangleMesh& tmesh,
|
||||
const FT dm = FT(100),
|
||||
const FT line_weight=FT(0.01))
|
||||
: Base(tmesh, FT(1.)/line_weight, dm)
|
||||
|
|
@ -57,4 +57,4 @@ public:
|
|||
} // namespace Surface_mesh_simplification
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_PLUS_LINE_POLICIES_H
|
||||
#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_GARLANDHECKBERT_PLANE_AND_LINE_POLICIES_H
|
||||
|
|
@ -21,13 +21,13 @@
|
|||
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_triangle_policies.h>
|
||||
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_plane_policies.h>
|
||||
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_probabilistic_triangle_policies.h>
|
||||
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_plus_line_policies.h>
|
||||
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/GarlandHeckbert_plane_and_line_policies.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Surface_mesh_simplification {
|
||||
|
||||
template<typename TriangleMesh, typename GeomTraits>
|
||||
using GarlandHeckbert_policies = GarlandHeckbert_plane_plus_line_policies<TriangleMesh, GeomTraits>;
|
||||
using GarlandHeckbert_policies = GarlandHeckbert_plane_and_line_policies<TriangleMesh, GeomTraits>;
|
||||
|
||||
} // namespace Surface_mesh_simplification
|
||||
} // namespace CGAL
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ typedef SMS::GarlandHeckbert_plane_policies<Surface_mesh, Kernel>
|
|||
typedef SMS::GarlandHeckbert_probabilistic_plane_policies<Surface_mesh, Kernel> Prob_plane;
|
||||
typedef SMS::GarlandHeckbert_triangle_policies<Surface_mesh, Kernel> Classic_tri;
|
||||
typedef SMS::GarlandHeckbert_probabilistic_triangle_policies<Surface_mesh, Kernel> Prob_tri;
|
||||
typedef SMS::GarlandHeckbert_plane_plus_line_policies<Surface_mesh, Kernel> Classic_plane_plus_line;
|
||||
typedef SMS::GarlandHeckbert_plane_and_line_policies<Surface_mesh, Kernel> Classic_plane_and_line;
|
||||
|
||||
// settings for benchmarking - throw away the first n_burns results and keep the n_samples samples
|
||||
constexpr int n_burns = 1;
|
||||
|
|
@ -42,7 +42,7 @@ constexpr std::size_t classic_plane_index = 0;
|
|||
constexpr std::size_t prob_plane_index = 1;
|
||||
constexpr std::size_t classic_tri_index = 2;
|
||||
constexpr std::size_t prob_tri_index = 3;
|
||||
constexpr std::size_t plane_plus_line_index = 4;
|
||||
constexpr std::size_t plane_and_line_index = 4;
|
||||
|
||||
// =================================================================================================
|
||||
// =================================================================================================
|
||||
|
|
@ -157,7 +157,7 @@ void time_all_policies(const TriangleMesh& mesh,
|
|||
time_mesh<Classic_tri>(mesh, out);
|
||||
time_mesh<Prob_plane>(mesh, out);
|
||||
time_mesh<Prob_tri>(mesh, out);
|
||||
time_mesh<Classic_plane_plus_line>(mesh, out);
|
||||
time_mesh<Classic_plane_and_line>(mesh, out);
|
||||
}
|
||||
|
||||
// =================================================================================================
|
||||
|
|
@ -193,7 +193,7 @@ std::array<FT, 5> hausdorff_errors(const TriangleMesh& mesh,
|
|||
ret[prob_plane_index] = hausdorff_error<Prob_plane>(mesh, ratio);
|
||||
ret[classic_tri_index] = hausdorff_error<Classic_tri>(mesh, ratio);
|
||||
ret[prob_tri_index] = hausdorff_error<Prob_tri>(mesh, ratio);
|
||||
ret[plane_plus_line_index] = hausdorff_error<Classic_plane_plus_line>(mesh, ratio);
|
||||
ret[plane_and_line_index] = hausdorff_error<Classic_plane_and_line>(mesh, ratio);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -214,7 +214,7 @@ void hausdorff_errors(const TriangleMesh& mesh,
|
|||
out << "prob plane : " << errs[prob_plane_index] << std::endl;
|
||||
out << "classic tri : " << errs[classic_tri_index] << std::endl;
|
||||
out << "prob tri : " << errs[prob_tri_index] << std::endl;
|
||||
out << "plane + line : " << errs[plane_plus_line_index] << std::endl;
|
||||
out << "plane + line : " << errs[plane_and_line_index] << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ void gather_face_aspect_ratio(const TriangleMesh& mesh,
|
|||
edge_collapse<Prob_plane>(pp);
|
||||
edge_collapse<Classic_tri>(ct);
|
||||
edge_collapse<Prob_tri>(pt);
|
||||
edge_collapse<Classic_plane_plus_line>(pl);
|
||||
edge_collapse<Classic_plane_and_line>(pl);
|
||||
|
||||
out << "Face aspect-ratio: classic plane\n";
|
||||
write_aspect_ratios(cp, out);
|
||||
|
|
@ -258,7 +258,7 @@ void gather_face_aspect_ratio(const TriangleMesh& mesh,
|
|||
write_aspect_ratios(ct, out);
|
||||
out << "Face aspect-ratio: prob triangle\n";
|
||||
write_aspect_ratios(pt, out);
|
||||
out << "Face aspect-ratio: classic plane plus line\n";
|
||||
out << "Face aspect-ratio: classic plane and line\n";
|
||||
write_aspect_ratios(pl, out);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue