Go to the documentation of this file.
13 #include <OpenMesh/Core/IO/MeshIO.hh>
15 #define CGAL_USE_OM_POINTS
16 #include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
17 #include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h>
21 #ifdef USE_GENERIC_READER_WRITER
37 #define USE_OPENMESH_DOUBLE_TRAITS
38 #ifdef USE_OPENMESH_DOUBLE_TRAITS
53 typedef OpenMesh::PolyMesh_ArrayKernelT<
54 #ifdef USE_OPENMESH_DOUBLE_TRAITS
61 typedef boost::vector_property_map<
63 typename boost::property_map< Mesh, boost::vertex_index_t >::const_type >
67 #ifdef USE_GENERIC_READER_WRITER
71 std::ifstream in(filename);
74 std::cout <<
"reading failed";
79 auto pos_pm =
get(boost::vertex_point, m);
81 BarycenterMap barycenters_pm(
get(boost::vertex_index, m));
82 const auto pos_pm_const =
get(boost::vertex_point, m);
84 m, pos_pm_const, barycenters_pm, 0.2f);
88 m, pos_pm, barycenters_pm, 0.2f);
92 m, pos_pm, barycenters_pm, 0.2f);
95 #ifdef USE_GENERIC_READER_WRITER
107 std::cout <<
"writing failed";
111 std::cout <<
"Done." << std::endl;
120 std::cout <<
"Usage: " << argv[0]
121 <<
" filename; filename being an off file." << std::endl;
void calculate_vertices_one_ring_geometric_laplacian(const FaceGraph &g, const PointMap &pm, CentroidMap geom_laplacians_pm, const typename GeometryTraits::Scalar smoothing_factor, const GeometryTraits >)
Compute geometric laplacians for all vertices and store them in geom_laplacians_pm.
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
std::map< std::string, boost::any > PMapsContainer
std::string get_file_name(const std::string &file_name)
FEVV::PCLPointCloudPointMap::value_type get(const FEVV::PCLPointCloudPointMap &pm, FEVV::PCLPointCloudPointMap::key_type key)
Specialization of get(point_map, key) for PCLPointCloud.
void reposition_vertices(const PropertyGraph &g, PointMap pm, const NewPointMap &smoothed_pm, const GeometryTraits &)
Apply new vertex positions to vertex position property map.
Interfaces for plugins These interfaces will be used for different plugins.
void read_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps, bool=false)
Load mesh from file.
std::string get_file_extension(const std::string &file_name)
FEVV::DataStructures::AIF::AIFMesh Mesh
void write_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps)
Write mesh to file.
int main(int narg, char **argv)
This class represents an AIF structure. AIF structure can deal with both manifold and non-manifold su...
void test_smoothing_open_mesh(char *filename)
void calculate_vertices_one_ring_angles_based_centroid(const FaceGraph &g, const PointMap &pm, CentroidMap angles_based_centroids_pm, const typename GeometryTraits::Scalar smoothing_factor, const GeometryTraits >)
Compute angle-based centroids for all vertices and store them in bangles_based_centroids_pm.
void calculate_vertices_one_ring_barycenter(const FaceGraph &g, const PointMap &pm, CentroidMap barycenters_pm, const typename GeometryTraits::Scalar smoothing_factor, const GeometryTraits >)
Compute barycenters for all vertices and store them in barycenters_pm.