Go to the documentation of this file.
12 #include <CGAL/Cartesian.h>
13 #include <CGAL/Polyhedron_3.h>
14 #include <CGAL/Polyhedron_items_with_id_3.h>
15 #include <CGAL/IO/Polyhedron_iostream.h>
17 #include <CGAL/boost/graph/graph_traits_Polyhedron_3.h>
35 typedef CGAL::Cartesian< double >
Kernel;
36 typedef Kernel::Vector_3
Vector;
37 typedef CGAL::Polyhedron_3< Kernel, CGAL::Polyhedron_items_with_id_3 >
39 typedef boost::property_map< Polyhedron, CGAL::face_index_t >::const_type
43 std::ifstream in(filename);
57 catch(
const std::length_error &le)
59 std::cerr <<
"[Polyhedron] Exception caught while reading input file "
60 << filename <<
": " << le.what() << std::endl;
61 BOOST_ASSERT_MSG(
false,
62 "[Polyhedron] Exception caught while reading input file.");
70 boost::vector_property_map< Vector, Face_index_map > normals(
71 get(CGAL::face_index, p));
73 auto pos_pm =
get(CGAL::vertex_point, p);
102 std::cout <<
"Done." << std::endl;
111 std::cout <<
"Usage: a.out filename; filename being an off file."
void translate(const HalfedgeGraph &g, PointMap &pm, typename GeometryTraits::Scalar offset_x, typename GeometryTraits::Scalar offset_y, typename GeometryTraits::Scalar offset_z, const GeometryTraits >)
Translate a mesh.
void test_polyhedron(char *filename)
void print_points(const HalfedgeGraph &g, PointMap pm)
Print all vertices coordinates.
EnrichedPolyhedron::Facet_iterator Facet_iterator
CGAL::Polyhedron_3< Kernel, CGAL::Polyhedron_items_with_id_3 > Polyhedron
void print_face_normals(const HalfedgeGraph &g, NormalMap nm)
Print all faces normals.
CGAL::Cartesian< double > Kernel
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.
Interfaces for plugins These interfaces will be used for different plugins.
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...
int main(int narg, char **argv)