OpenMesh 将默认的 float 类型改为 double 类型
Posted VVingerfly
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OpenMesh 将默认的 float 类型改为 double 类型相关的知识,希望对你有一定的参考价值。
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 类型的了。
以上是关于OpenMesh 将默认的 float 类型改为 double 类型的主要内容,如果未能解决你的问题,请参考以下文章