-
Notifications
You must be signed in to change notification settings - Fork 2
/
MyMesh.hxx
53 lines (42 loc) · 1.26 KB
/
MyMesh.hxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
////////////////////////////////////////////////////////////////////
//
// $Id: MyMesh.hxx 2021/06/13 22:12:48 kanai Exp $
//
// Copyright (c) 2021 Takashi Kanai
// Released under the MIT license
//
////////////////////////////////////////////////////////////////////
#ifndef _MYMESH_HXX
#define _MYMESH_HXX 1
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
#include <OpenMesh/Core/Utils/PropertyManager.hh>
struct MyTraits : public OpenMesh::DefaultTraits
{
typedef OpenMesh::Vec3d Point; // use double-values points
typedef OpenMesh::Vec3d Normal; // use double-values points
typedef OpenMesh::Vec2d TexCoord; // use double-values points
};
typedef OpenMesh::TriMesh_ArrayKernelT<MyTraits> MyMesh;
//typedef OpenMesh::TriMesh_ArrayKernelT<> MyMesh;
typedef OpenMesh::Vec3d OMVector3d;
class Elen {
public:
void setLen( double l ) { len_ = l; };
double len() const { return len_; };
private:
double len_;
};
OpenMesh::EPropHandleT<Elen> elen;
// Boundary vertex is fixed or not
class Fixed {
public:
Fixed(): isFixed_(false) {};
~Fixed(){};
bool isFixed() const { return isFixed_; };
void setIsFixed( bool f ) { isFixed_ = f; };
private:
bool isFixed_;
};
OpenMesh::VPropHandleT<Fixed> fffs;
#endif // _MYMESH_HXX