Re: [osg-users] Saving the result of an IntersectVisitor

2010-08-26 Thread Todd J. Furlong

Ooh, that could work!  Thanks, Terry, I will try that.

-Todd

On 08/25/2010 05:58 PM, Terry Welsh wrote:

How about just a vector of vector of integers?  Each integer would
represent the nth child of the previous node, and each vector of
integers would represent a whole nodepath.  So 4 6 7 would mean the
7th child of the 6th child of the 4th child of the root node.
--
Terry Welsh
mogumbo 'at' gmail.com
www.reallyslick.com




Message: 14
Date: Wed, 25 Aug 2010 08:44:05 -0400
From: Todd J. Furlongt...@inv3rsion.com
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Saving the result of an IntersectVisitor
Message-ID:4c751015.3010...@inv3rsion.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi all,

I use an IntersectVisitor to select nodes in a viewer application.  It
works fine, and the first Geode in the hit list is the node I want to
select.  Now I need to record that hit as part of saving the state of
our application in a metadata file that we save alongside a model file
or files.  This is where I've run into a problem.

1. Many of the nodes in our model files are unnamed (lost in
translation, most likely), so I can't store the name of a Geode.
2. NodePaths are vectors of pointers, so they can't help me here.
3. I *could* save intersection rays  play them back after loading.
That would work, but it would be both slower and not quite in the spirit
of saving the application state.

So, I am throwing this problem out to the folks in the group.  Am I
unaware of an already-existing solution to this?  Or does somebody out
there have a clever idea to help me out?

Thanks in advance,
Todd


___
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] Saving the result of an IntersectVisitor

2010-08-25 Thread Todd J. Furlong

Hi all,

I use an IntersectVisitor to select nodes in a viewer application.  It 
works fine, and the first Geode in the hit list is the node I want to 
select.  Now I need to record that hit as part of saving the state of 
our application in a metadata file that we save alongside a model file 
or files.  This is where I've run into a problem.


1. Many of the nodes in our model files are unnamed (lost in 
translation, most likely), so I can't store the name of a Geode.

2. NodePaths are vectors of pointers, so they can't help me here.
3. I *could* save intersection rays  play them back after loading. 
That would work, but it would be both slower and not quite in the spirit 
of saving the application state.


So, I am throwing this problem out to the folks in the group.  Am I 
unaware of an already-existing solution to this?  Or does somebody out 
there have a clever idea to help me out?


Thanks in advance,
Todd
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Saving the result of an IntersectVisitor

2010-08-25 Thread Todd J. Furlong
Another idea I had was to use a NodeVisitor to predictably - probably 
sequentially - name each node in a model after I load it.  They I could 
record a NodePath as a vector of names.  This idea is my current 
favorite, but I'm still hoping for an easier solution.


-Todd

On 08/25/2010 08:44 AM, Todd J. Furlong wrote:

Hi all,

I use an IntersectVisitor to select nodes in a viewer application. It
works fine, and the first Geode in the hit list is the node I want to
select. Now I need to record that hit as part of saving the state of our
application in a metadata file that we save alongside a model file or
files. This is where I've run into a problem.

1. Many of the nodes in our model files are unnamed (lost in
translation, most likely), so I can't store the name of a Geode.
2. NodePaths are vectors of pointers, so they can't help me here.
3. I *could* save intersection rays  play them back after loading. That
would work, but it would be both slower and not quite in the spirit of
saving the application state.

So, I am throwing this problem out to the folks in the group. Am I
unaware of an already-existing solution to this? Or does somebody out
there have a clever idea to help me out?

Thanks in advance,
Todd
___
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


Re: [osg-users] Saving the result of an IntersectVisitor

2010-08-25 Thread Terry Welsh
How about just a vector of vector of integers?  Each integer would
represent the nth child of the previous node, and each vector of
integers would represent a whole nodepath.  So 4 6 7 would mean the
7th child of the 6th child of the 4th child of the root node.
--
Terry Welsh
mogumbo 'at' gmail.com
www.reallyslick.com



 Message: 14
 Date: Wed, 25 Aug 2010 08:44:05 -0400
 From: Todd J. Furlong t...@inv3rsion.com
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Saving the result of an IntersectVisitor
 Message-ID: 4c751015.3010...@inv3rsion.com
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 Hi all,

 I use an IntersectVisitor to select nodes in a viewer application.  It
 works fine, and the first Geode in the hit list is the node I want to
 select.  Now I need to record that hit as part of saving the state of
 our application in a metadata file that we save alongside a model file
 or files.  This is where I've run into a problem.

 1. Many of the nodes in our model files are unnamed (lost in
 translation, most likely), so I can't store the name of a Geode.
 2. NodePaths are vectors of pointers, so they can't help me here.
 3. I *could* save intersection rays  play them back after loading.
 That would work, but it would be both slower and not quite in the spirit
 of saving the application state.

 So, I am throwing this problem out to the folks in the group.  Am I
 unaware of an already-existing solution to this?  Or does somebody out
 there have a clever idea to help me out?

 Thanks in advance,
 Todd

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org