diff --git a/include/osg/Plane b/include/osg/Plane index edd768548..053eae247 100644 --- a/include/osg/Plane +++ b/include/osg/Plane @@ -206,9 +206,6 @@ class OSG_EXPORT Plane calculateUpperLowerBBCorners(); } - friend inline std::ostream& operator << (std::ostream& output, const Plane& pl); - - protected: Vec4 _fv; @@ -220,15 +217,6 @@ class OSG_EXPORT Plane }; -inline std::ostream& operator << (std::ostream& output, const Plane& pl) -{ - output << pl._fv[0] << " " - << pl._fv[1] << " " - << pl._fv[2] << " " - << pl._fv[3]; - return output; // to enable cascading -} - } // end of namespace #endif diff --git a/include/osg/Quat b/include/osg/Quat index 42c0f8c66..67cccbdb1 100644 --- a/include/osg/Quat +++ b/include/osg/Quat @@ -383,22 +383,11 @@ class OSG_EXPORT Quat uuv *= 2.0f; return v + uv + uuv; } - - friend inline std::ostream& operator << (std::ostream& output, const Quat& vec); protected: }; // end of class prototype -inline std::ostream& operator << (std::ostream& output, const Quat& vec) -{ - output << vec._v[0] << " " - << vec._v[1] << " " - << vec._v[2] << " " - << vec._v[3]; - return output; // to enable cascading -} - } // end of namespace #endif diff --git a/include/osg/io_utils b/include/osg/io_utils index 1d0016693..a232e786f 100644 --- a/include/osg/io_utils +++ b/include/osg/io_utils @@ -21,6 +21,7 @@ #include #include #include +#include namespace osg { @@ -166,5 +167,28 @@ inline std::ostream& operator << (std::ostream& output, const UByte4& vec) } +////////////////////////////////////////////////////////////////////////// +// Quat steaming operators. +inline std::ostream& operator << (std::ostream& output, const Quat& vec) +{ + output << vec._v[0] << " " + << vec._v[1] << " " + << vec._v[2] << " " + << vec._v[3]; + return output; // to enable cascading +} + + +////////////////////////////////////////////////////////////////////////// +// Plane steaming operators. +inline std::ostream& operator << (std::ostream& output, const Plane& pl) +{ + output << pl[0] << " " + << pl[1] << " " + << pl[2] << " " + << pl[3]; + return output; // to enable cascading +} + } // end of namespace osg #endif diff --git a/src/osg/TexGen.cpp b/src/osg/TexGen.cpp index 58ba0c27a..abd31e299 100644 --- a/src/osg/TexGen.cpp +++ b/src/osg/TexGen.cpp @@ -12,6 +12,7 @@ */ #include #include +#include using namespace osg; diff --git a/src/osgPlugins/osg/TexGen.cpp b/src/osgPlugins/osg/TexGen.cpp index e37b557e2..d9447c1cf 100644 --- a/src/osgPlugins/osg/TexGen.cpp +++ b/src/osgPlugins/osg/TexGen.cpp @@ -3,6 +3,7 @@ #endif #include "osg/TexGen" +#include "osg/io_utils" #include "osgDB/Registry" #include "osgDB/Input"