Go to the documentation of this file.
13 #include <CGAL/Cartesian.h>
16 #include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
18 #include <CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h>
21 #include <CGAL/Linear_cell_complex_incremental_builder.h>
34 typedef CGAL::Cartesian< double >
Kernel;
37 typedef CGAL::Linear_cell_complex_traits< 3, Kernel >
MyTraits;
41 template<
class Refs >
47 typedef CGAL::cpp11::tuple< Vertex_attribute, void, Face_attribute >
53 Linear_cell_complex_for_combinatorial_map< 2, 3, MyTraits, Myitem >
61 std::ifstream in(filename);
65 CGAL::read_off(in, lcc);
66 lcc.display_characteristics(std::cout);
68 catch(
const std::length_error &le)
70 std::cerr <<
"[LCC] Exception caught while reading input file " << filename
71 <<
": " << le.what() << std::endl;
72 BOOST_ASSERT_MSG(
false,
"[LCC] Exception caught while reading input file.");
75 auto pos_pm =
get(boost::vertex_point, lcc);
78 typedef boost::property_map< LCC, boost::face_index_t >::const_type
80 boost::vector_property_map< Vector, Face_index_map > normals(
81 get(boost::face_index, lcc));
100 typedef boost::vector_property_map<
102 typename boost::property_map< LCC, boost::vertex_index_t >::const_type >
105 BarycenterMap barycenters_pm(
get(boost::vertex_index, lcc));
107 lcc, pos_pm, barycenters_pm);
120 std::cout <<
"Done." << std::endl;
129 std::cout <<
"Usage: test-linear-cell-complex filename;"
130 " filename being an off file."
CGAL::Cartesian< double > Kernel
void print_points(const HalfedgeGraph &g, PointMap pm)
Print all vertices coordinates.
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
void print_face_normals(const HalfedgeGraph &g, NormalMap nm)
Print all faces normals.
CGAL::Linear_cell_complex_for_combinatorial_map< 2, 3, MyTraits, Myitem > LCC
CGAL::Cell_attribute_with_id< Refs > Face_attribute
void calculate_scaling(Graph &g, PointMap &pm, typename GeometryTraits::Scalar scale_x, typename GeometryTraits::Scalar scale_y, typename GeometryTraits::Scalar scale_z, const GeometryTraits >)
Scale a mesh.
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 test_linear_cell_complex(char *filename)
void calculate_face_normals(const HalfedgeGraph &g, const PointMap &pm, FaceNormalMap fnm, const GeometryTraits >)
Calculate "some" normal of all the faces of the considered mesh and populate the argument provided Fa...
CGAL::Cell_attribute_with_point_and_id< Refs > Vertex_attribute
CGAL::Tag_true Darts_with_id
CGAL::Linear_cell_complex_traits< 3, Kernel > MyTraits
CGAL::cpp11::tuple< Vertex_attribute, void, Face_attribute > Attributes
int main(int narg, char **argv)
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.