-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotorcycle.h
43 lines (29 loc) · 853 Bytes
/
motorcycle.h
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
#ifndef MOTORCYCLE_H
#define MOTORCYCLE_H
#include <motorcycleconstants.h>
#include <boost/functional/hash.hpp>
#include <boost/core/noncopyable.hpp>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
using namespace OpenMesh;
class Motorcycle : boost::noncopyable {
private:
MotorcycleConstants::MyMesh polymesh;
std::vector<int> trace;
mutable HalfedgeHandle handle;
public:
const int origin;
Motorcycle(MotorcycleConstants::MyMesh& polymesh, HalfedgeHandle& current);
HalfedgeHandle curr();
HalfedgeHandle next();
HalfedgeHandle step();
bool operator==(const Motorcycle& m) const;
};
namespace std {
template <>
struct hash<Motorcycle> {
std::size_t operator()(const Motorcycle& m) const {
return std::hash<int>()(m.origin);
}
};
};
#endif // MOTORCYCLE_H