On Tue, 2009-12-01 at 17:37 +0100, Serge Lages wrote:
> Thanks Robert, I've totally missed the osgWidget part, it is clearly
> the place for such mechanism.
> 
> The interactive image plugin we're developping is not a browser but is
> not so far from it, do you think it can be valuable to have an
> InteractiveImage base class for sharing features between browsers and
> other interactive images ?
> 
> I have another question : to get events from our images, we've
> implemented from the osg::Image base class the "update" method. But
> what's the better way to call this update method ? Currently our
> "quick and dirty" method is to put a custom update callback to the
> geode or the geometry using the image which call explicitly the
> update. Is there any other way to have this update method called ?

I'd be very interested in your opinion on this as well, Robert. I often
find myself wishing that Image objects had an update() method as well,
but I don't know if I'm misusing OSG or it makes the most sense for you
to put logic in the "parent" Geode instead, like Sergey is doing.

> On Tue, Dec 1, 2009 at 4:56 PM, Robert Osfield
> <[email protected]> wrote:
>         Hi Serge,
>         
>         The basic event handling support in osg::Image is to enable
>         browser
>         style interactivity but is limited to only putting events into
>         the
>         osg::Image subclass - there is no support for getting events
>         out.
>         There is a limit to the type of events you could get out too -
>         as
>         osg::Image doesn't know anything about the potential
>         sublcasses from
>         osg::Image.  The InteractiveImageHandler is also in a similar
>         position
>         - it knows nothing about the osg::Image subclasses - just
>         enough about
>         osg::Image to pass events into it.
>         
>         To get events for the browser subclass from osg::Image one
>         will need
>         to know about that specific subclass i..e
>         osgWidget::BrowserImage.
>         This as yet isn't geared up for passing any events back or
>         providing a
>         callback mechanism for it, but this is for sure the place to
>         put them.
>          This way you could do a dynamic cast to BrowserImage and then
>         add the
>         extra handling your need.  To do this we'll need to extend
>         BrowserImage but this would be perfectly in keeping,
>         BrowserImage
>         itself is still in it's infancy, a first pass at what will be
>         required
>         for more fully featured browsing.
>         
>         Robert.
>         
>         
>         On Tue, Dec 1, 2009 at 3:38 PM, Serge Lages
>         <[email protected]> wrote:
>         > Hi Robert and all,
>         >
>         > I have a question about plugins and how to handle a specific
>         case. Let's say
>         > that I have a plugin which returns an interactive image
>         (like the pdf or
>         > browser one), I associate the image to an interactive image
>         handler to send
>         > it events. Up to here, everything works as expected, but
>         now, I need my
>         > interactive image to send me information about the
>         navigation. For example
>         > with the browser plugin, let's say I would like my
>         interactive image to tell
>         > me when the user clicks on a link to be able to filter the
>         websites where
>         > the user browses. How can I handle this case without
>         including some code
>         > from the plugin ? In a more generic way, do you think it can
>         be possible to
>         > have a generic path for the interactive images to send back
>         events to the
>         > application ? The InteractiveImageHandler should be the
>         place to put such a
>         > mechanism ?
>         >
>         > Thanks in advance for any help on this subject !
>         > Cheers,
>         >
>         > --
>         > Serge Lages
>         > http://www.tharsis-software.com
>         >
>         
>         > _______________________________________________
>         > osg-users mailing list
>         > [email protected]
>         >
>         
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>         >
>         >
>         _______________________________________________
>         osg-users mailing list
>         [email protected]
>         
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> 
> 
> -- 
> Serge Lages
> http://www.tharsis-software.com
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-- 
Follow us on Twitter! http://twitter.com/emperorlinux

EmperorLinux, Inc.
http://www.emperorlinux.com
1-888-651-6686

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to