#include<osg/ShapeDrawable>#include<osg/Geode>#include<osg/Group>#include<osgViewer/Viewer>intmain(){// Create drawables (actual shapes)osg::ref_ptr<osg::ShapeDrawable>sphere=newosg::ShapeDrawable(newosg::Sphere(osg::Vec3(0,0,0),1.0));osg::ref_ptr<osg::ShapeDrawable>box=newosg::ShapeDrawable(newosg::Box(osg::Vec3(3,0,0),1.5));osg::ref_ptr<osg::ShapeDrawable>cone=newosg::ShapeDrawable(newosg::Cone(osg::Vec3(-3,0,0),1.0,2.0));// Create geodes to hold each drawableosg::ref_ptr<osg::Geode>geodeSphere=newosg::Geode();osg::ref_ptr<osg::Geode>geodeBox=newosg::Geode();osg::ref_ptr<osg::Geode>geodeCone=newosg::Geode();geodeSphere->addDrawable(sphere);geodeBox->addDrawable(box);geodeCone->addDrawable(cone);// Create a group node and attach all geodesosg::ref_ptr<osg::Group>root=newosg::Group();root->addChild(geodeSphere);root->addChild(geodeBox);root->addChild(geodeCone);// Viewer setuposgViewer::Viewerviewer;viewer.setSceneData(root);returnviewer.run();}