20,741
edits
m (https://forum.flightgear.org/viewtopic.php?f=18&t=40984&p=406789#p406784) |
|||
| Line 1: | Line 1: | ||
{{Non-stable|version= | {{Non-stable|version=2023.3}} | ||
{{Stub}} | {{Stub}} | ||
| Line 34: | Line 34: | ||
The osg::ProxyNode node will reduce the start time of the viewer if there are huge numbers of models to be loaded and displayed in the scene graph. It is able to function as the interface of external files, help applications to start up as soon as possible, and then read those waiting models by using an independent data thread. It uses setFileName() rather than addChild() to set a model file and dynamically load it as a child.[https://www.packtpub.com/books/content/openscenegraph-managing-scene-graph] | The osg::ProxyNode node will reduce the start time of the viewer if there are huge numbers of models to be loaded and displayed in the scene graph. It is able to function as the interface of external files, help applications to start up as soon as possible, and then read those waiting models by using an independent data thread. It uses setFileName() rather than addChild() to set a model file and dynamically load it as a child.[https://www.packtpub.com/books/content/openscenegraph-managing-scene-graph] | ||
<!-- | |||
{{WIP}} | {{WIP}} | ||
--> | |||
By looking at existing code, we can learn more about the SimGear/FlightGear APIs for loading 3D models from the base package. A commonly-used idiom can be seen in the model-manager ({{flightgear file|src/Model/modelmgr.cxx|l=72}}) (slightly modified for clarity): | By looking at existing code, we can learn more about the SimGear/FlightGear APIs for loading 3D models from the base package. A commonly-used idiom can be seen in the model-manager ({{flightgear file|src/Model/modelmgr.cxx|l=72}}) (slightly modified for clarity): | ||