1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 18:09:43 +00:00

Move operator<< to debug.hpp

This commit is contained in:
elsid 2021-11-05 23:48:48 +01:00
parent 5a6b39f8e0
commit 33bb18850d
No known key found for this signature in database
GPG key ID: D27B8E8D10A2896B
2 changed files with 30 additions and 29 deletions

View file

@ -48,35 +48,6 @@ namespace DetourNavigator
};
return tie(lhs) == tie(rhs);
}
static inline std::ostream& operator<<(std::ostream& s, const Water& v)
{
return s << "Water {" << v.mCellSize << ", " << v.mLevel << "}";
}
static inline std::ostream& operator<<(std::ostream& s, const CellWater& v)
{
return s << "CellWater {" << v.mCellPosition << ", " << v.mWater << "}";
}
static inline std::ostream& operator<<(std::ostream& s, const FlatHeightfield& v)
{
return s << "FlatHeightfield {" << v.mCellPosition << ", " << v.mCellSize << ", " << v.mHeight << "}";
}
static inline std::ostream& operator<<(std::ostream& s, const Heightfield& v)
{
s << "Heightfield {.mCellPosition=" << v.mCellPosition
<< ", .mCellSize=" << v.mCellSize
<< ", .mLength=" << static_cast<int>(v.mLength)
<< ", .mMinHeight=" << v.mMinHeight
<< ", .mMaxHeight=" << v.mMaxHeight
<< ", .mHeights={";
for (float h : v.mHeights)
s << h << ", ";
s << "}";
return s << ", .mOriginalSize=" << v.mOriginalSize << "}";
}
}
namespace

View file

@ -3,6 +3,7 @@
#include "tilebounds.hpp"
#include "status.hpp"
#include "recastmesh.hpp"
#include <osg/io_utils>
@ -39,6 +40,35 @@ namespace DetourNavigator
return stream << "DetourNavigator::Error::" << static_cast<int>(value);
}
inline std::ostream& operator<<(std::ostream& s, const Water& v)
{
return s << "Water {" << v.mCellSize << ", " << v.mLevel << "}";
}
inline std::ostream& operator<<(std::ostream& s, const CellWater& v)
{
return s << "CellWater {" << v.mCellPosition << ", " << v.mWater << "}";
}
inline std::ostream& operator<<(std::ostream& s, const FlatHeightfield& v)
{
return s << "FlatHeightfield {" << v.mCellPosition << ", " << v.mCellSize << ", " << v.mHeight << "}";
}
inline std::ostream& operator<<(std::ostream& s, const Heightfield& v)
{
s << "Heightfield {.mCellPosition=" << v.mCellPosition
<< ", .mCellSize=" << v.mCellSize
<< ", .mLength=" << static_cast<int>(v.mLength)
<< ", .mMinHeight=" << v.mMinHeight
<< ", .mMaxHeight=" << v.mMaxHeight
<< ", .mHeights={";
for (float h : v.mHeights)
s << h << ", ";
s << "}";
return s << ", .mOriginalSize=" << v.mOriginalSize << "}";
}
class RecastMesh;
struct Settings;