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