mod_geo-tp/src/my_mesh.h

33 lines
867 B
C
Raw Normal View History

2021-09-20 20:36:29 +02:00
#ifndef MY_MESH_H
#define MY_MESH_H
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
#include <OpenMesh/Core/Geometry/VectorT.hh>
2021-10-02 20:47:02 +02:00
#include <QMatrix4x4>
#include <QColor>
2021-09-20 20:36:29 +02:00
struct MyTraits : public OpenMesh::DefaultTraits {
VertexAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Color);
HalfedgeAttributes(OpenMesh::Attributes::PrevHalfedge);
FaceAttributes(OpenMesh::Attributes::Normal);
EdgeAttributes(OpenMesh::Attributes::Color);
typedef OpenMesh::Vec3f Color;
};
2021-10-02 20:47:02 +02:00
class MyMesh : public OpenMesh::PolyMesh_ArrayKernelT<MyTraits> {
public:
QMatrix4x4 transform;
QColor color;
};
2021-10-02 12:03:23 +02:00
typedef MyMesh::FaceHandle FaceHandle;
typedef MyMesh::VertexHandle VertexHandle;
typedef MyMesh::HalfedgeHandle HalfedgeHandle;
typedef MyMesh::EdgeHandle EdgeHandle;
typedef MyMesh::Point Point;
2021-09-20 20:36:29 +02:00
#endif