Revert "Use OpenMesh::DefaultTraitsDouble directly instead of custom traits"

This reverts commit 16da969e88.

So that it does not bump OpenMesh required version
This commit is contained in:
Mael Rouxel-Labbé 2022-11-28 12:13:50 +01:00
parent 0ecffe2913
commit aee677f289
2 changed files with 21 additions and 5 deletions

View File

@ -22,10 +22,19 @@ public:
mesh.request_face_normals(); mesh.request_face_normals();
} }
private: private:
typedef OpenMesh::TriMesh_ArrayKernelT<OpenMesh::DefaultTraitsDouble> Mesh;
struct MyTraits : public OpenMesh::DefaultTraits
{
typedef OpenMesh::Vec3d Point;
typedef OpenMesh::Vec3d Normal;
};
typedef OpenMesh::TriMesh_ArrayKernelT<MyTraits> Mesh;
Mesh mesh; Mesh mesh;
private: private:
void display_info() void display_info()
{ {

View File

@ -13,7 +13,14 @@
#include <CGAL/Timer.h> #include <CGAL/Timer.h>
typedef OpenMesh::PolyMesh_ArrayKernelT<OpenMesh::DefaultTraitsDouble> Mesh; struct DoubleTraits : public OpenMesh::DefaultTraits
{
typedef OpenMesh::Vec3d Point;
typedef OpenMesh::Vec3d Normal;
};
typedef OpenMesh::PolyMesh_ArrayKernelT<DoubleTraits> Mesh;
typedef Mesh::Point Point; typedef Mesh::Point Point;
typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor; typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Mesh>::vertex_iterator vertex_iterator; typedef boost::graph_traits<Mesh>::vertex_iterator vertex_iterator;