MEPP2 Project
Testing
CGAL
Polyhedron
test_spanning_tree_comparator_polyhedron.cpp
Go to the documentation of this file.
1
// Copyright (c) 2012-2022 University of Lyon and CNRS (France).
2
// All rights reserved.
3
//
4
// This file is part of MEPP2; you can redistribute it and/or modify
5
// it under the terms of the GNU Lesser General Public License as
6
// published by the Free Software Foundation; either version 3 of
7
// the License, or (at your option) any later version.
8
//
9
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11
12
#include "
FEVV/DataStructures/DataStructures_cgal_polyhedron_3.h
"
13
14
#include "
FEVV/Wrappings/Geometry_traits_cgal_polyhedron_3.h
"
15
#include "
FEVV/Wrappings/properties_polyhedron_3.h
"
16
17
#include "
FEVV/Tools/Comparator/Spanning_tree_vertex_edge_comparator.hpp
"
18
19
#include "
FEVV/Tools/IO/FileUtilities.hpp
"
20
21
#include <fstream>
22
#include <string>
23
24
using namespace
FEVV
;
25
using namespace
FEVV::Comparator
;
26
27
void
28
testSpanningTreeComparatorSurfaceMesh
(
const
std::string& filename)
29
{
30
std::ifstream in(filename);
31
if
(!in)
32
{
33
std::cout <<
"Unable to read file "
<< filename << std::endl;
34
exit(EXIT_FAILURE);
35
}
36
37
typedef
FEVV::MeshPolyhedron
Mesh
;
38
/**********************************************************************************************************/
39
Mesh
m;
40
in >> m;
41
auto
pos_pm =
get
(boost::vertex_point, m);
42
/**********************************************************************************************************/
43
auto
st =
get_spanning_tree_comparator
(m, pos_pm,
false
);
44
}
45
46
int
47
main
(
int
narg,
char
**argv)
48
{
49
if
(narg < 2)
50
{
51
std::cout <<
"Usage: "
<< argv[0]
52
<<
" filename; filename being an off file."
<< std::endl;
53
exit(EXIT_FAILURE);
54
}
55
56
testSpanningTreeComparatorSurfaceMesh
(argv[1]);
57
return
0;
58
}
FEVV::Comparator
Definition:
Spanning_tree_vertex_edge_comparator.hpp:25
testSpanningTreeComparatorSurfaceMesh
void testSpanningTreeComparatorSurfaceMesh(const std::string &filename)
Definition:
test_spanning_tree_comparator_polyhedron.cpp:28
Geometry_traits_cgal_polyhedron_3.h
FEVV::get
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
Definition:
Graph_properties_pcl_point_cloud.h:117
main
int main(int narg, char **argv)
Definition:
test_spanning_tree_comparator_polyhedron.cpp:47
properties_polyhedron_3.h
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition:
Assert.h:16
FEVV::Comparator::get_spanning_tree_comparator
static Spanning_tree_vertex_edge_comparator< Graph, PointMap, GeometryTraits > get_spanning_tree_comparator(const Graph &g, const PointMap &pm, bool tie_break_detection=true)
Definition:
Spanning_tree_vertex_edge_comparator.hpp:663
Mesh
FEVV::DataStructures::AIF::AIFMesh Mesh
Definition:
test_complying_concepts_aif.cpp:18
FEVV::DataStructures::AIF::AIFMesh
This class represents an AIF structure. AIF structure can deal with both manifold and non-manifold su...
Definition:
AIFMesh.hpp:47
Spanning_tree_vertex_edge_comparator.hpp
FileUtilities.hpp
FEVV::MeshPolyhedron
CGAL::Polyhedron_3< CGALKernel, CGAL::Polyhedron_items_with_id_3 > MeshPolyhedron
Definition:
DataStructures_cgal_polyhedron_3.h:33
DataStructures_cgal_polyhedron_3.h
Generated by
1.8.20