#include <Scenery/scenery.hxx>
-#include "AIModelData.hxx"
#include "AIBallistic.hxx"
#include <Main/util.hxx>
setRandom(scFileNode->getBoolValue("random", false));
}
-osg::Node* FGAIBallistic::load3DModel(const string &path, SGPropertyNode *prop_root)
-{
- model = SGModelLib::loadModel(path, prop_root, new FGAIModelData(this, prop_root));
- return model.get();
-}
-
bool FGAIBallistic::init(bool search_in_AI_path) {
FGAIBase::init(search_in_AI_path);
void readFromScenario(SGPropertyNode* scFileNode);
- virtual osg::Node* load3DModel(const string &path,
- SGPropertyNode *prop_root);
bool init(bool search_in_AI_path=false);
virtual void bind();
virtual void unbind();
#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>
+#include <Scripting/NasalSys.hxx>
#include "AIBase.hxx"
-#include "AIModelData.hxx"
#include "AIManager.hxx"
const char *default_model = "Models/Geometry/glider.ac";
osg::Node* FGAIBase::load3DModel(const string &path, SGPropertyNode *prop_root)
{
- model = SGModelLib::loadPagedModel(path, prop_root, new FGAIModelData(this, prop_root));
+ model = SGModelLib::loadPagedModel(path, prop_root, new FGNasalModelData(prop_root));
+ initModel(model.get());
return model.get();
}
#include <string>
#include <list>
-#include <osg/Referenced>
-#include <osg/Node>
-
#include <simgear/compiler.h>
using std::string;
+++ /dev/null
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "AIBase.hxx"
-#include "AIModelData.hxx"
-
-void FGAIModelData::modelLoaded(const string& path, SGPropertyNode *prop,
- osg::Node *n)
-{
- FGNasalModelData::modelLoaded(path, prop, n);
- // SG_LOG(SG_NASAL, SG_ALERT, "FGAIModelData::modelLoaded(" << path << ")");
- if(_base.valid())
- _base->initModel(n);
-}
+++ /dev/null
-#ifndef __FGAIMODELDATA_HXX
-#define __FGAIMODELDATA_HXX
-
-#include <osg/observer_ptr>
-#include <Scripting/NasalSys.hxx>
-
-class FGAIBase;
-
-class FGAIModelData : public FGNasalModelData {
-public:
- FGAIModelData(FGAIBase *b, SGPropertyNode *props = 0) : FGNasalModelData(props), _base(b) {}
- virtual void modelLoaded(const string& path, SGPropertyNode *prop, osg::Node *);
-
-private:
- osg::observer_ptr<FGAIBase> _base;
-};
-
-#endif
libAIModel_a_SOURCES = submodel.cxx submodel.hxx \
AIManager.hxx AIManager.cxx \
AIBase.hxx AIBase.cxx \
- AIModelData.cxx AIModelData.hxx \
AIAircraft.hxx AIAircraft.cxx \
AIMultiplayer.hxx AIMultiplayer.cxx \
AIShip.hxx AIShip.cxx \