Go to the documentation of this file.
14 #include <CGAL/Surface_mesh.h>
15 #include <CGAL/Cartesian.h>
18 #include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
35 typedef CGAL::Cartesian< double >
Kernel;
36 typedef Kernel::Point_3
Point;
37 typedef Kernel::Vector_3
Vector;
38 typedef CGAL::Surface_mesh< Point >
Mesh;
41 std::ifstream in(filename);
47 catch(
const std::length_error &le)
49 std::cerr <<
"[SurfaceMesh] Exception caught while reading input file "
50 << filename <<
": " << le.what() << std::endl;
52 false,
"[SurfaceMesh] Exception caught while reading input file.");
55 auto pos_pm =
get(CGAL::vertex_point, m);
58 Mesh::Property_map< Mesh::Face_index, Vector > normals;
59 normals = m.add_property_map< Mesh::Face_index,
Vector >(
"f:Normal").first;
84 std::cout <<
"Done." << std::endl;
89 main(
int narg,
char **argv)
94 <<
"Usage: test-surface-mesh filename; filename being an off file."
int main(int narg, char **argv)
void print_points(const HalfedgeGraph &g, PointMap pm)
Print all vertices coordinates.
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.
void test_surface_mesh(char *filename)
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...
FEVV::DataStructures::AIF::AIFMesh Mesh
This class represents an AIF structure. AIF structure can deal with both manifold and non-manifold su...