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:
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
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
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).
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
___
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(
-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
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
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
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
10 matches
Mail list logo