Moved UByte4 i/ostream support into io_utils.

This commit is contained in:
Robert Osfield 2005-04-08 14:10:22 +00:00
parent b401b97bce
commit f46858c49b
2 changed files with 12 additions and 18 deletions

View File

@ -16,8 +16,6 @@
#include <osg/Vec3>
#include <ostream>
namespace osg {
/** General purpose float quad.
@ -147,19 +145,8 @@ class UByte4
return *this;
}
friend inline std::ostream& operator << (std::ostream& output, const UByte4& vec)
{
output << (int)vec._v[0] << " "
<< (int)vec._v[1] << " "
<< (int)vec._v[2] << " "
<< (int)vec._v[3];
return output; // to enable cascading
}
}; // end of class UByte4
} // end of namespace osg
#endif

View File

@ -17,12 +17,8 @@
#include <ostream>
#include <istream>
#include <osg/Vec2f>
#include <osg/Vec2d>
#include <osg/Vec3f>
#include <osg/Vec3d>
#include <osg/Vec4f>
#include <osg/Vec4d>
#include <osg/UByte4>
#include <osg/Matrixf>
#include <osg/Matrixd>
@ -158,6 +154,17 @@ inline std::ostream& operator<< (std::ostream& os, const Matrixd& m )
return os;
}
//////////////////////////////////////////////////////////////////////////
// UByte4 steaming operators.
inline std::ostream& operator << (std::ostream& output, const UByte4& vec)
{
output << (int)vec._v[0] << " "
<< (int)vec._v[1] << " "
<< (int)vec._v[2] << " "
<< (int)vec._v[3];
return output; // to enable cascading
}
} // end of namespace osg
#endif