29 lines
908 B
C++
29 lines
908 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>
|
|
|
|
|
|
using namespace OpenMesh;
|
|
using namespace OpenMesh::Attributes;
|
|
|
|
struct MyTraits : public OpenMesh::DefaultTraits {
|
|
// use vertex normals and vertex colors
|
|
VertexAttributes( OpenMesh::Attributes::Normal | OpenMesh::Attributes::Color );
|
|
// store the previous halfedge
|
|
HalfedgeAttributes( OpenMesh::Attributes::PrevHalfedge );
|
|
// use face normals face colors
|
|
FaceAttributes( OpenMesh::Attributes::Normal | OpenMesh::Attributes::Color );
|
|
EdgeAttributes( OpenMesh::Attributes::Color );
|
|
// vertex thickness
|
|
VertexTraits{float thickness; float value; Color faceShadingColor;};
|
|
// edge thickness
|
|
EdgeTraits{float thickness;};
|
|
};
|
|
typedef OpenMesh::TriMesh_ArrayKernelT<MyTraits> MyMesh;
|
|
|
|
|
|
#endif
|