mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 21:40:42 +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
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include <components/bullethelpers/operators.hpp>
|
#include <components/bullethelpers/operators.hpp>
|
||||||
#include <components/detournavigator/debug.hpp>
|
#include <components/detournavigator/debug.hpp>
|
||||||
#include <components/osghelpers/operators.hpp>
|
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
@ -115,17 +115,6 @@ static std::ostream& operator <<(std::ostream& stream, const btCollisionShape* v
|
|||||||
return value ? stream << "&" << *value : stream << "nullptr";
|
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
|
namespace std
|
||||||
{
|
{
|
||||||
static std::ostream& operator <<(std::ostream& stream, const map<int, int>& value)
|
static std::ostream& operator <<(std::ostream& stream, const map<int, int>& value)
|
||||||
@ -153,7 +142,7 @@ namespace Resource
|
|||||||
return stream << "Resource::BulletShape {"
|
return stream << "Resource::BulletShape {"
|
||||||
<< value.mCollisionShape << ", "
|
<< value.mCollisionShape << ", "
|
||||||
<< value.mAvoidCollisionShape << ", "
|
<< value.mAvoidCollisionShape << ", "
|
||||||
<< value.mCollisionBoxHalfExtents << ", "
|
<< "osg::Vec3f {" << value.mCollisionBoxHalfExtents << "}" << ", "
|
||||||
<< value.mAnimatedShapes
|
<< value.mAnimatedShapes
|
||||||
<< "}";
|
<< "}";
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <osg/io_utils>
|
||||||
|
|
||||||
namespace Debug
|
namespace Debug
|
||||||
{
|
{
|
||||||
enum Level
|
enum Level
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
|
|
||||||
#include "tilebounds.hpp"
|
#include "tilebounds.hpp"
|
||||||
|
|
||||||
|
#include <osg/io_utils>
|
||||||
|
|
||||||
#include <components/bullethelpers/operators.hpp>
|
#include <components/bullethelpers/operators.hpp>
|
||||||
#include <components/misc/guarded.hpp>
|
#include <components/misc/guarded.hpp>
|
||||||
#include <components/osghelpers/operators.hpp>
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <fstream>
|
#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…
x
Reference in New Issue
Block a user