globals->add_subsystem( "http", new FGHTTPClient );
}
- ////////////////////////////////////////////////////////////////////
- // Initialize the scenery management subsystem.
- ////////////////////////////////////////////////////////////////////
-
- globals->get_scenery()->get_scene_graph()
- ->addChild(simgear::Particles::getCommonRoot());
- simgear::GlobalParticleCallback::setSwitch(fgGetNode("/sim/rendering/particles", true));
-
////////////////////////////////////////////////////////////////////
// Initialize the flight model subsystem.
////////////////////////////////////////////////////////////////////
interiorLOD->addChild(interior_branch.get(), 0.0, 50.0);
aircraft_branch->addChild( interiorLOD );
+ // Set up the particle system as a directly accessible branch of the scene graph.
+ particles_branch = simgear::Particles::getCommonRoot();
+ particles_branch->setName("Particles");
+ scene_graph->addChild(particles_branch.get());
+ simgear::GlobalParticleCallback::setSwitch(fgGetNode("/sim/rendering/particles", true));
+
// Initials values needed by the draw-time object loader
sgUserDataInit( globals->get_props() );
terrain_branch = NULL;
models_branch = NULL;
aircraft_branch = NULL;
+ particles_branch = NULL;
}
#include <simgear/compiler.h>
#include <simgear/math/SGMath.hxx>
+#include <simgear/scene/model/particles.hxx>
#include <simgear/structure/subsystem_mgr.hxx>
#include "SceneryPager.hxx"
osg::ref_ptr<osg::Group> models_branch;
osg::ref_ptr<osg::Group> aircraft_branch;
osg::ref_ptr<osg::Group> interior_branch;
+ osg::ref_ptr<osg::Group> particles_branch;
osg::ref_ptr<flightgear::SceneryPager> _pager;
ScenerySwitchListener* _listener;
osg::Group *get_models_branch () const { return models_branch.get(); }
osg::Group *get_aircraft_branch () const { return aircraft_branch.get(); }
osg::Group *get_interior_branch () const { return interior_branch.get(); }
+ osg::Group *get_particles_branch () const { return particles_branch.get(); }
/// Returns true if scenery is available for the given lat, lon position
/// within a range of range_m.