Canvas development: Difference between revisions

Jump to navigation Jump to search
Line 1,649: Line 1,649:
in simgear Canvas::update it appears to be using the factories to find the element; and this means that it can't find the named OSG node, which makes me think that maybe it is only looking in the ownship (which is a null model).  
in simgear Canvas::update it appears to be using the factories to find the element; and this means that it can't find the named OSG node, which makes me think that maybe it is only looking in the ownship (which is a null model).  
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
PlacementFactoryMap::const_iterator placement_factory = _placement_factories.find( node->getStringValue("type", "object") ); if( placement_factory != _placement_factories.end() ) { Placements& placements = _placements[ node->getIndex() ] = placement_factory->second(node, this); node->setStringValue ( "status-msg", placements.empty() ? "No match" : "Ok" ); }
PlacementFactoryMap::const_iterator placement_factory = _placement_factories.find( node->getStringValue("type", "object") );  
if( placement_factory != _placement_factories.end() ) {  
Placements& placements = _placements[ node->getIndex() ] = placement_factory->second(node, this);  
node->setStringValue ( "status-msg", placements.empty() ? "No match" : "Ok" );  
}
</syntaxhighlight>
</syntaxhighlight>


Navigation menu