mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 22:45:33 +00:00
Merge pull request #2001 from AnyOldName3/enable-osg-logging
Allow OSG objects to be sent to the debug log.
This commit is contained in:
commit
0208cb8616
5 changed files with 5 additions and 49 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <components/bullethelpers/operators.hpp>
|
||||
#include <components/detournavigator/debug.hpp>
|
||||
#include <components/osghelpers/operators.hpp>
|
||||
|
||||
#include <deque>
|
||||
#include <iomanip>
|
||||
|
|
|
@ -115,17 +115,6 @@ static std::ostream& operator <<(std::ostream& stream, const btCollisionShape* v
|
|||
return value ? stream << "&" << *value : stream << "nullptr";
|
||||
}
|
||||
|
||||
namespace osg
|
||||
{
|
||||
static std::ostream& operator <<(std::ostream& stream, const Vec3f& value)
|
||||
{
|
||||
return stream << "osg::Vec3f {"
|
||||
<< value.x() << ", "
|
||||
<< value.y() << ", "
|
||||
<< value.z() << "}";
|
||||
}
|
||||
}
|
||||
|
||||
namespace std
|
||||
{
|
||||
static std::ostream& operator <<(std::ostream& stream, const map<int, int>& value)
|
||||
|
@ -153,7 +142,7 @@ namespace Resource
|
|||
return stream << "Resource::BulletShape {"
|
||||
<< value.mCollisionShape << ", "
|
||||
<< value.mAvoidCollisionShape << ", "
|
||||
<< value.mCollisionBoxHalfExtents << ", "
|
||||
<< "osg::Vec3f {" << value.mCollisionBoxHalfExtents << "}" << ", "
|
||||
<< value.mAnimatedShapes
|
||||
<< "}";
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include <mutex>
|
||||
#include <iostream>
|
||||
|
||||
#include <osg/io_utils>
|
||||
|
||||
namespace Debug
|
||||
{
|
||||
enum Level
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
|
||||
#include "tilebounds.hpp"
|
||||
|
||||
#include <osg/io_utils>
|
||||
|
||||
#include <components/bullethelpers/operators.hpp>
|
||||
#include <components/misc/guarded.hpp>
|
||||
#include <components/osghelpers/operators.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
#ifndef OPENMW_COMPONENTS_OSGHELPERS_OPERATORS_H
|
||||
#define OPENMW_COMPONENTS_OSGHELPERS_OPERATORS_H
|
||||
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <ostream>
|
||||
|
||||
#include <osg/Vec2i>
|
||||
#include <osg/Vec2f>
|
||||
#include <osg/Vec3f>
|
||||
|
||||
namespace osg
|
||||
{
|
||||
inline std::ostream& operator <<(std::ostream& stream, const Vec2i& value)
|
||||
{
|
||||
return stream << "osg::Vec2i(" << value.x() << ", " << value.y() << ")";
|
||||
}
|
||||
|
||||
inline std::ostream& operator <<(std::ostream& stream, const Vec2f& value)
|
||||
{
|
||||
return stream << "osg::Vec2f(" << std::setprecision(std::numeric_limits<float>::max_exponent10) << value.x()
|
||||
<< ", " << std::setprecision(std::numeric_limits<float>::max_exponent10) << value.y()
|
||||
<< ')';
|
||||
}
|
||||
|
||||
inline std::ostream& operator <<(std::ostream& stream, const Vec3f& value)
|
||||
{
|
||||
return stream << "osg::Vec3f(" << std::setprecision(std::numeric_limits<float>::max_exponent10) << value.x()
|
||||
<< ", " << std::setprecision(std::numeric_limits<float>::max_exponent10) << value.y()
|
||||
<< ", " << std::setprecision(std::numeric_limits<float>::max_exponent10) << value.z()
|
||||
<< ')';
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue