Hello, I should have said more precisely, what I want. I'm looking for a way to distinguish between the nodes generated by my application and those loaded from the external user-generated scenegraph. And I'm not sure, if a description is the best way to do this. I think a custom UserData object is a far better solution.
Thank you very much! Thomas On 8/10/07, Robert Osfield <[EMAIL PROTECTED]> wrote: > Hi Thomas, > > When you say uniquely mark a node, for what purpose? Do you need to > serialize this mark? > > In general I'd say the Node pointer itself uniquely identifies it. Is > this not sufficient? > > Alternatively you can attach a custom UserData object to the Node via > its s/getUserData method. Or as you suggest use the DescrptionList on > each Node. > > Robert. > > On 8/10/07, Thomas Giricz <[EMAIL PROTECTED]> wrote: > > Hello, > > > > my application loads a user-generated scenegraph but also creates its > > own nodes. I want to identify the self-generated nodes uniquely. > > I thought of using a description, but this is never necessarily > > unique, because the user might accidently create just the same > > description string in one of his nodes. > > > > In the documentation of osg::StateAttribute::Type there is a short > > description of how to add your own StateAttribute: > > "When extending the osg's StateAttribute's simply define your own Type > > value which is unique, using the StateAttribute::Type enum as a guide > > of what values to use." > > But I dont understand, if I have to change the OpenSceneGraph code to > > do so (which I dont want!) or if I can do this from my own code. > > > > Do you know any solution for this problem? > > > > > > Thanks in advance! > > > > Thomas > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org