summaryrefslogtreecommitdiffhomepage
path: root/src/point.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/point.cpp')
-rw-r--r--src/point.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/point.cpp b/src/point.cpp
new file mode 100644
index 00000000..23049a14
--- /dev/null
+++ b/src/point.cpp
@@ -0,0 +1,23 @@
+#include "point.hpp"
+
+namespace floormat {
+
+Debug& operator<<(Debug& dbg, const point& pt)
+{
+ const auto flags = dbg.flags();
+ dbg.setFlags(flags | Debug::Flag::NoSpace);
+
+ auto c = Vector3i(chunk_coords_{pt.coord});
+ auto t = Vector2i(pt.coord.local());
+
+ dbg << "point( ";
+ dbg << c << ", ";
+ dbg << t << ", ";
+ dbg << pt.offset;
+ dbg << " )";
+
+ dbg.setFlags(flags);
+ return dbg;
+}
+
+} // namespace floormat