fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Base / testMCore.cpp
blob8c80e3a7ae7047be4ecbd72ffddae0450a7916db
2 #include "OSGMultiCore.h"
3 #include "OSGGroup.h"
4 #include "OSGTransform.h"
5 #include "OSGPointLight.h"
6 #include "OSGNode.h"
7 #include "OSGSceneFileHandler.h"
9 #include "OSGBaseInitFunctions.h"
11 int main(int argc, char **argv)
13 OSG::osgInit(argc, argv);
15 OSG::NodeUnrecPtr pNode = OSG::Node::create();
17 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo.osg");
19 OSG::GroupUnrecPtr pGr = OSG::Group::create();
20 OSG::addCoreToNode(pNode, pGr);
22 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo1.osg");
24 OSG::addCoreToNode(pNode, pGr);
26 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo1a.osg");
29 OSG::TransformUnrecPtr pTr = OSG::Transform::create();
31 OSG::addCoreToNode(pNode, pTr);
33 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo2.osg");
35 OSG::addCoreToNode(pNode, pTr);
37 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo2a.osg");
39 OSG::subCoreFromNode(pNode, pTr);
41 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo3.osg");
43 OSG::addCoreToNode(pNode, pTr);
45 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo4.osg");
47 OSG::subCoreFromNode(pNode, pTr, false);
49 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo5.osg");
51 OSG::subCoreFromNode(pNode, pGr);
53 OSG::SceneFileHandler::the()->write(pNode, "/tmp/mcore/foo6.osg");
55 pNode = NULL;
57 return 0;