From Marco Jez, added operator >> for Plane and Quat to io_utils, and added
OSG_EXPORT to PerContextProgram.
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user