1
0
Fork 0

Helpers to clone SGModelData

This is needed for latest SimGear to fix scene model
unload not being called
This commit is contained in:
Thomas Geymayer 2013-04-01 13:33:54 +02:00
parent 7795fa6ffa
commit 8f1df6c358
3 changed files with 5 additions and 1 deletions

View file

@ -70,6 +70,8 @@ public:
{
}
virtual FGAIModelData* clone() const { return new FGAIModelData(); }
/** osg callback, thread-safe */
void modelLoaded(const std::string& path, SGPropertyNode *prop, osg::Node *n)
{

View file

@ -31,7 +31,7 @@ typedef nasal::Ghost<NodeRef> NasalNode;
* model.
*/
static naRef f_node_getPose( const osg::Node& node,
const nasal::CallContext& ctx )
const nasal::CallContext& ctx )
{
osg::NodePathList parent_paths = node.getParentalNodePaths();
for( osg::NodePathList::const_iterator path = parent_paths.begin();

View file

@ -89,6 +89,8 @@ public:
SGPropertyNode *prop,
osg::Node *branch );
virtual FGNasalModelDataProxy* clone() const { return new FGNasalModelDataProxy(_root); }
protected:
SGPropertyNode_ptr _root;
FGNasalModelDataRef _data;