MEPP2 Project
test_calculate_scaling_aif.cpp
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 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.
14 
16 
19 
20 //---------------- specific code above --------------------
21 
22 //---------------- generic code below ---------------------
23 
24 //#include "Testing/Utils/utils_retrieve_halfedge.h"
25 //#include "Testing/Utils/utils_are_meshes_identical.hpp"
27 
29 // include "FEVV/Filters/Generic/generic_writer.hpp"
30 
31 //---------------- generic code above ---------------------
32 
33 //---------------- other code below -----------------------
34 #include <fstream>
35 #include <iostream>
36 
37 void
38 test_calculate_scaling_aif(const std::string &input_file_path)
39 {
40  typedef FEVV::Geometry_traits< MeshT > Geometry;
41  typedef Geometry::Scalar Scalar;
42 
43  // read mesh from file
44  MeshT m;
45  FEVV::PMapsContainer pmaps_bag;
46  FEVV::Filters::read_mesh(input_file_path, m, pmaps_bag);
47 
48  try
49  {
50  auto pos_pm = get(boost::vertex_point, m);
52  m, pos_pm, Scalar(2.0), Scalar(3.0), Scalar(4.0));
53  }
54  catch(...)
55  {
56  std::cout << "processing failed";
57  return;
58  }
59  std::cout << "Done." << std::endl;
60 }
61 
62 //------------------------------------------------------------------------------
63 
64 int
65 main(int narg, char **argv)
66 {
67  if(narg < 2)
68  {
69  std::cout << "Usage: " << argv[0]
70  << " filename; filename being an off file." << std::endl;
71  exit(EXIT_FAILURE);
72  }
73 
75  return 0;
76 }
generic_reader.hpp
FEVV::Geometry_traits
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
Definition: Geometry_traits.h:162
properties_aif.h
FEVV::PMapsContainer
std::map< std::string, boost::any > PMapsContainer
Definition: properties.h:99
FEVV::Filters::calculate_scaling
void calculate_scaling(Graph &g, PointMap &pm, typename GeometryTraits::Scalar scale_x, typename GeometryTraits::Scalar scale_y, typename GeometryTraits::Scalar scale_z, const GeometryTraits &gt)
Scale a mesh.
Definition: scaling.hpp:38
FEVV::AIF_mesh_kernel_generator
AIF specialization. Refer to for concrete usage .
Definition: Geometry_traits_aif.h:31
AIFMesh.hpp
FEVV::Filters::read_mesh
void read_mesh(const std::string &filename, FEVV::CGALPointSet &g, PMapsContainer &pmaps, bool=false)
Load mesh from file.
Definition: cgal_point_set_reader.hpp:110
Graph_traits_aif.h
scaling.hpp
main
int main(int narg, char **argv)
Definition: test_calculate_scaling_aif.cpp:65
Geometry_traits_aif.h
boost::get
boost::property_map< FEVV::DataStructures::AIF::AIFMesh, boost::vertex_index_t >::const_type get(const boost::vertex_index_t &, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the vertex index property map of the mesh.
Definition: Graph_properties_aif.h:108
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
AIFMesh
FEVV::DataStructures::AIF::AIFMesh AIFMesh
Definition: Graph_properties_aif.h:19
test_calculate_scaling_aif
void test_calculate_scaling_aif(const std::string &input_file_path)
Definition: test_calculate_scaling_aif.cpp:38