#include <simgear/math/polar3d.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/misc/sg_path.hxx>
+#include <simgear/sky/clouds3d/SkySceneLoader.hpp>
+#include <simgear/sky/clouds3d/SkyUtil.hpp>
#include <simgear/timing/sg_time.hxx>
#include <simgear/timing/lowleveltime.h>
#include <FDM/YASim/YASim.hxx>
#include <Include/general.hxx>
#include <Input/input.hxx>
+#include <Instrumentation/instrument_mgr.hxx>
// #include <Joystick/joystick.hxx>
#include <Objects/matlib.hxx>
#include <Model/acmodel.hxx>
#include <Scenery/tilemgr.hxx>
#include <Sound/fg_fx.hxx>
#include <Sound/soundmgr.hxx>
+#include <Systems/system_mgr.hxx>
#include <Time/FGEventMgr.hxx>
#include <Time/light.hxx>
#include <Time/sunpos.hxx>
extern const char *default_root;
+SkySceneLoader *sgCloud3d;
// Read in configuration (file and command line) and just set fg_root
bool fgInitFGRoot ( int argc, char **argv ) {
}
}
+static void printMat(const sgVec4 *mat, char *name="")
+{
+ int i;
+ cout << name << endl;
+ for(i=0; i<4; i++) {
+ cout <<" "<<mat[i][0]<<" "<<mat[i][1]<<" "<<mat[i][2]<<" "<<mat[i][3]<<endl;
+ }
+ cout << endl;
+}
// Initialize view parameters
void fgInitView() {
globals->get_aircraft_model()->update(0);
// run update for current view so that data is current...
globals->get_viewmgr()->update(0);
+
+ printMat(globals->get_current_view()->get_VIEW(),"VIEW");
+ printMat(globals->get_current_view()->get_UP(),"UP");
+ // printMat(globals->get_current_view()->get_LOCAL(),"LOCAL");
+
}
globals->get_environment_mgr()->bind();
#endif
+ ////////////////////////////////////////////////////////////////////
+ // Initialize the 3D cloud subsystem.
+ ////////////////////////////////////////////////////////////////////
+ if ( fgGetBool("/sim/rendering/clouds3d") ) {
+ SGPath cloud_path(globals->get_fg_root());
+ cloud_path.append("large.sky");
+ SG_LOG(SG_GENERAL, SG_INFO, "Loading CLOUDS3d from: " << cloud_path.c_str());
+ if ( !sgCloud3d->Load( cloud_path.str() ) ) {
+ fgSetBool("/sim/rendering/clouds3d", false);
+ SG_LOG(SG_GENERAL, SG_INFO, "CLOUDS3d FAILED: ");
+ }
+ SG_LOG(SG_GENERAL, SG_INFO, "CLOUDS3d Loaded: ");
+ }
+
////////////////////////////////////////////////////////////////////
// Initialize vor/ndb/ils/fix list management and query systems
////////////////////////////////////////////////////////////////////
#endif
+ ////////////////////////////////////////////////////////////////////
+ // Initialize the aircraft systems.
+ ////////////////////////////////////////////////////////////////////
+ globals->get_systemmgr()->init();
+ globals->get_systemmgr()->bind();
+
+ ////////////////////////////////////////////////////////////////////
+ // Initialize the instrumentation.
+ ////////////////////////////////////////////////////////////////////
+ globals->get_instrumentmgr()->init();
+ globals->get_instrumentmgr()->bind();
+
////////////////////////////////////////////////////////////////////
// Initialize the radio stack subsystem.
////////////////////////////////////////////////////////////////////
// Initialize I/O subsystem.
////////////////////////////////////////////////////////////////////
-#if ! defined( macintosh )
- fgIOInit();
-#endif
+ globals->get_io()->init();
+ globals->get_io()->bind();
// Initialize the 2D panel.
string panel_path = fgGetString("/sim/panel/path",