Re: [osg-users] Extracting Node Names from NodePath

2010-06-23 Thread Ulrich Hertlein
Hi John, On 23/06/10 23:26 , John Galt wrote: > I used node1->setName("Specific Name"); for all the 3 nodes and I am looking > for the > specific name to be returned. > > However, all I get is empty strings. > My node1 = readFromFile("dumptruckosg"); > node2 = readFromFile("lz.osg"); > node3 =

Re: [osg-users] Extracting Node Names from NodePath

2010-06-23 Thread John Galt
Hi, I did the same thing you suggest but it doesn't work for me. I used node1->setName("Specific Name"); for all the 3 nodes and I am looking for the specific name to be returned. However, all I get is empty strings. My node1 = readFromFile("dumptruckosg"); node2 = readFromFile("lz.osg"); node

Re: [osg-users] Extracting Node Names from NodePath

2010-06-23 Thread Trajce (Nick) Nikolov
Hi John, the node path stores all the nodes from the root to the node containing the geometry (a Geode). In your case, if you picked node1, the nodepath will be root;PAT1;node1. You can iterate over them and get the name with node->getName(). The lead node would be nodepath.back() -Nick On Wed,