MEPP2 Project
DataStructures_openmesh.h
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.
11 #pragma once
12 
13 #include <OpenMesh/Core/IO/MeshIO.hh>
14 
15 // force usage of OpenMesh native Point type instead of CGAL Point type
16 // in point map in properties_PolyMesh_ArrayKernelT.h
17 #define CGAL_USE_OM_POINTS
18 #include <CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h>
19 #include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h>
20 
21 namespace FEVV {
22 
23 /* From :
24 http://www.openmesh.org/media/Documentations/OpenMesh-Doc-Latest/a00012.html
25 
26 --> The default traits class looks like this:
27 struct DefaultTraits
28 {
29  typedef Vec3f Point;
30  typedef Vec3f Normal;
31  typedef Vec2f TexCoord;
32  typedef Vec3uc Color;
33  VertexTraits {};
34  HalfedgeTraits {};
35  EdgeTraits {};
36  FaceTraits {};
37 
38  VertexAttributes(0);
39  HalfedgeAttributes(Attributes::PrevHalfedge);
40  EdgeAttributes(0);
41  FaceAttributes(0);
42 };*/
43 
44 struct MyTraits : public OpenMesh::DefaultTraits
45 {
46  typedef OpenMesh::Vec3d Point; // use double-values
47  typedef OpenMesh::Vec3d Normal; // use double-values
48  typedef OpenMesh::Vec2d TexCoord; // use double-values
49 };
50 
51 using MeshOpenMesh = OpenMesh::PolyMesh_ArrayKernelT< MyTraits >;
52 
53 } // namespace FEVV
54 
FEVV::MyTraits::TexCoord
OpenMesh::Vec2d TexCoord
Definition: DataStructures_openmesh.h:48
FEVV::MyTraits
Definition: DataStructures_openmesh.h:45
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::MyTraits::Point
OpenMesh::Vec3d Point
Definition: DataStructures_openmesh.h:46
FEVV::MeshOpenMesh
OpenMesh::PolyMesh_ArrayKernelT< MyTraits > MeshOpenMesh
Definition: DataStructures_openmesh.h:51
FEVV::MyTraits::Normal
OpenMesh::Vec3d Normal
Definition: DataStructures_openmesh.h:47