Helpers to clone SGModelData
This is needed for latest SimGear to fix scene model unload not being called
This commit is contained in:
parent
7795fa6ffa
commit
8f1df6c358
3 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -89,6 +89,8 @@ public:
|
|||
SGPropertyNode *prop,
|
||||
osg::Node *branch );
|
||||
|
||||
virtual FGNasalModelDataProxy* clone() const { return new FGNasalModelDataProxy(_root); }
|
||||
|
||||
protected:
|
||||
SGPropertyNode_ptr _root;
|
||||
FGNasalModelDataRef _data;
|
||||
|
|
Loading…
Add table
Reference in a new issue