Hi,
On 31/03/11 13:13, Aitor Ardanza wrote:
J.P. Delport wrote:
Hi,
I think the return from the handler determines if the event was handled
or not and if it should be passed further down the list of handlers.
Check what the return is from the imagehandler and change it to see if
it has the effect you are looking for.
jp
On 31/03/11 11:43, Aitor Ardanza wrote:
Hi,
I have problems with this issue ... the fact is that I want to create an
QWidgetImage object in the scene and pass the events, but still pass those
events to osg. That is, if I have activated the trackball manipulator if I drag
the mouse inside the QWidgetImage, osg camera not react.
Code:
BrowserHandler* handler = new BrowserHandler(widgetImage.get());
quad->setEventCallback(handler);
quad->setCullCallback(handler);
BrowserHandler inherited from osgViewer::InteractiveImageHandler.
Still, the qt textbox not working and if I put a event filter on the object I
only catch mouse events ...
I do not know how to explain it better ... I leave the code and if anyone has
time to have a look I'd appreciate it. The project is in visual studio 2008.
Thank you!
Cheers,
Aitor
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38107#38107
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail
legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at
http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their
support.
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
------------------
Post generated by Mail2Forum
Yes, it give me true value... but for example, if I drag the mouse inside the
object it enters in the event caught function:
Code:
bool BrowserHandler::handle(const osgGA::GUIEventAdapter& ea,
osgGA::GUIActionAdapter& aa,osg::Object *object, osg::NodeVisitor *nv)
{
osgViewer::Viewer* viewer = dynamic_cast<osgViewer::Viewer*>(&aa);
if (!viewer) return false;
if (ea.getHandled()) return false;
if (!_image) return false;
switch(ea.getEventType())
{
case(osgGA::GUIEventAdapter::MOVE):
case(osgGA::GUIEventAdapter::DRAG):
case(osgGA::GUIEventAdapter::PUSH):
case(osgGA::GUIEventAdapter::RELEASE):
{
osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa);
int x,y;
if (mousePosition(view, nv, ea, x, y))
{
//viewer->getEventQueue()->mouseButtonRelease(x, y, ea.getButtonMask());
bool eventBool = _image->sendPointerEvent(x, y, ea.getButtonMask());
return eventBool;
}
break;
...}
how I would have to tell osg to also move the camera?
Mouse mapping within the object does well, the buttons are functional
try return false, this means you have not handled the event.
jp
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38119#38119
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org