Added test for serializers and fixed serializers
This commit is contained in:
@@ -9,7 +9,13 @@
|
||||
#include <osg/ScriptEngine>
|
||||
#include <osg/UserDataContainer>
|
||||
|
||||
#include <osgPresentation/Presentation>
|
||||
#include <osgPresentation/Slide>
|
||||
#include <osgPresentation/Layer>
|
||||
#include <osgPresentation/Element>
|
||||
|
||||
#include <osgDB/ReadFile>
|
||||
#include <osgDB/WriteFile>
|
||||
#include <osgDB/FileUtils>
|
||||
|
||||
#include <osgGA/TrackballManipulator>
|
||||
@@ -93,6 +99,22 @@ int main(int argc, char** argv)
|
||||
#endif
|
||||
|
||||
|
||||
viewer.setSceneData( model.get() );
|
||||
osg::ref_ptr<osgPresentation::Presentation> presentation = new osgPresentation::Presentation;
|
||||
osg::ref_ptr<osgPresentation::Slide> slide = new osgPresentation::Slide;
|
||||
osg::ref_ptr<osgPresentation::Layer> layer = new osgPresentation::Layer;
|
||||
osg::ref_ptr<osgPresentation::Group> group = new osgPresentation::Group;
|
||||
osg::ref_ptr<osgPresentation::Element> element = new osgPresentation::Element;
|
||||
presentation->addChild(slide.get());
|
||||
slide->addChild(layer.get());
|
||||
//layer->addChild(element.get());
|
||||
layer->addChild(group.get());
|
||||
group->addChild(element.get());
|
||||
element->addChild(model.get());
|
||||
|
||||
viewer.setSceneData( presentation.get() );
|
||||
|
||||
|
||||
osgDB::writeNodeFile(*presentation, "pres.osgt");
|
||||
|
||||
return viewer.run();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( Element,
|
||||
REGISTER_OBJECT_WRAPPER( osgPresentation_Element,
|
||||
new osgPresentation::Element,
|
||||
osgPresentation::Element,
|
||||
"osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Element" )
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( Group,
|
||||
REGISTER_OBJECT_WRAPPER( osgPresentation_Group,
|
||||
new osgPresentation::Group,
|
||||
osgPresentation::Group,
|
||||
"osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group" )
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( Layer,
|
||||
REGISTER_OBJECT_WRAPPER( osgPresentation_Layer,
|
||||
new osgPresentation::Layer,
|
||||
osgPresentation::Layer,
|
||||
"osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Layer" )
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( Presentation,
|
||||
REGISTER_OBJECT_WRAPPER( osgPresentation_Presentation,
|
||||
new osgPresentation::Presentation,
|
||||
osgPresentation::Presentation,
|
||||
"osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Presentation" )
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( Section,
|
||||
REGISTER_OBJECT_WRAPPER( osgPresentation_Section,
|
||||
new osgPresentation::Section,
|
||||
osgPresentation::Section,
|
||||
"osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Section" )
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <osgDB/InputStream>
|
||||
#include <osgDB/OutputStream>
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( Slide,
|
||||
REGISTER_OBJECT_WRAPPER( osgPresentation_Slide,
|
||||
new osgPresentation::Slide,
|
||||
osgPresentation::Slide,
|
||||
"osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Slide" )
|
||||
|
||||
Reference in New Issue
Block a user