From Marco Jez, added operator >> for Plane and Quat to io_utils, and added

OSG_EXPORT to PerContextProgram.
This commit is contained in:
Robert Osfield
2005-04-16 17:44:11 +00:00
parent 20f26ee011
commit 8bf4a98a91
2 changed files with 20 additions and 1 deletions

View File

@@ -373,7 +373,7 @@ class OSG_EXPORT Program : public osg::StateAttribute
friend class PerContextProgram;
/** PerContextProgram (PCP) is an OSG-internal encapsulation of glPrograms per-GL context. */
class PerContextProgram : public osg::Referenced
class OSG_EXPORT PerContextProgram : public osg::Referenced
{
public:

View File

@@ -166,6 +166,12 @@ inline std::ostream& operator << (std::ostream& output, const UByte4& vec)
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, UByte4& vec)
{
input >> vec._v[0] >> vec._v[1] >> vec._v[2] >> vec._v[3];
return input;
}
//////////////////////////////////////////////////////////////////////////
// Quat steaming operators.
@@ -178,6 +184,13 @@ inline std::ostream& operator << (std::ostream& output, const Quat& vec)
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, Quat& vec)
{
input >> vec._v[0] >> vec._v[1] >> vec._v[2] >> vec._v[3];
return input;
}
//////////////////////////////////////////////////////////////////////////
// Plane steaming operators.
@@ -190,5 +203,11 @@ inline std::ostream& operator << (std::ostream& output, const Plane& pl)
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, Plane& vec)
{
input >> vec[0] >> vec[1] >> vec[2] >> vec[3];
return input;
}
} // end of namespace osg
#endif