Hi Validimir, How are you planning on determining the presence of water? Does the model already have some kinda of identifier? Is the water a distinct chunk of geometry? When you say you one big Terrain Node what exact do you mean?
As a general note, I'd have to say that I would tackle this type of task via a visitor that is run right after loaded the data to find the geometry to operate on, then process to produce the final scene graph for render prior to it being merged with the main scene graph. Typically I'd do this is paging thread via a osgDB::Registry::ReadFileCallback. Robert. On Sun, Jan 11, 2009 at 12:41 PM, Vladimir Karmisin <[email protected]> wrote: > Hello ! > My name is Vladimir, and I'm a very newbie to OSG. > I'm developing a shader-based water effect for FlightGear flight simulator, > and now fighting with a little problem. > Since in FlightGear we don't have a difference from Ground and Water (in > fact it's one big Terrain Node), > I have to use NodeVisitor pattern in main loop to determine the kind of a a > Node we're rendering now. > So I wrote NodeVisitor that returns a NodeList of nodes that matching a > certain name. > But I'm afraid such approach is far not the best (and definitely not so > fast, because in depth there's > a strcomp() somewhere). > I'd like to ask - how acceptable can be such approach, and if is there some > differerent way to determine > the kind of Node by some other property, other than Name ? > > -- > Vladimir Karmishin > ASTRA Development Inc. > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

