Re: [osg-users] Implementing a 3D GUI

2008-01-24 Thread Brian

Unfortunately, this will most likely not be open sourced due to the fact that 
I'm developing it for my employer.  There is certainly an advantage to open 
sourcing it, I know, especially when it comes to fixing bugs and adding new 
features.  However, my employer probably isn't ready to take that step forward 
yet.

Incidentally, I was able to get the picker to work with my application.  It 
took a little extra doing since the other 3rd party utility that I use, 
Delta3D, doesn't use the osgProducer class (still using OSG 1.2).  My only bugs 
now that I have seen involve the mouse cursor flickering or the caret not 
showing (depending on the implementation used which gets complicated.)  
Unfortunately, those aren't OSG related; so asking for help with those is more 
than a bit off topic.

-Brian

 On Thu Jan 24 13:27 , Jeremy Moles [EMAIL PROTECTED] sent:


On Tue, 2008-01-22 at 12:00 -0500, Brian wrote:
 Hi,
 
 I am in the process of trying to create an interactive Macromedia Flash 
 drawable.  I am now at the point where the Flash movie is rendering, but it 
 has no available mouse input.  My problem is how to determine what the 
 coordinates of my mouse cursor are (in 2D space) when the mouse is over the 
 drawable.  Preferably, I'd like to know the 2D coordinate of the mouse 
 position in terms of (0..1, 0..1).  The drawable itself is in 3D space.

Is this code Open Source? I'd love to help test it out a bit, and
perhaps apply anything I learn therein to osgWidget...

 I know that the IntersectVistor allows me to do certain things, but I have 
 never really used it before.  I've taken a look at the osgPick example and 
 see that I can get the local and world coordinates of an intersection, but I 
 am unclear as to whether there are any helper OSG classes/functions that 
 will allow me to map that intersection point to the correct 2D coordinate to 
 pass to the Flash player.  Also, is it possible to restrict the intersection 
 tests  for my Flash drawables only?
 
 Thanks,
 Brian
 ___
 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] Implementing a 3D GUI

2008-01-24 Thread Jeremy Moles

On Tue, 2008-01-22 at 12:00 -0500, Brian wrote:
 Hi,
 
 I am in the process of trying to create an interactive Macromedia Flash 
 drawable.  I am now at the point where the Flash movie is rendering, but it 
 has no available mouse input.  My problem is how to determine what the 
 coordinates of my mouse cursor are (in 2D space) when the mouse is over the 
 drawable.  Preferably, I'd like to know the 2D coordinate of the mouse 
 position in terms of (0..1, 0..1).  The drawable itself is in 3D space.

Is this code Open Source? I'd love to help test it out a bit, and
perhaps apply anything I learn therein to osgWidget...

 I know that the IntersectVistor allows me to do certain things, but I have 
 never really used it before.  I've taken a look at the osgPick example and 
 see that I can get the local and world coordinates of an intersection, but I 
 am unclear as to whether there are any helper OSG classes/functions that will 
 allow me to map that intersection point to the correct 2D coordinate to pass 
 to the Flash player.  Also, is it possible to restrict the intersection tests 
  for my Flash drawables only?
 
 Thanks,
 Brian
 ___
 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] Implementing a 3D GUI

2008-01-22 Thread Brian
Hi,

I am in the process of trying to create an interactive Macromedia Flash 
drawable.  I am now at the point where the Flash movie is rendering, but it has 
no available mouse input.  My problem is how to determine what the coordinates 
of my mouse cursor are (in 2D space) when the mouse is over the drawable.  
Preferably, I'd like to know the 2D coordinate of the mouse position in terms 
of (0..1, 0..1).  The drawable itself is in 3D space.

I know that the IntersectVistor allows me to do certain things, but I have 
never really used it before.  I've taken a look at the osgPick example and see 
that I can get the local and world coordinates of an intersection, but I am 
unclear as to whether there are any helper OSG classes/functions that will 
allow me to map that intersection point to the correct 2D coordinate to pass to 
the Flash player.  Also, is it possible to restrict the intersection tests  for 
my Flash drawables only?

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


Re: [osg-users] Implementing a 3D GUI

2008-01-22 Thread Jeremy Moles
On Tue, 2008-01-22 at 12:00 -0500, Brian wrote:
 Hi,
 
 I am in the process of trying to create an interactive Macromedia Flash 
 drawable.  I am now at the point where the Flash movie is rendering, but it 
 has no available mouse input.  My problem is how to determine what the 
 coordinates of my mouse cursor are (in 2D space) when the mouse is over the 
 drawable.  Preferably, I'd like to know the 2D coordinate of the mouse 
 position in terms of (0..1, 0..1).  The drawable itself is in 3D space.
 
 I know that the IntersectVistor allows me to do certain things, but I have 
 never really used it before.  I've taken a look at the osgPick example and 
 see that I can get the local and world coordinates of an intersection, but I 
 am unclear as to whether there are any helper OSG classes/functions that will 
 allow me to map that intersection point to the correct 2D coordinate to pass 
 to the Flash player.  Also, is it possible to restrict the intersection tests 
  for my Flash drawables only?

osgGA::GUIEventAdapter::{getX, getY} is what I believe you want here,
but you'll need to know how to tie it all in together with your app,
which is a somewhat non-trivial thing (imo).

Of course, I'd encourage you to just use osgHUD--since it never hurts to
have more eyeballs looking at my code--but it may not be ready for your
use yet. :) However, nothing about what you've described here wouldn't
fit into osgHUD currently, though you'd need to inhert from
osgHUD::Window or osgHUD::Widget somehow. I'd be willing to help with
this if your code is public...

Also, osgHUD handles the picking exclusivity issues by requiring the
user provide a unique NodeMask when creating an osgHUD::WindowManager
object. I asked a few months back and was told this was the best way, so
I'd say the same would apply here as well.

(If you want to see how osgHUD does all this, check out SVN and look at
the osgHUD/ViewerEventHandlers file)

 Thanks,
 Brian
 ___
 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