1
0
Fork 0
flightgear/src/AIModel/AIModelData.hxx
timoore fd492a297a model paging patch from Till Busch
From Till:
i started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.

currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there

2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.

3. simplify mode-loading functions (avoid passing around fg_root)

4. avoid supurious MatrixTransform nodes in loaded models

5. fix some memory leaks
2008-03-22 09:31:06 +00:00

18 lines
435 B
C++

#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