diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-09 07:59:21 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-09 07:59:21 +0200 |
commit | 92124b599a4de4ea072bc80156bd7d1da53d2ef4 (patch) | |
tree | 93bc0a1b5a599be32c8fec4dbc88ab1890ccc4bd /src/point.cpp | |
parent | 3a16258e42b6f198c2fb4bfde45c66ee405adac4 (diff) |
a
Diffstat (limited to 'src/point.cpp')
-rw-r--r-- | src/point.cpp | 23 |
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 |