From Marco Jez, improvements to osgIntrospection, and new automatically generated

osgWrappers/osg set.
This commit is contained in:
Robert Osfield
2005-04-07 20:00:17 +00:00
parent 5b4482c70d
commit 7a27a0bef7
132 changed files with 8608 additions and 301 deletions

View File

@@ -166,14 +166,24 @@ class Vec2d
return( norm );
}
friend inline std::ostream& operator << (std::ostream& output, const Vec2d& vec)
{
output << vec._v[0] << " "
<< vec._v[1];
return output; // to enable cascading
}
}; // end of class Vec2d
// streaming operators
inline std::ostream& operator << (std::ostream& output, const Vec2d& vec)
{
output << vec._v[0] << " "
<< vec._v[1];
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, Vec2d& vec)
{
input >> vec._v[0] >> vec._v[1];
return input;
}
} // end of namespace osg
#endif

View File

@@ -15,6 +15,7 @@
#define OSG_VEC2F 1
#include <ostream>
#include <istream>
#include <osg/Math>
@@ -162,14 +163,25 @@ class Vec2f
}
return( norm );
}
friend inline std::ostream& operator << (std::ostream& output, const Vec2f& vec)
{
output << vec._v[0] << " " << vec._v[1];
return output; // to enable cascading
}
}; // end of class Vec2f
// streaming operators
inline std::ostream& operator << (std::ostream& output, const Vec2f& vec)
{
output << vec._v[0] << " " << vec._v[1];
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, Vec2f& vec)
{
input >> vec._v[0] >> vec._v[1];
return input;
}
} // end of namespace osg
#endif

View File

@@ -197,10 +197,11 @@ class Vec3d
return( norm );
}
friend inline std::ostream& operator << (std::ostream& output, const Vec3d& vec);
}; // end of class Vec3d
// streaming operators
inline std::ostream& operator << (std::ostream& output, const Vec3d& vec)
{
output << vec._v[0] << " "
@@ -209,6 +210,13 @@ inline std::ostream& operator << (std::ostream& output, const Vec3d& vec)
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, Vec3d& vec)
{
input >> vec._v[0] >> vec._v[1] >> vec._v[2];
return input;
}
} // end of namespace osg
#endif

View File

@@ -15,6 +15,7 @@
#define OSG_VEC3F 1
#include <ostream>
#include <istream>
#include <osg/Vec2f>
#include <osg/Math>
@@ -194,10 +195,10 @@ class Vec3f
return( norm );
}
friend inline std::ostream& operator << (std::ostream& output, const Vec3f& vec);
}; // end of class Vec3f
// streaming operators
inline std::ostream& operator << (std::ostream& output, const Vec3f& vec)
{
output << vec._v[0] << " "
@@ -206,6 +207,12 @@ inline std::ostream& operator << (std::ostream& output, const Vec3f& vec)
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, Vec3f& vec)
{
input >> vec._v[0] >> vec._v[1] >> vec._v[2];
return input;
}
const Vec3f X_AXIS(1.0,0.0,0.0);
const Vec3f Y_AXIS(0.0,1.0,0.0);
const Vec3f Z_AXIS(0.0,0.0,1.0);
@@ -213,3 +220,4 @@ const Vec3f Z_AXIS(0.0,0.0,1.0);
} // end of namespace osg
#endif

View File

@@ -229,18 +229,27 @@ class Vec4f
return( norm );
}
friend inline std::ostream& operator << (std::ostream& output, const Vec4f& vec)
{
output << vec._v[0] << " "
<< vec._v[1] << " "
<< vec._v[2] << " "
<< vec._v[3];
return output; // to enable cascading
}
}; // end of class Vec4f
// streaming operators
inline std::ostream& operator << (std::ostream& output, const Vec4f& vec)
{
output << vec._v[0] << " "
<< vec._v[1] << " "
<< vec._v[2] << " "
<< vec._v[3];
return output; // to enable cascading
}
inline std::istream& operator >> (std::istream& input, Vec4f& vec)
{
input >> vec._v[0] >> vec._v[1] >> vec._v[2] >> vec._v[3];
return input;
}
/** Compute the dot product of a (Vec3,1.0) and a Vec4f. */
inline Vec4f::value_type operator * (const Vec3f& lhs,const Vec4f& rhs)
{
@@ -256,3 +265,4 @@ inline Vec4f::value_type operator * (const Vec4f& lhs,const Vec3f& rhs)
} // end of namespace osg
#endif