]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIBallistic.cxx
Remove unused variables
[flightgear.git] / src / AIModel / AIBallistic.cxx
index 000ce326611a51de8f513c79c4024fcaecfa246b..0de56a46d63d4578fddc7cb25093941ac6857de7 100644 (file)
 #include <simgear/math/point3d.hxx>
 #include <simgear/math/sg_random.h>
 #include <simgear/math/sg_geodesy.hxx>
+#include <simgear/scene/model/modellib.hxx>
 
 #include <Scenery/scenery.hxx>
 
+#include "AIModelData.hxx"
 #include "AIBallistic.hxx"
 
 #include <Main/util.hxx>
@@ -36,6 +38,8 @@
 const double FGAIBallistic::slugs_to_kgs = 14.5939029372;
 const double FGAIBallistic::slugs_to_lbs = 32.1740485564;
 
+using namespace simgear;
+
 FGAIBallistic::FGAIBallistic(object_type ot) :
 FGAIBase(ot),
     _elevation(0),
@@ -114,6 +118,12 @@ void FGAIBallistic::readFromScenario(SGPropertyNode* scFileNode) {
     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);