Re: [osg-users] Node Names After Picking

2009-01-17 Thread Ryan Morris
Ok I hope this helps someone with the same problem. I've been on vacation and thinking about it non-stop and ta-da it works now. If anyone has a cleaner way of doing it please let me know. This is all I could come up with! Thanks for the help! class setModelName : public osg::NodeVisitor { public:

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Gordon Tomlinson
linson.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Simon Hammett Sent: Saturday, January 03, 2009 12:40 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Node Names After Pic

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Simon Hammett
2009/1/3 Simon Hammett : > 2009/1/2 Ryan Morris : >> Just to be clear, would something like: >> >> osg::Node *node = osgDB::readNodeFile("file.osg"); >> osg::Geode *geode = osg::dynamic_castnode; >> >> geode->getDrawable()->setName("New name"); >> >> should work? (syntax might be a little off I'm n

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Simon Hammett
2009/1/2 Ryan Morris : > Just to be clear, would something like: > > osg::Node *node = osgDB::readNodeFile("file.osg"); > osg::Geode *geode = osg::dynamic_castnode; > > geode->getDrawable()->setName("New name"); > > should work? (syntax might be a little off I'm not at my home system right > now).

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Ryan Morris
Just to be clear, would something like: osg::Node *node = osgDB::readNodeFile("file.osg"); osg::Geode *geode = osg::dynamic_castnode; geode->getDrawable()->setName("New name"); should work? (syntax might be a little off I'm not at my home system right now). Thanks for the replies! -Russ ___

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Paul Melis
Ryan Morris wrote: > Is there a way to set the name of the node's drawable? That should > solve my problem correct? I've been working on this for a few days now > and can't quite seem to get it going. > As osg::Drawable is derived from osg::Object you can set/get its name with setName()/getName(

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Gordon Tomlinson
-users] Node Names After Picking Is there a way to set the name of the node's drawable? That should solve my problem correct? I've been working on this for a few days now and can't quite seem to get it going. -Russ ___ osg-users mailing

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Ryan Morris
Is there a way to set the name of the node's drawable? That should solve my problem correct? I've been working on this for a few days now and can't quite seem to get it going. -Russ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://list

Re: [osg-users] Node Names After Picking

2009-01-02 Thread Paul Melis
Ryan Morris wrote: > I have a scene populated with nodes loaded from .osg files, I set > their names with node->setName(), but when I pick them and I perform a > node->getName() it returns the name of the geode specified in the .osg > file. Does anyone know why this is happening? Any help would be

[osg-users] Node Names After Picking

2009-01-01 Thread Ryan Morris
I have a scene populated with nodes loaded from .osg files, I set their names with node->setName(), but when I pick them and I perform a node->getName() it returns the name of the geode specified in the .osg file. Does anyone know why this is happening? Any help would be greatly appreciated. -Russ