I have created a custom visitor which will collect the drawables (I still have to add that code). When I call accept on the txp terrain node with the visitor object as parameter, the apply(osg::Node&) function gets called and not the apply(osg::Geode&).
In the apply(osg::Node&) function when I cast the node object to osg::Geode, the application crashes.
I am unable to pick drawable from the node reference in the apply function.
Thanks
On 7/28/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
On 7/28/06, cg baccha <[EMAIL PROTECTED]> wrote:
> Robert,
> I went throught the archive and could not find your reply. Can you forward
> the message again.
> Appreciate your help.
I did reply to you yesterday, but it seems it hasn't turned up in even
my email archive, so something wayward must have happened when I tried
to send it.
Basics is you need to traverse the loaded subgraph using a custom
NodeVisitor to pick out all the Drawables, then use a custom
TriangleIndexFunctor/TriangleFunctor to sort through all the
triangles. Do a search through the OSG source for examples of usage
of NodeVisitor and TriangleIndexFunctor.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
