use eigen types in the mesh

This commit is contained in:
papush! 2021-11-09 22:17:39 +01:00
parent 6c8d12a71d
commit 0c0cc8a907

View File

@ -7,14 +7,17 @@
#include <QMatrix4x4>
#include <QColor>
#include <QVector3D>
#include <OpenMesh/Core/Geometry/EigenVectorT.hh>
struct MyTraits : public OpenMesh::DefaultTraits {
using Point = Eigen::Vector3<qreal>;
using Normal = Eigen::Vector3<qreal>;
using Color = Eigen::Vector3<qreal>;
VertexAttributes(OpenMesh::Attributes::Normal);
HalfedgeAttributes(OpenMesh::Attributes::PrevHalfedge);
FaceAttributes(OpenMesh::Attributes::Normal);
EdgeAttributes(OpenMesh::Attributes::Color);
typedef OpenMesh::Vec3f Color;
};
class MyMesh : public OpenMesh::TriMesh_ArrayKernelT<MyTraits> {