Moved Plane and Quat << operators into the io_utils headers

This commit is contained in:
Robert Osfield 2005-04-15 20:59:24 +00:00
parent d3bdfe49ea
commit f4be038d46
5 changed files with 26 additions and 23 deletions

View File

@ -206,9 +206,6 @@ class OSG_EXPORT Plane
calculateUpperLowerBBCorners(); calculateUpperLowerBBCorners();
} }
friend inline std::ostream& operator << (std::ostream& output, const Plane& pl);
protected: protected:
Vec4 _fv; 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 } // end of namespace
#endif #endif

View File

@ -384,21 +384,10 @@ class OSG_EXPORT Quat
return v + uv + uuv; return v + uv + uuv;
} }
friend inline std::ostream& operator << (std::ostream& output, const Quat& vec);
protected: protected:
}; // end of class prototype }; // 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 } // end of namespace
#endif #endif

View File

@ -21,6 +21,7 @@
#include <osg/UByte4> #include <osg/UByte4>
#include <osg/Matrixf> #include <osg/Matrixf>
#include <osg/Matrixd> #include <osg/Matrixd>
#include <osg/Plane>
namespace osg { 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 } // end of namespace osg
#endif #endif

View File

@ -12,6 +12,7 @@
*/ */
#include <osg/TexGen> #include <osg/TexGen>
#include <osg/Notify> #include <osg/Notify>
#include <osg/io_utils>
using namespace osg; using namespace osg;

View File

@ -3,6 +3,7 @@
#endif #endif
#include "osg/TexGen" #include "osg/TexGen"
#include "osg/io_utils"
#include "osgDB/Registry" #include "osgDB/Registry"
#include "osgDB/Input" #include "osgDB/Input"