Added support for serailizing and scripting BoundingBox and BoundingSphere objects

This commit is contained in:
Robert Osfield
2014-02-10 16:44:13 +00:00
parent 3dcca431a9
commit 31e98b51df
15 changed files with 405 additions and 53 deletions

View File

@@ -160,6 +160,18 @@ OutputStream& OutputStream::operator<<( const osg::Plane& p )
{ *this << (double)p[0] << (double)p[1] << (double)p[2] << (double)p[3]; return *this; }
OutputStream& OutputStream::operator<<( const osg::BoundingBoxf& bb)
{ *this << bb.xMin() << bb.yMin() << bb.zMin() << bb.xMax() << bb.yMax() << bb.zMax(); return *this; }
OutputStream& OutputStream::operator<<( const osg::BoundingBoxd& bb)
{ *this << bb.xMin() << bb.yMin() << bb.zMin() << bb.xMax() << bb.yMax() << bb.zMax(); return *this; }
OutputStream& OutputStream::operator<<( const osg::BoundingSpheref& bs)
{ *this << bs.center().x() << bs.center().y() << bs.center().z() << bs.radius(); return *this; }
OutputStream& OutputStream::operator<<( const osg::BoundingSphered& bs)
{ *this << bs.center().x() << bs.center().y() << bs.center().z() << bs.radius(); return *this; }
#if 0
OutputStream& OutputStream::operator<<( const osg::Matrixf& mat )
{