There is a Multitouch trackball, but is not used in Android example.

2012/6/26 Christian Buchner <[email protected]>

> I've been thinking about this problem as well, as there is currently
> no generic multi touch capable
> camera manipulator. In my application I would need something like the
> terrain manipulator, but
> capable of handling two touch points.
>
> Multitouch dragging/rotation could be implemented by alternating
> processing of both touch points.
>
> Alternate between those two checks
> If touch point 2 moved, rotate around point 2, using point 1 as a
> fixed rotational center.
> If touch point 1 moved, rotate around point 1, using point 2 as a
> fixed rotational center.
>
> If only one touch point is detected, keep using the old trackball
> algorithm with the default rotation
> center
>
> More than two touch points? -> kernel panic ;)
>
> Christian
>
> 2012/6/13 Nav Joseph <[email protected]>:
> > Sounds more like an algorithm solution than an osg solution.
> > The below algo isn't perfect, but it'll give you an idea.
> >
> > finger1=false;
> > finger2=false;
> >
> > while(checkForFingerPressRelease)
> > {
> > if (finger1pressed) finger1=true;
> > if (finger2pressed) finger2=true;
> > if (finger1released) finger1=false;
> > if (finger2released) finger2=false;
> >
> > if (finger1 && finger2)
> > {
> >  check for dragging of finger2 and rotate
> >  else
> >  check for dragging of finger1 and rotate
> > }
> >
> > }//while
> >
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=48265#48265
> >
> >
> >
> >
> >
> > _______________________________________________
> > 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
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to