Added Vector serialization and support in lua plugin top enable script users to set/get vector properties such as osg::Array, osg::PrimitiveSet and children lists.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#ifndef OSGDB_OUTPUTSTREAM
|
||||
#define OSGDB_OUTPUTSTREAM
|
||||
|
||||
#include <osg/Version>
|
||||
#include <osg/Vec2>
|
||||
#include <osg/Vec3>
|
||||
#include <osg/Vec4>
|
||||
@@ -142,17 +143,16 @@ public:
|
||||
OutputStream& operator<<( const osg::BoundingSpheref& bb );
|
||||
OutputStream& operator<<( const osg::BoundingSphered& bb );
|
||||
|
||||
OutputStream& operator<<( const osg::Array* a ) { writeArray(a); return *this; }
|
||||
OutputStream& operator<<( const osg::Image* img ) { writeImage(img); return *this; }
|
||||
OutputStream& operator<<( const osg::PrimitiveSet* p ) { writePrimitiveSet(p); return *this; }
|
||||
OutputStream& operator<<( const osg::Array* a ) { if (OPENSCENEGRAPH_SOVERSION>=112) writeObject(a); else writeArray(a); return *this; }
|
||||
OutputStream& operator<<( const osg::PrimitiveSet* p ) { if (OPENSCENEGRAPH_SOVERSION>=112) writeObject(p); else writePrimitiveSet(p); return *this; }
|
||||
OutputStream& operator<<( const osg::Object* obj ) { writeObject(obj); return *this; }
|
||||
|
||||
OutputStream& operator<<( const osg::ref_ptr<osg::Array>& ptr ) { writeArray(ptr.get()); return *this; }
|
||||
OutputStream& operator<<( const osg::ref_ptr<osg::Image>& ptr ) { writeImage(ptr.get()); return *this; }
|
||||
OutputStream& operator<<( const osg::ref_ptr<osg::PrimitiveSet>& ptr ) { writePrimitiveSet(ptr.get()); return *this; }
|
||||
OutputStream& operator<<( const osg::ref_ptr<osg::Array>& ptr ) { if (OPENSCENEGRAPH_SOVERSION>=112) writeObject(ptr.get()); else writeArray(ptr.get()); return *this; }
|
||||
OutputStream& operator<<( const osg::ref_ptr<osg::PrimitiveSet>& ptr ) { if (OPENSCENEGRAPH_SOVERSION>=112) writeObject(ptr.get()); else writePrimitiveSet(ptr.get()); return *this; }
|
||||
|
||||
template<typename T> OutputStream& operator<<( const osg::ref_ptr<T>& ptr )
|
||||
{ writeObject(ptr.get()); return *this; }
|
||||
template<typename T> OutputStream& operator<<( const osg::ref_ptr<T>& ptr ) { writeObject(ptr.get()); return *this; }
|
||||
|
||||
// Convenient methods for writing
|
||||
void writeWrappedString( const std::string& str ) { _out->writeWrappedString(str); }
|
||||
|
||||
Reference in New Issue
Block a user