]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/snap.h
844af3d14a9be3f9adf45e6130a3d4761439c56c
[r2c2.git] / source / libr2c2 / snap.h
1 #ifndef LIBR2C2_SNAP_H_
2 #define LIBR2C2_SNAP_H_
3
4 namespace R2C2 {
5
6 enum SnapType
7 {
8         SNAP_DEFAULT = 0,
9         NO_SNAP = 0,
10         SNAP_NODE = 1,
11         SNAP_SEGMENT = 2
12 };
13
14 struct Snap
15 {
16         Vector position;
17         float rotation;
18 };
19
20 inline SnapType operator|(SnapType s1, SnapType s2)
21 { return static_cast<SnapType>(static_cast<int>(s1)|static_cast<int>(s2)); }
22
23 } // namespace R2C2
24
25 #endif