OpenMesh 中默认的数据类型都是 float 类型的,如果要将其默认的 float 类型改为 double 类型,可以这么做:

#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/Handles.hh>
#include <OpenMesh/Core/Mesh/Traits.hh>
struct PolyTraits : public OpenMesh::DefaultTraits {
    typedef OpenMesh::Vec3d Point;
    typedef OpenMesh::Vec3d Normal;
    typedef OpenMesh::Vec4f Color;
};
typedef OpenMesh::PolyMesh_ArrayKernelT<PolyTraits>  MyMesh;

 

这样 Point,Normal 都是 double 类型的了。

相关文章:

  • 2021-10-16
  • 2021-12-15
  • 2022-02-10
  • 2022-12-23
  • 2022-01-07
  • 2021-10-26
  • 2021-08-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-09-28
  • 2022-12-23
  • 2021-08-30
  • 2021-12-02
相关资源
相似解决方案