On Saturday, March 02, 2013 14:00:19 Hartwig Wiesmann wrote: > I would like to create dynamically PageLOD nodes whenever a node within a > certain LOD range is displayed. > > Example: > > > Code: > > pagedLOD->AddChild(modelL1,100.0f,FLT_MAX); > pagedLOD->AddChild(modelL2,0.0f,100.0f); > > > > > Whenever the node "modelL2" is displayed I would like to have a callback in > which I can decide whether I would like to create children of modelL2. > > Finally, this comes down to building dynamically a quadtree using PagedLODs. > > Any ideas?
Static models in osg format like already suggested. Works and is simple. Look into simgear part of flightgear. There is a reader writer spt that does about what you want. The method there is to invent a meta file name format that does not exist on disc that contains all the knowledge about what to load in its name and path. Alternatively, what I thought about is using the read file callback that you can attach to a pagedlod. There you can store everything you need to know what to create/load when you step on that. I use this way for something different in the same above project. There I use the read file callback to defer loading parts of the scenery tiles to a closer distance. But avoid parsing the files twice - one when the basic tile is loaded and one when the small parts on top are needed. Mathias _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

