Added set/get to the ImageSerializer and removed some redudent comments

This commit is contained in:
Robert Osfield
2013-10-10 20:43:03 +00:00
parent cd86995d7d
commit eb7c2ae3f7
2 changed files with 3 additions and 2 deletions

View File

@@ -582,6 +582,9 @@ public:
ImageSerializer( const char* name, P* def, Getter gf, Setter sf )
: ParentType(name, def), _getter(gf), _setter(sf) {}
virtual bool set(osg::Object& obj, void* value) { C& object = OBJECT_CAST<C&>(obj); (object.*_setter)( *(reinterpret_cast<P**>(value)) ); return true; }
virtual bool get(const osg::Object& obj, void* value) { const C& object = OBJECT_CAST<const C&>(obj);*(reinterpret_cast<const P**>(value )) = (object.*_getter)(); return true; }
virtual bool read( InputStream& is, osg::Object& obj )
{
C& object = OBJECT_CAST<C&>(obj);