33 lines
853 B
C++
33 lines
853 B
C++
#ifndef MY_MESH_H
|
|
#define MY_MESH_H
|
|
|
|
#include <OpenMesh/Core/IO/MeshIO.hh>
|
|
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
|
|
#include <OpenMesh/Core/Geometry/VectorT.hh>
|
|
#include <QMatrix4x4>
|
|
#include <QColor>
|
|
|
|
|
|
struct MyTraits : public OpenMesh::DefaultTraits {
|
|
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> {
|
|
public:
|
|
QMatrix4x4 transform;
|
|
QColor color = {127, 127, 127};
|
|
};
|
|
|
|
typedef MyMesh::FaceHandle FaceHandle;
|
|
typedef MyMesh::VertexHandle VertexHandle;
|
|
typedef MyMesh::HalfedgeHandle HalfedgeHandle;
|
|
typedef MyMesh::EdgeHandle EdgeHandle;
|
|
typedef MyMesh::Point Point;
|
|
|
|
|
|
#endif
|